-
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
Workspace - Esc key does not close the opened window when 3 dot menu is open #49802
Comments
Triggered auto assignment to @OfstadC ( |
I could not reproduce this on the latest main branch. |
This issue has been resolved. Please close this one. |
📣 @rijusougata13! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.ESC shortcut doesn't close the Debug modal/page. What is the root cause of that problem?Every modal when mounted will set a "close modal" function that can be used to close the modal. App/src/components/Modal/BaseModal.tsx Lines 107 to 116 in c7ee85b
If we press ESC, Lines 29 to 40 in c7ee85b
Another way for the "close modal" function to be removed is when the modal is unmounted which is shown by the first permalink above. Lines 13 to 24 in c7ee85b
The Debug modal is placed inside a ScreenWrapper, which means every screen has the modal mounted. App/src/components/ScreenWrapper.tsx Line 275 in c7ee85b
In this issue, when we press ESC, the workspace members list page is closed because the App/src/libs/Navigation/AppNavigator/AuthScreens.tsx Lines 318 to 328 in 28bc3cd
But in our case, App/src/components/Modal/BaseModal.tsx Lines 84 to 87 in 28bc3cd
App/src/components/Modal/BaseModal.tsx Lines 104 to 105 in 28bc3cd
In this issue, we first open a popover of the member list and then press the Debug modal shortcut. Sometimes, the Debug modal is shown first which sets the Because of that, pressing the ESC will close the workspace members page which unmounts the Debug modal which removes the "close modal" function from the list, so the ESC shortcut doesn't close the Debug modal because the "close modal" list is now empty. What changes do you think we should make in order to solve the problem?To fix that, we need to wait for any modal to close first before showing the debug modal. App/src/libs/Navigation/AppNavigator/AuthScreens.tsx Lines 378 to 382 in c7ee85b
Also, we can consider moving the Debug modal (TestToolsModal) from ScreenWrapper to AuthScreens. This way, we won't render the modal on every screen. Before: |
This is no longer reproducible - closing |
@OfstadC this is still reproducible |
@OfstadC you missed this step.
web.mp4 |
🤦♀️ |
Thanks @bernhardoj ! |
Ok. Thanks. @bernhardoj's proposal looks good to me. let's make that change. This proposal will also solve #49976 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@OfstadC We are missing the help wanted label. Let's apply that before hiring anyone for automation sake. Thanks. |
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue. |
Current assignee @parasharrajat is eligible for the External assigner, not assigning anyone new. |
Thanks for the review @parasharrajat, assigning @bernhardoj 🚀 |
PR is ready |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.40-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
You might need to repeat step 3-5
Expected Result:
Opened window is dismissed
Actual Result:
Opened window is not dismissed. And page is navigated to workspace page with out dismissing the window
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6615895_1727344310082.Screen_Recording_2024-09-26_at_12.29.17_in_the_afternoon.mp4
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @The text was updated successfully, but these errors were encountered: