-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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: dont pop RHP when shortcuts modal is open #21114
fix: dont pop RHP when shortcuts modal is open #21114
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] |
SidebarLinks is fine for now as no modals in login pages but isn't it better to move this to Expensify.js? similar to KeyboardShortcutsModal |
Nvm, RHP is only after login and SidebarLinks should always be mounted if RHP is shown @WoLewicki please add Tests step |
Added test step |
Mobile Chrome bug: ESC closes RHP instead of shortcut modal. mchrome.mov |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSAndroid |
Hmm seems like this check https://github.com/Expensify/App/pull/21114/files#diff-dd7de4cc8cf99cd14ad8b5168c24c75a12d25aca423502eaaaccedd71c31cb1cR132 is not true there for some reason. So it only happens on mobile chrome? That seems even weirder. |
yes correct. |
We can check to be sure that this check if wrong for some reason and debug why it happens, but since you need an external keyboard to be able to reproduce it, it doesn't seem like an urgent issue. I am on chrome on my laptop and it works just ok here, so it seems to be connected to the mobile chrome only. |
You can still easily test on android emulator, iOS simulator as hardware keyboard is connected already. |
Does it work fine in chrome if you change the layout to mobile width? |
yes fine |
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.
Alright, thanks everyone. In that case I think we can go ahead and @aimane-chnaif I will create a new bug for this to investigate as part of the navigation refactor follow-ups. Actually I think this is not really required. This is edge case and I am not sure if we support the keyboard events on mobile.
✋ 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/mountiny in version: 1.3.30-0 🚀
|
yes we do. This feature was implemented for $40k in #6883 |
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.30-5 🚀
|
@aimane-chnaif hah you are right, if this has not been raised yet, do you want to raise it as a bug in the bugs channel? |
Details
PR moving the
esc
shortcut support toSidebarLinks
since we want this listener to be added only once, and earlier it was inScreenWrapper
, so it was added each time we pushed a new report. It resulted in firing the callback andNavigation.dismissModal();
for each of those reports instead of only once.Fixed Issues
$ #20615
Tests
Offline tests
QA Steps
Settings
CMD+J
to open modalEsc
and see that only modal is dismissed andSettings
are still therePR 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
Only including screenshots for web as that is where the ESC shortcut is used and its same as desktop
Web
Nagranie.z.ekranu.2023-06-20.o.14.42.46.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android