-
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 user is navigated to IOU report when dismissing receipt modal with ESC key #41472
Fix user is navigated to IOU report when dismissing receipt modal with ESC key #41472
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] |
src/libs/actions/Modal.ts
Outdated
@@ -85,4 +85,8 @@ function willAlertModalBecomeVisible(isVisible: boolean, isPopover = false) { | |||
Onyx.merge(ONYXKEYS.MODAL, {willAlertModalBecomeVisible: isVisible, isPopover}); | |||
} | |||
|
|||
export {setCloseModal, close, onModalDidClose, setModalVisibility, willAlertModalBecomeVisible, setDisableDismissOnEscape, closeTop}; | |||
function getModalVisibleCount() { |
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.
I propose we call this something like allModalsHidden
and make it return closeModals.length === 0, since we don't care about the number of visible modals, all we care about is whether there's at least one modal visible
Also please add a comment explaining what this function does
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.
Good idea, but I prefer to not give it a comment since the name itself is already self-explanatory.
Reviewer Checklist
Screenshots/VideosAndroid: Native24-05-07-21-24-43.mp4Android: mWeb ChromeScreen.Recording.2024-05-07.at.21.27.05.moviOS: NativeScreen.Recording.2024-05-07.at.21.26.43.moviOS: mWeb SafariScreen.Recording.2024-05-07.at.21.21.30.movMacOS: Chrome / SafariScreen.Recording.2024-05-07.at.21.12.22.movMacOS: DesktopScreen.Recording.2024-05-07.at.21.13.01.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!
✋ 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/marcochavezf in version: 1.4.73-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.73-7 🚀
|
Details
When we close the 3-dot menu in receipt page, it will set the modal visibility to false. If we close the receipt modal with an ESC key, it will navigate the user back to the IOU report. This PR fix it.
Fixed Issues
$ #40801
PROPOSAL: #40801 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Screen.Recording.2024-05-02.at.11.06.13.mov
Android: mWeb Chrome
Screen.Recording.2024-05-02.at.11.10.48.mov
iOS: Native
Screen.Recording.2024-05-02.at.11.07.16.mov
iOS: mWeb Safari
Screen.Recording.2024-05-02.at.11.04.15.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-02.at.11.02.06.mov
MacOS: Desktop
Screen.Recording.2024-05-02.at.11.03.00.mov