Fix showing not found page after deleting a workspace#38488
Fix showing not found page after deleting a workspace#38488pecanoro merged 5 commits intoExpensify:mainfrom
Conversation
|
@jayeshmangwani 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] |
|
@WojtekBoman Please upload Screenshots/Videos for all the platforms |
|
@jayeshmangwani Done :) |
| } | ||
|
|
||
| return (!isEmptyObject(policy) && !PolicyUtils.isPolicyAdmin(policy) && !shouldShowNonAdmin) || PolicyUtils.isPendingDeletePolicy(policy); | ||
| return !isEmptyObject(policy) && !PolicyUtils.isPolicyAdmin(policy) && !shouldShowNonAdmin; |
There was a problem hiding this comment.
This change will cause the regression
- Go to the workspace that we going to delete
- Press Reimbursements > Copy the URL
- Press workspace Profile > Press Delete
- Go to any chat paste the workspace reimbursements URL and send
- Press the link, it will show the reimbursements page and we can edit the Rate
regression.mov
There was a problem hiding this comment.
To understand clearly the output I am attaching staging result.
staging.mov
|
I've tried to reproduce that, but it seems to work fine. Am I doing something wrong? I've noticed on your video that you still have the deleted workspace on the list, for me it disappears right after deletion. I've merged the latest main into this branch, maybe it impacts somehow Screen.Recording.2024-03-20.at.20.59.36.mov |
|
@WojtekBoman can you please try with below steps (I have updated the first step)
|
|
You need to be offline to reproduce this issue |
|
I've added the fix and now it should work fine in offline mode :) There is still one issue with the navigation history after deleting a workspace created from the workspace switcher, but it will no longer appear once I finish fixing this issue Screen.Recording.2024-03-20.at.21.56.47.movIt's also present on the main branch, so I believe we can go further with this |
Thanks for fixing @WojtekBoman ,I also can reproduce this double navigation issue on the main branch double-navigation.mov |
|
@WojtekBoman Can we please update the Tests steps like this:
Note: your attached videos does not reflect the original steps of reproduction steps |
|
@mountiny At the time of testing the PR we're facing another issue and Same issue is happens on staging, so we've not handled this in this PR, steps to reproduce issue
Now we can see a not found page instead of the going back to Home page(Chats) |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid.movAndroid: mWeb ChromemWeb-chrome.moviOS: NativeiOS.moviOS: mWeb SafarimWeb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
You're right, thanks for noticing that! I've already updated the test steps in the description and I'll attach new videos :) |
This issue will be fixed by this PR |
|
✋ 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/pecanoro in version: 1.4.56-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀
|
| } | ||
|
|
||
| return (!isEmptyObject(policy) && !PolicyUtils.isPolicyAdmin(policy) && !shouldShowNonAdmin) || PolicyUtils.isPendingDeletePolicy(policy); | ||
| // We check isPendingDelete for both policy and prevPolicy to prevent the NotFound view from showing right after we delete the workspace |
There was a problem hiding this comment.
coming from #49093, we should use PolicyUtils.shouldShowPolicy to check if workspace is deleted or not, More detaills #49093 (comment)
Details
This PR fixes showing not found page after deleting a workspace.
Fixed Issues
$ #38301 (comment)
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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.2024-03-21.at.15.35.08.mov
Android: mWeb Chrome
Screen.Recording.2024-03-21.at.15.36.51.mov
iOS: Native
Screen.Recording.2024-03-21.at.15.37.38.mov
iOS: mWeb Safari
Screen.Recording.2024-03-21.at.15.33.36.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-21.at.15.31.34.mov
MacOS: Desktop
Screen.Recording.2024-03-21.at.15.32.57.mov