-
Notifications
You must be signed in to change notification settings - Fork 3k
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: back button returns to expense report after submitting track expense #53065
base: main
Are you sure you want to change the base?
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] |
friendly bump @eVoloshchak |
src/libs/actions/IOU.ts
Outdated
|
||
const trackReport = Navigation.getPreviousTrackReport(linkedTrackedExpenseReportAction?.childReportID); | ||
if (trackReport?.key) { | ||
Navigation.isNavigationReady().then(() => Navigation.removeScreenByKey(trackReport.key)); |
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.
We're calling isNavigationReady()
twice (first from here and then from inside the removeScreenByKey
method itself). Is this intentional?
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 added the call isNavigationReady
to fix the bug below with browser back button:
Screen.Recording.2025-01-07.at.23.37.22.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.
@eVoloshchak I just updated the function logics, we don't need to use isNavigationReady
here anymore.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@eVoloshchak I updated |
@eVoloshchak bump here |
This is working as expected in the PR branch, but I needed to cherry-pick this to main to test native platforms and it breaks there, navigating to the expense report instead @daledah, could you resolve the conflicts and double-check if this is working for you please? |
Explanation of Change
Fixed Issues
$ #52189
PROPOSAL: #52189 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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-12-04.at.11.39.28.mov
Android: mWeb Chrome
Screen.Recording.2024-12-04.at.11.40.08.mov
iOS: Native
Screen.Recording.2024-12-04.at.11.44.00.mov
iOS: mWeb Safari
Screen.Recording.2024-12-04.at.11.45.16.mov
MacOS: Chrome / Safari
Screen.Recording.2024-12-04.at.11.46.13.mp4
MacOS: Desktop
Screen.Recording.2024-12-04.at.11.50.11.mp4