-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Validate login form whever the input is changed #30563
Conversation
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
BUG: Not able to signin with google on first button click Screen.Recording.2023-11-01.at.4.25.14.PM.mov |
Screen.Recording.2023-11-01.at.22.47.49.movI cannot reproduce but do you think we only need to allow validate when the text change after the first time we click on next button? That can prevent the error from appearing when we click on google or apple icon without clicking on the next button. |
Nope. It's against Form guideline. I think there was similar issue in the past. i.e. #12715. Please check how they handled it. |
@aimane-chnaif It user |
yeah, I am also concerned about that. I think we should raise discussion on the expected behavior. cc: @Beamanator |
@dukenv0307 meanwhile, please try to look for alternative solution without |
@aimane-chnaif I updated. |
As lint says, it's not recommended at all |
@aimane-chnaif Do you think we can disable eslint here because we only apply it in web. |
@aimane-chnaif I tested and it works well. These CTAs are beside the form so it doesn't have any problem when the error appears. |
Let me know when lint is fixed |
@aimane-chnaif Updated to fix lint. And I saw that we also disabled this lint here. App/src/stories/Tooltip.stories.js Lines 73 to 75 in 925ff67
|
I like the idea of bringing this to slack, though we can probably get away with validating on mouse down of the container that holds the sign in buttons, no? I wonder if the event bubbles up from the google icon to the container? (if that makes sense) |
@dukenv0307 can you do that? |
@aimane-chnaif Yes, we can do that. Updated with @Beamanator's suggestion and tested. |
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.
A few little changes before we move forward
Code is looking pretty good to me, though I'm not sure why the PR Reviewer Checklist is failing.. Seems like a bug since it looks like it got updated recently. @aimane-chnaif will you please do a final retest before we move forward? |
Input is not blurred when click area between social login icons. Hope this wouldn't be considered as "bug" Screen.Recording.2023-11-13.at.3.07.11.PM.mov |
@aimane-chnaif Updated to fix this case. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
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.
LGTM 🎉
@Beamanator all yours
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.
LGTM (one tiny comment copy change can be done later)
setFormError('common.pleaseEnterEmailOrPhoneNumber'); | ||
return; | ||
// For native, the single input doesn't lost focus when we click outside. | ||
// So we need to change firstBlurred here to make the validate function is called whenever the text input is changed after the first validation. |
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.
// So we need to change firstBlurred here to make the validate function is called whenever the text input is changed after the first validation. | |
// So we need to change firstBlurred here to make sure the validate function is called whenever the text input is changed after the first validation. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This is working locally, but not working as expected on staging: #31413 (yes, this was already deployed to staging. Due to a problem with our deploy code it's just missing its deploy comment) |
We specifically fixed that bug during PR review. Here's relevant code: No idea why doesn't work on staging. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.0-3 🚀
|
Details
Validate login form whever the input is changed
Fixed Issues
$ #29640
PROPOSAL: #29640 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2023-11-01.at.14.26.22.mov
Android: mWeb Chrome
Screen.Recording.2023-11-01.at.14.20.51.mov
iOS: Native
Screen.Recording.2023-11-01.at.14.24.31.mov
iOS: mWeb Safari
Screen.Recording.2023-11-01.at.14.22.10.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-01.at.14.17.59.mp4
MacOS: Desktop
Screen.Recording.2023-11-01.at.14.30.13.mov