fix: correct go back behaviour for workspace list page - #59874
Conversation
|
@rushatgabhane 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] |
|
reviewing |
|
@daledah could you please fix the conflicts in the meantime, ty! |
|
@rushatgabhane I updated. |
|
Oops just realized there's a new Lint rule. |
|
thanks for taking care of it : ) |
| const [formState] = useOnyx(ONYXKEYS.FORMS.NEW_ROOM_FORM, {initWithStoredValues: false}); | ||
| const [session] = useOnyx(ONYXKEYS.SESSION); | ||
| const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID); | ||
| const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false}); |
There was a problem hiding this comment.
@daledah could you please set all of them to true
https://expensify.slack.com/archives/C01GTK53T8Q/p1744885971100709
| const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false}); | |
| const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true}); |
There was a problem hiding this comment.
I think from this point:
if the component calling this is the one loading the data by calling an action, then you should set this to
true. If the component calling this does not load the data then you should set it to false
WorkspaceNewRoomPage doesn't "load" the data, because we don't call any APIs when opening this page, so here I think setting it to false is correct.
There was a problem hiding this comment.
cool, let's make it all false then
There was a problem hiding this comment.
I'll update activePolicyID. For the newRoomForm, its value can be missing when opening room page. We only set its value when submitting here:
There was a problem hiding this comment.
Actually we set newRoomForm on mount here:
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 114 to 116 in 717b77a
And I tried canBeMissing to false for this entry and didn't receive any alerts so I think it's safe? I'm not so sure anymore 😂
rushatgabhane
left a comment
There was a problem hiding this comment.
@daledah do you know what could be causing the screen flicker when going back to not found workspace page?
Screen.Recording.2025-04-17.at.13.28.50.mov
Not sure with this one yet, let me take a look. It happens on staging as well. |
|
yeah it'll be great if we can fix that, the flicker isn't ideal. btw, how to reproduct the flicker on staging? |
The bug is not very noticeable in staging, I used an older laptop and can reproduce it. |
|
Still looking, but I think it's a bug in the New room page itself and not related to changes in this PR. |
could you please help me repro this? i want to confirm that it is not related to this PR, then we can merge this PR |
|
i hope that makes sense |
|
Reproduced in staging: Screen.Recording.2025-04-25.at.14.34.22.movThe effect is much more visible with slower devices. |
|
I think it might be related to Tab Navigator in this page. |
|
@rushatgabhane What's the next step here? |
|
@daledah i will be approving the PR today |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2025-05-06.at.02.24.58.moviOS: mWeb SafariScreen.Recording.2025-05-06.at.02.26.12.movMacOS: Chrome / SafariScreen.Recording.2025-05-06.at.02.23.13.movMacOS: Desktop |
|
✋ 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/deetergp in version: 9.1.41-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.1.41-1 🚀
|

Explanation of Change
Fixed Issues
$ #59686
PROPOSAL: #59686 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.2025-04-09.at.13.45.15.mov
Android: mWeb Chrome
Screen.Recording.2025-04-09.at.13.48.18.mov
iOS: Native
Screen.Recording.2025-04-09.at.13.48.56.mov
iOS: mWeb Safari
Screen.Recording.2025-04-09.at.13.49.21.mov
MacOS: Chrome / Safari
Screen.Recording.2025-04-09.at.13.49.50.mov
MacOS: Desktop
Screen.Recording.2025-04-09.at.13.50.10.mov