-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Web - Persistence of Tax Selection When Navigating to Other Pages and Returning #40136
fix: Web - Persistence of Tax Selection When Navigating to Other Pages and Returning #40136
Conversation
…s and Returning Signed-off-by: Krishna Gupta <[email protected]>
useFocusEffect( | ||
useCallback(() => { | ||
setSelectedTags({}); | ||
fetchTags(); | ||
}, [fetchTags]), | ||
); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@s77rt, updated, can you pls check again🙏🏻
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) |
@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! |
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.
🟢
🚀 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
,Tags
andTaxes
repeat step 3, 4 & 5Offline tests
Distance rates
,Categories
,Tags
,Taxes
).thead
.Distance rates
,Categories
,Tags
,Taxes
) and comeback.Distance rates
,Categories
,Tags
andTaxes
repeat step 3, 4 & 5QA Steps
Distance rates
,Categories
,Tags
,Taxes
).thead
.Distance rates
,Categories
,Tags
,Taxes
) and comeback.Distance rates
,Categories
,Tags
andTaxes
repeat step 3, 4 & 5PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
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