-
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
Add focus trap to the RHP #24316
Add focus trap to the RHP #24316
Conversation
Created a discussion on slack for this PR. |
Friendly bump, it is ready to review @fedirjh |
cc @kosmydel Reviewing in a few moments. |
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.
cc @kosmydel the code looks solid, I left small comments about props.
Hey @fedirjh, do you have any update for this PR? I've resolved conflicts and merged the main. |
BUG: Deeplink to page within RHP and notice the modal is outlined: CleanShot.2023-08-19.at.12.05.09.mp4 |
@roryabraham |
I think we should hold off on this, more context in the issue |
As stated in the linked issue, I'm going to put this on HOLD for the merge freeze. @kosmydel please take this off HOLD when the merge freeze is lifted |
@kosmydel I think it would be a good time to resolve conflicts here and get this re-tested and back into a mergeable state. |
Hey @roryabraham, I've resolved the conflicts and tested it, it looks like everything works. cc @fedirjh for another look |
@kosmydel I have tested the attachment modal and it seems it has the same bug, can we fix that? Open any attachment then press the space and the report scroll 💥 CleanShot.2023-09-12.at.15.08.31.mp4@roryabraham @kosmydel Unrelated to this PR, I noticed that keyboard navigation is broken in staging and production, I found some bugs that may have been deployed recently : These bugs are recorded in staging Bug 1: When you navigate from the main setting menu to any sub-menu page and then navigate back to the main menu, the menu is disabled
CleanShot.2023-09-12.at.14.34.25.mp4Bug 2: The back button inside
CleanShot.2023-09-12.at.14.35.24.mp4Bug 3: Inside the wallet page, use the CleanShot.2023-09-12.at.14.46.17-converted.mp4 |
Hey @fedirjh, thanks for pointing this out! I've investigated it, and for But it doesn't. Here is my guess what is the reason for it:
So we can fix it without adding another focus trap: we should prevent calling the However, I think that it should be a different issue, as this has a completely different root cause of the problem. cc @roryabraham |
@kosmydel That makes sense, removing that line fixes the issue. However, that line was added to fix this issue #13146 . I totally agree that we should handle it separately. All yours @roryabraham |
I was rather thinking of adding an extra check to this line like this: if (Navigation.isActiveRoute(route)) {
return;
}
Navigation.navigate(route); However, I'm not sure, if this is the best solution. |
✋ 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/roryabraham in version: 1.3.70-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.70-8 🚀
|
Details
Fixed Issues
$ #15631
PROPOSAL: #15631 (comment)
Tests
InitialSettingsPage
), verify that the focus trap works without focusable elements insideOffline tests
Doesn't change anything network-related.
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)/** 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
web-2.mov
Workspace creation:
web-fix.mov
Old version:
https://github.com/Expensify/App/assets/104823336/4521b3e2-b25c-427c-a1e6-5294242e39e1
Mobile Web - Chrome
mWeb-android.mov
Mobile Web - Safari
mWeb-iOS.mp4
Desktop
desktop-2.mov
Workspace creation:
desktop-fix.mov
Old version:
https://github.com/Expensify/App/assets/104823336/43e3570d-5293-4804-890d-c8675f25d934
iOS
iOS.mp4
Android
android.mov