fix: Web - Persistence of Tax Selection When Navigating to Other Pages and Returning#40136
Conversation
…s and Returning Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
| useFocusEffect( | ||
| useCallback(() => { | ||
| setSelectedTags({}); | ||
| fetchTags(); | ||
| }, [fetchTags]), | ||
| ); |
There was a problem hiding this comment.
We should clear the tags when losing focus (instead of when gaining focus) that way we can remove the rest of logic that's used to clear the tags e.g. when navigating to the settings page
(same applies for the rest of the pages)
There was a problem hiding this comment.
Sorry I forgot about that, I was trying to follow this suggestion, but yes, we should clear the options when losing focus.
There was a problem hiding this comment.
@s77rt, updated, can you pls check again🙏🏻
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
|
Looks good to me. Working on the checklist... While we are fixing these bugs please merge main and fix the same for |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb-chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
Let me know once this is resolved #40136 (comment) |
Signed-off-by: Krishna Gupta <belivethatkg@gmail.com>
|
@s77rt, fix for |
|
Thank you! |
|
hellooo thank you for the PR. was there a specific reason you didn't use |
|
@Krishna2323, thank you for the link to the comment. If you return a function from the useFocusEffect(
useCallback(() => () => setCategories([]), [])
); |
|
@hayata-suenaga, thanks for the explanation, will check that soon and update. |
|
@hayata-suenaga The clean up function in |
|
ah I see @s77rt ! thank you for the link! |
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Fixed Issues
$ #39492
PROPOSAL: #39492 (comment)
Tests
Distance rates,Categories,Tags,Taxes).thead.Distance rates,Categories,Tags,Taxes) and comeback.Distance rates,Categories,TagsandTaxesrepeat step 3, 4 & 5Offline tests
Distance rates,Categories,Tags,Taxes).thead.Distance rates,Categories,Tags,Taxes) and comeback.Distance rates,Categories,TagsandTaxesrepeat step 3, 4 & 5QA Steps
Distance rates,Categories,Tags,Taxes).thead.Distance rates,Categories,Tags,Taxes) and comeback.Distance rates,Categories,TagsandTaxesrepeat step 3, 4 & 5PR 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_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4