-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix/10930 email error dissapears on rotation - continued #11537
Conversation
Generated by 🚫 dangerJS |
You can test the changes on this Pull Request by downloading the APK here. |
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.
👋@jd-alexander 😊! I tested your changes, code-wise it looks good and it should have worked but it seems Android behaves differently 😖and TextWatcher's onTextChanged()
is called again when phone orientation is changed which alters the behaviour.
If it might help, tested on
Pixel 3a, API level 29
Pixel 3, API level 27
Thanks @ashiagr will check it out! Yeah, The |
I removed the clearing of the |
Thanks @jd-alexander ! I was wondering if we can delay adding text changed listener till the screen renders after rotation as described here while retaining
This way we can avoid redisplay of error text on rotation once it is cleared after text change. Also since we're trying to preserve email address error, I was thinking to also preserve another email error |
Nice @ashiagr Knew you would have something cool I didn't remember 😉 I used
Makes sense! Good eye 😄 Since we are here right now, I just decided to support all the email errors in this class. |
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.
Perfect @jd-alexander 🎉! LGTM 🚢.
P.S. As discussed on slack, we should also push the changes to the login lib repo.
cfc0675d21 Add title to the layout override for the site help dialog 63fc73efa0 Use wrap_content for image width so wider images will scale better 68b0c58437 Merge commit '8487e6f4cfee09193f48b803fcf1eb2252355022' into darkmode/login-theme-1 c826be2ccb Merge pull request #35 from wordpress-mobile/feature/login-style-changes-v2 1f6c6e4bca Gutenberg/integrate release 1.25.0 with dark mode (#11580) 1d668f54a5 Merge pull request #11537 from wordpress-mobile/fix/10930-email-error-dissapears-on-rotation fd6665242f store the res id instead of the boolean so it supports multiple errors. 858decb8b1 utilized runnable that's posted when the UI has been drawn. ab37113dbf removed clearing in text watcher. 3691e848b8 Fixed config change issues. fd0c8c97e8 Merge pull request #34 from wordpress-mobile/merge/WordPress-Android/11492 c134376ee6 Merge commit 'e80a69322fe65ad994bee1854a2343c2089af323' into issue/fix-login-subtree 526919648d Ignore onDiscoverySucceeded events if LoginBaseDiscoveryFragment is detached 775f096826 Revert "Feature/material theme and Dark Theme support (#11469)" (#11486) 65d5c8f67b Feature/material theme and Dark Theme support (#11469) e80a69322f Merge pull request #33 from wordpress-mobile/merge/WordPress-Android/11051 40824a4333 Merge commit '0c3930794ed0c77e4926d334674e85263ef2a651' into update_login_lib_with_signup_sheet_nav_bar_buttons_visibility_fix fec863d2f8 Resolved merge conflict by removing SignupBottomSheetDialog.java file. f2d8c102ad Merge branch 'develop' into issue/10908-navigation-bar-buttons-not-visible-with-signup-sheet 7e46000166 Fix validation in input of Email fccc72b9a4 Merge pull request #32 from wordpress-mobile/merge/WordPress-Android/11172 d634c91e9f Merge commit '371f14160a780fbd7797d71921859d0fee5764d5' into update-login-lib-with-password-toggle-fix cd81dd1ce9 Add custom selector for password button 8f444b2d13 Merge branch 'issue/10908-navigation-bar-buttons-not-visible-with-signup-sheet' of https://github.com/wordpress-mobile/WordPress-Android into issue/10908-navigation-bar-buttons-not-visible-with-signup-sheet b53dda144c Add null check for design_bottom_sheet layout 521d09f42c Update libs/login/WordPressLoginFlow/src/main/java/org/wordpress/android/login/widgets/WPBottomSheetDialogFragment.java 7178f5c123 Show full width navigation bar and restrict max width for large screens 8a768d3dd2 Partial fix for terms of service announcement bering read twice. 989fb1d5a2 Remove empty line after brace 2d5d733080 Extract parts of code from onCreateView to onViewCreated a24d5289ab Eliminate setRetainInstance(true) 2e71a00135 Remove dialog.setOnDismissListener cfff7a060d Avoid using a parameter in Fragment's constructor 8b09b2d836 Convert BottomSheetDialog to BottomSheetDialogFragment and update styles a87d595f7a Merge pull request #1796 from woocommerce/release/merge-3.3 f18c390619 Fix signup bottom sheet navigation bar buttons not visible issue 4f4657fb64 Add requested changes e407a7f304 Revert erroneously deleted code during merge 821d29b90b Revert erroneously deleted code during merge 188cc0ee64 Check if view is null before accessing property 1a4414eec7 Merge commit 'bd659986940153549bfc26a8f6a4104bf748fe3c' into hotfix/1778-npe d2b8135e1e Added logic to fetch the correct SiteModel from the local db for the incoming url d80e8e616d Remove whitespaces b18703520d Issue/10930 email address error is preserved on rotation 3421ca9534 Merge branch 'develop' into test a20471e8c1 Merge branch 'develop' of https://github.com/woocommerce/woocommerce-android into feature/refund-by-items-master 7757f052b7 Merge branch 'develop' into feature/edit-product-master f869be0bfc Merge branch 'feature/refund-by-items-master' into 0nko/refund-items-list ea896f6172 Merge pull request #10833 from wordpress-mobile/issue/10832-fix-npe-in-login-fragment 64678168e4 check if listener is null before handling discovery error 1de03a5522 check if listener is null before handling discovery error a6e0946af0 Update gradle plugin to version 3.5.3 a23213aa25 Fixed wrong key variable c89899f001 Updated Glide version to 4.10.0 in the login module 2dd431ccdd Updated Glide version in the login lib e3211148cd Merge pull request #10787 from wordpress-mobile/anitaa/woo-login-changes 00f6bd2e62 Added flag that checks if login has started. d5e8683cf6 Added period to login with site credentials eee4c53fa7 Fixed bug when the forgot password url in username password screen was not valid 2810b14e28 Upgrade gradle plugin to version 3.5.2 daf7384622 Merge pull request #1552 from woocommerce/login-lib-changes f75cbaaacd Merge commit '4e588147352f8fe88f1417a03a00114dd7d51640' into login-lib-changes b2d28c652d Add signup flow name parameter to signup auth email request git-subtree-dir: libs/login git-subtree-split: cfc0675d2167b938369cf1896083453a593e9b8e
👋 @jd-alexander , does this PR also address this other ticket? #10930. Let's close it if it does, thanks! |
Yes, it does @hypest Closing! |
…-dissapears-on-rotation Fix/10930 email error dissapears on rotation - continued
…-dissapears-on-rotation Fix/10930 email error dissapears on rotation - continued
…-dissapears-on-rotation Fix/10930 email error dissapears on rotation - continued
Fixes #11003
Findings
This PR is a continuation of #11003 where the email error wasn't being preserved when a configuration change took place.
Testing
Reviewing
Submitter Checklist
RELEASE-NOTES.txt
if necessary.