-
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
Allow bubbling Enter key press event on Button #28374
Allow bubbling Enter key press event on Button #28374
Conversation
@eVoloshchak 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] |
I am seeing a full screen loader on Manual Tab on Desktop. Seems like a bug on main. |
The settlement button is not rendered on any screen. How can I test this? Also, can you please clarify what changes you are expecting on this? |
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.
The settlement button is not rendered on any screen
Apologies @parasharrajat, it should be ButtonWithDropdownMenu (though I suppose SettlementButton
would need the same fix too)
Also, can you please clarify what changes you are expecting on this?
I expect to be able to submit the distance request by pressing enter (the last step, MoneyRequestConfirmPage)
Screen.Recording.2023-09-28.at.12.47.08.mov
Question: Why press enter was disabled on the Confirm button? Did we face any issue earlier so we disabled it?
I found out that simply passing pressonEnter prop was enough. Why did you think that same solution could be applied there? it will be great to know the context. I'll leave the Settlement button for now as this page is disabled and has not updated for a long time. Though added it to ButtonWithDropdownMenu. Since so much has changed about requesting money, I think it is better to not touch it for now. Secondly, I won't have enough time to test it and follow up if you find any issues. I won't be available from tomorrow for a few days. @eVoloshchak Can you please confirm these quickly so that I can wrap this up? Thanks. I won't be available from tomorrow for a few days. |
I went through the history of changes and it never had a
By 'the same fix' I meant being able to confirm it with enter, not necessarily button with bubbling. If we can achieve the same result with only
Yes, completely agree with this cc: @parasharrajat |
@eVoloshchak Ready for review. I am facing Android build issues. I think I won't be able to add screenshots for it ATM. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-09-30.at.12.33.14.movMobile Web - ChromeScreen.Recording.2023-09-30.at.13.16.41.movMobile Web - SafariScreen.Recording.2023-09-30.at.13.06.01.movDesktopScreen.Recording.2023-09-30.at.13.11.33.moviOSScreen.Recording.2023-09-30.at.13.03.27.movAndroidScreen.Recording.2023-09-30.at.13.28.03.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
I'm getting mixed results on mobile, however
- I can't connect a real external keyboard to the phone at the moment, so testing with hardware keyboard passthrough on emulators
- I don't think we fully support keyboard navigation on mobile devices (please correct me if I'm wrong)
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.
Generally everything looks good 👍
✋ 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/johnmlee101 in version: 1.3.76-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
🚀 Deployed to staging by https://github.com/johnmlee101 in version: 1.3.77-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀
|
We found out that this PR caused an unexpected bug #29051. When two pages the stacked on the web the focused navigation state of the hidden page switched to true immediately after pressing back while the single Enter key event was bubbling. Due to this, it triggers an event on two pages. |
Details
Fixed Issues
$ #28022
PROPOSAL: #28022 (comment)
Tests
Test 1
Test 2
Offline tests
QA Steps
Same as Tests.
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)/** 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-09-29.at.6.29.44.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-09-29.at.6.31.36.PM.mov
Mobile Web - Safari
Screen.Recording.2023-09-29.at.6.35.48.PM.mov
Desktop
Screen.Recording.2023-09-29.at.6.38.20.PM.mov
iOS
Screen.Recording.2023-09-29.at.6.36.47.PM.mov
Android