-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: if you implement my proposed solution except using useRef
instead of useState
for isClearingDeletedLinkedAction
, do you still see issues?
src/pages/home/ReportScreen.tsx
Outdated
@@ -386,7 +386,13 @@ function ReportScreen({route, navigation}: ReportScreenProps) { | |||
() => !!linkedAction && !shouldReportActionBeVisible(linkedAction, linkedAction.reportActionID, canUserPerformWriteAction(report)), | |||
[linkedAction, report], | |||
); | |||
const prevIsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); | |||
|
|||
const previsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const previsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); | |
const prevIsLinkedActionDeleted = usePrevious(linkedAction ? isLinkedActionDeleted : undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
src/pages/home/ReportScreen.tsx
Outdated
|
||
const lastReportActionIDFromRoute = usePrevious(reportActionIDFromRoute); | ||
|
||
const [isNavigatingToAction, setIsNavigatingToAction] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, it's updated to isNavigatingToDeletedAction, makes more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now
✋ 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 🚀
|
Explanation of Change
we're replacing
isLinkedActionBecomesDeleted
logic 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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