-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add message to allow user to login manually in the enter email screen. #1693
Conversation
📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked pretty well, requesting a change to support localizing the linked text.
Also, when you press the back arrow from the password field, you end up at the welcome screen. Is that expected? I think it works ok but I expected to be back to the email login form.
@@ -101,6 +104,17 @@ class SignInFragment: MagicLinkableFragment() { | |||
"wpcc_button_press_signin_activity" | |||
) | |||
} | |||
val manualLoginTextView = view.findViewById<TextView>(R.id.sign_in_login_manually) | |||
val message = getString(R.string.signin_login_with_email_manually); | |||
val span = StrUtils.generateClickableSpannableString(LOGIN_MANUALLY_SUBSTRING, message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work for localized strings... can it instead work like this string does?
<string name="simperium_footer_signup">By creating an account, you agree to our %1$s%2$s%3$sTerms and Conditions%4$s</string>
And the code that formats it:
String.format(
if (this.isLogin) this.resources.getString(R.string.simperium_footer_login) else this.resources.getString(
R.string.simperium_footer_signup
), "<span style=\"color:#", colorLink, "\">", "</span>"
)
Something like that?
Unfortunately it is. This is a remnant of the old way of doing things. I can update it, but would require me to replace the user and password screen with one that isn't made by simperium. Or we can ticket it to fix it. Basically a bigger fix.
And great catch! This was an oversight. You are correct it wouldn't work for localized strings. The fix could be to localize the substring as well. Not sure if there is risk with the people translating and needing to translate the last part. As to why I opted out of doing what you are suggesting is because the entire |
Ah, I see. I think it's ok to make it all clickable so that the localization can work properly. |
@roundhill I made the changes. Using the old method for now. Will create an issue to explore using a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and tested well!
Fix #1689
This PR adds a new label on the screen to enter your email for a magic link. That lable will have a link to login manually, meaning with password instead.
Test
Release
N/A