-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] add timeout to Form's onBlur method to prevent focus losing when toggling checkboxes #16444
Conversation
…n toggling checkboxes
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@luacmartins @rushatgabhane One of you needs to 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] |
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
@rushatgabhane could you complete the reviewer checklist please? |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-03-24.at.21.51.55.movMobile Web - ChromeScreen.Recording.2023-03-24.at.21.54.51.movMobile Web - SafariScreen.Recording.2023-03-24.at.21.55.57.movDesktopScreen.Recording.2023-03-24.at.21.53.37.moviOSScreen.Recording.2023-03-24.at.21.49.50.movAndroidScreen.Recording.2023-03-24.at.21.48.55.mov |
@ArekChr I don't think the delay is enough - Screen.Recording.2023-03-24.at.20.33.13.mov |
150ms delay works for me @ArekChr |
Hi @rushatgabhane , 100ms works fine for me but maybe we should increase to 150ms like you said or even 200ms to have a safer margin. I made some videos so we can compare: 100ms Screen.Recording.2023-03-24.at.15.15.10.mov150ms Screen.Recording.2023-03-24.at.15.15.39.mov200ms Screen.Recording.2023-03-24.at.15.16.07.movWDYT? |
This comment was marked as outdated.
This comment was marked as outdated.
200ms feels a little bit too slow? Maybe it's just the dev environment on Android because 200ms looks good on web. 200ms androidScreen.Recording.2023-03-24.at.20.58.54.mov200ms webScreen.Recording.2023-03-24.at.21.01.30.mov |
@ArekChr I like 200ms because it feels nicer on web. But I'll let you make the call between 150ms and 200ms. |
Hey @rushatgabhane, I think you are tagging me by mistake instead of tagging @fabioh8010 |
thanks and sorry. i looked at the reviewer list 🤦 |
cc: @fabioh8010 |
@rushatgabhane Android builds in DEV environment are quite slower, specially timeouts. Also as it is a emulator, it can be slower or faster depending on the machine. You can try open the RN DevMenu, click Settings and then disable JS Dev Mode and enable JS Minify. It will become closer to the Release environment and you should notice gains in performance during the tests. I suggest we go with 200ms, tested here and seems fine. |
@fabioh8010 that makes sense to me. Thanks for the JS minify trick. Agree! 200ms 🚀 |
0150666
@rushatgabhane PR updated! |
@luacmartins LGTM! thanks for the quick changes @fabioh8010 🚀 |
Changes look good, but tests are failing with an expired certificate. I'll check with the team and try to get that sorted out! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.2.90-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.90-7 🚀
|
Details
This PR aims to add a timeout to Form's
onBlur()
method in order to prevent Checkbox focus loss when the user are focusing a TextInput and proceeds to toggle a CheckBox in web and mobile web.Fixed Issues
$ #13623
PROPOSAL: #13623 (comment)
Tests
Offline tests
Same as above.
QA Steps
Same as above.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)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
Web
Screen.Recording.2023-03-23.at.12.29.00.mov
Screen.Recording.2023-03-23.at.12.30.19.mov
Mobile Web - Chrome
Screen.Recording.2023-03-23.at.12.32.58.mov
Mobile Web - Safari
Screen.Recording.2023-03-23.at.12.33.38.mov
Desktop
Screen.Recording.2023-03-23.at.12.31.00.mov
iOS
Screen.Recording.2023-03-23.at.12.31.32.mov
Android
Screen.Recording.2023-03-23.at.12.31.54.mov