Fix: three not found view v2#41665
Conversation
|
@shawnborton @fedirjh One of you needs to 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] |
|
I believe that @situchan should be assigned here, as he was C+ of the original PR. I'm not sure if he is still OOO. |
I think that we discussed it here:
If you meant something else please let me know. |
|
Got it, thanks for confirming 👍 |
|
I am back. There's conflict |
I've resolved the conflict :) |
- }, [canAccessRoute, policy, shouldShowNotFoundPage]);
+ }, [canAccessRoute, shouldShowNotFoundPage]);Is this the main change to fix regression of #40509? |
As far as I remember, yes. We shouldn't call the |
|
Please fix conflict |
Done ✅ |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.movMore tests: 4,5. https://drive.google.com/file/d/1krc0uqKOvbXQu74TsHgYenGqbSmskiQ5/view?usp=sharing |
|
Another conflict |
I think this one was closed. I've pulled the main, but I haven't tested it yet. |
|
@situchan do you think we can proceed with this PR? |
|
Gentle bump @situchan |
|
@kosmydel yes, I think we can proceed. Please mark as ready for review |
|
@situchan I'm marking it as ready for review. FYI I've added a new test step, to test everything without Strict Mode, as this is what will be on production/staging. |
| if (!shouldShowNotFoundPage && canAccessRoute) { | ||
| return; | ||
| } | ||
| if (CONFIG.USE_REACT_STRICT_MODE && wasRendered.current) { |
There was a problem hiding this comment.
I don't like using USE_REACT_STRICT_MODE flag here. It's not used anywhere yet except in StrictModeWrapper.
There was a problem hiding this comment.
@situchan it wasn't necessary in the end, so we've removed it and merged main. If that's everything I think we might proceed with the review.
|
Lint failing |
|
@neil-marcellini @shawnborton would you mind taking a look 🥺 |
|
Happy to review from a design standpoint if there are any updated screenshots available. |
|
@shawnborton In this case, there would be no need for the review. This was only a small change in the code, it shouldn't affect anything in terms of design. @neil-marcellini gentle bump |
neil-marcellini
left a comment
There was a problem hiding this comment.
The code looks fine, and I'll put my trust in @situchan's 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/neil-marcellini in version: 9.0.12-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.12-0 🚀
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.0.13-0 🚀
|
| // We are checking if the user can access the route. | ||
| // If user can't access the route, we are dismissing any modals that are open when the NotFound view is shown | ||
| const canAccessRoute = activeRoute && menuItems.some((item) => item.routeName === activeRoute); | ||
|
|
||
| useEffect(() => { | ||
| if (!shouldShowNotFoundPage && canAccessRoute) { | ||
| return; | ||
| } | ||
| if (wasRendered.current) { | ||
| return; | ||
| } | ||
| wasRendered.current = true; | ||
| // We are dismissing any modals that are open when the NotFound view is shown | ||
| Navigation.isNavigationReady().then(() => { | ||
| Navigation.closeRHPFlow(); | ||
| }); | ||
| }, [canAccessRoute, shouldShowNotFoundPage]); |
There was a problem hiding this comment.
The workspace’s initial route (Workspace_Initial) wasn’t recognized as valid in canAccessRoute, causing premature RHP dismissal. This caused this issue: #53600
More details in this proposal: #53600 (comment)




Details
This is the second version, after the first one PR #36409 was reverted due to the #40509 issue.
This PR addresses three things:
WorkspaceMembersPageto use theWorkspacePageWithSectionscomponent.Fixed Issues
$ #34234
$ #36266
$ #40509
PROPOSAL: N/A
Tests
adb shell am start -a android.intent.action.VIEW -d "new-expensify://settings/workspaces/kjashdjkashdaks/rateandunit"Offline tests
N/A
QA Steps
https://staging.new.expensify.com/settings/workspaces/kjashdjkashdaks/profile)Onyx.set('focusModeNotification', true);in console)CONFIG.tsand setCONFIG.USE_REACT_STRICT_MODEtofalse.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
android.mov
iOS: Native
iOS: mWeb Safari & Android: mWeb Chrome
mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov