Fix not here page shows up briefly when deleting the expense while it is highlighted#56153
Conversation
|
@M00rish something went wrong with your checklist, it looks like you didn't link the issue or your proposal correctly. @tgolen please ignore the call, @roryabraham and I will review it here. Thanks. |
|
OK, I will unassign myself then! |
|
Reviewing in a moment. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chrome56153_android_web.moviOS: Native56153_ios_native.moviOS: mWeb Safari56153_ios_web.movMacOS: Chrome / Safari56153_web_chrome.movMacOS: Desktop56153_web_desktop.mov |
brunovjk
left a comment
There was a problem hiding this comment.
Thank you, @M00rish! I tested #55251, #50120, and #46600, and everything looks good. The fix handles the "Not Here" page issue well in my tests.
@roryabraham, could you confirm if the changes align with your cleanup approach? I tested your suggestion alone, and it does cause some regression related to #50120 and #46600. Also, do you think we should add some JSDoc, or are the added variables clear enough to you? Thank you.
roryabraham
left a comment
There was a problem hiding this comment.
Just curious: if you implement my proposed solution except using useRef instead of useState for isClearingDeletedLinkedAction, do you still see issues?
| ); | ||
| const prevIsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); | ||
|
|
||
| const previsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); |
There was a problem hiding this comment.
| const previsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); | |
| const prevIsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); |
|
|
||
| const lastReportActionIDFromRoute = usePrevious(reportActionIDFromRoute); | ||
|
|
||
| const [isNavigatingToAction, setIsNavigatingToAction] = useState(false); |
There was a problem hiding this comment.
isNavigatingToAction sounds more broad than it really is I think? it's only true if we're navigating to a deleted action. So I think a more accurate variable name would be isNavigatingToDeletedAction
There was a problem hiding this comment.
you're right, it's updated to isNavigatingToDeletedAction, makes more sense.
|
✋ 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/roryabraham in version: 9.0.95-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.95-6 🚀
|
Explanation of Change
we're replacing
isLinkedActionBecomesDeletedlogic in reportScreen.tsx, that was added to fix these issues : #50120 and #46600after adding a fix based on this comment, that fixed it for the not found page blinking problem but not for the other one when user click a deleted action link in this case not found page does not show.
after little bit of testing, I think the most optimal approach here is to check if user is navigating directly to a deleted action only then we show the not found page, basically we want distinguish between user navigating normally to a message and a delete action behavior, where we have last reportActionID param and current param as the same.
and this fixes all three of these issues.
having some issues with mobile testing setup, in the meantime I hope to have your feedback on this.
@roryabraham @brunovjk
thanks.
Fixed Issues
$ #55251
PROPOSAL:
Proposal
Tests
Offline tests
same as above
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
Android_native.mp4
Android: mWeb Chrome
Androidweb.mp4
iOS: Native
IOS.mp4
iOS: mWeb Safari
IOSweb.mp4
MacOS: Chrome / Safari
bandicam.2025-02-02.20-57-41-084.mp4
MacOS: Desktop
Desktop.mp4