fix: Card details are not hidden when revealing card details and reopening card details - #76538
Conversation
|
@ikevin127 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-hybrid.mp4Android: mWeb Chromeandroid-mweb.mp4iOS: HybridAppios-hybrid.moviOS: mWeb Safariios-mweb.movMacOS: Chrome / Safariweb.mov |
Awaiting for this issue to be addressed in order to be able to test the fix. @samranahm Please let me know in case the issue is fixed in the meantime, you updated the checklist and I did not get the notification. In the meantime you can add |
|
Sure @ikevin127, I'll let you know once the issue resolved. |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Product changes look good. Let's hide those card details appropriately!
|
Holding this due to https://github.com/Expensify/Expensify/issues/572618, slack thread here. |
|
Same ^ |
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix an issue where card details remain visible when revealing card details and then reopening the card details page. The implementation replaces the useBeforeRemove hook with useFocusEffect to reset card details when navigating away from the page.
Key Changes:
- Replaced
useBeforeRemovehook withuseFocusEffectfor resetting card details - Updated import statements to include
useFocusEffectanduseCallbackfrom React Navigation and React respectively - Removed the
useBeforeRemoveimport as it's no longer used
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ikevin127 PR ready for review. |
MarioExpensify
left a comment
There was a problem hiding this comment.
Awesome, thank you!
|
✋ 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/MarioExpensify in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.2.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.84-8 🚀
|
Explanation of Change
Fixed Issues
$ #75148
PROPOSAL: #75148 (comment)
Tests
Precondition: Have assigned virtual Expensify card
Offline tests
QA Steps
Same as test
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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.mov
Android: mWeb Chrome
Android.mWeb.Chrome.mov
iOS: Native
IOS.Native.mov
iOS: mWeb Safari
IOS.mWeb.Safari.mov
MacOS: Chrome / Safari
macOS.chrome.mov