Consistent back navigation from workspace pages#81535
Conversation
|
@WojtekBoman Can move #72081 to the first of Fixed Issues on your author checlist so it will request the correct reviewer once you mark it as ready? |
Sure! Thanks for noticing that! |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@hungvu193 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] |
There was a problem hiding this comment.
💡 Codex Review
App/src/pages/workspace/WorkspaceMembersPage.tsx
Lines 811 to 816 in 9266f1d
In WorkspaceMembersPage, the header back button now relies on WorkspacePageWithSections' default handler because no onBackButtonPress is passed. That handler always navigates away (pop to sidebar / goBack), so on iOS/web (and Android UI back arrow) a user in mobile selection mode will be navigated off the page instead of clearing the selection and staying put. The Android hardware back path is still covered by useSearchBackPress, but the header back path is no longer, which is a regression from the prior inline handler that cleared selection first.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
9266f1d to
1efea7c
Compare
|
@WojtekBoman Do you think we should also fix the case for the Accounting page as well? Screen.Recording.2026-02-09.at.13.46.17.mov |
Definitely! Thanks for pointing this out :) |
trjExpensify
left a comment
There was a problem hiding this comment.
PR for a coordinated project cleaning up back button logic. 👍
33057c2 to
cff06e7
Compare
a0e8a12 to
89e5a38
Compare
|
@hungvu193 It should be ready now and all cases have been covered 🫡 |
|
Thank you 🙏 I'll be reviewing again |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-09.at.13.39.02.movScreen.Recording.2026-02-09.at.13.40.27.movScreen.Recording.2026-02-09.at.13.44.32.movAndroid: mWeb Chrome72081.-.Android.moviOS: HybridAppScreen.Recording.2026-02-10.at.00.39.15.moviOS: mWeb SafariScreen.Recording.2026-02-10.at.00.35.15.movMacOS: Chrome / SafariScreen.Recording.2026-02-09.at.13.18.28.mov |
| const lastRoute = navigationRef?.current?.getRootState().routes.at(-1); | ||
|
|
||
| if (!isSplitNavigatorName(lastRoute?.name)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Can we add a comment explaining this extra condition?
| const lastRoute = navigationRef?.current?.getRootState().routes.at(-1); | ||
|
|
||
| if (!isSplitNavigatorName(lastRoute?.name)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Can we add a comment explaining this extra condition?
89e5a38 to
6681c0f
Compare
|
🚧 @arosiclair has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/arosiclair in version: 9.3.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.17-9 🚀
|
Explanation of Change
With changes introduced in this PR,
popToSidebaris called fromNavigation.goBackfunction only ifshouldPopToSidebaristrue. Thanks to that,goBackbehaviour is consistent across all screens fromAccountandWorkspacestabs.Fixed Issues
$ #72081
$ #73091
$ #72559
PROPOSAL:
Tests
Android - Expense - Tapping device back button from workflow directs to workspace page
User not navigated to workspace settings on tapping back button in More features page
Chat - Tapping tapping app's top left arrow navigates to workspace settings
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-02-05.at.14.55.57.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-02-06.at.09.14.47.mov