Fix applied filters are in empty state after resetting filters and closing RHP without saving it#78293
Fix applied filters are in empty state after resetting filters and closing RHP without saving it#78293
Conversation
|
@thesahindia @luacmartins One of you needs to 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❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb Chrome78293_android_web.moviOS: HybridApp78293_ios_native.moviOS: mWeb Safari78293_ios_web.movMacOS: Chrome / Safari78293_web_chrome.mov |
@JS00001 do you think we managed to cover the code test? Thanks. |
|
I think that this one is fine @brunovjk since it wasn't a logic change, but just adding a click handler to a button |
|
Thanks |
|
@chuckdries 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] |
There was a problem hiding this comment.
Looks good to me. Reviewer checklist completed above. I don't know why this PR has so many review requests on it though
|
✋ 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/JS00001 in version: 9.2.89-1 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.2.89-6 🚀
|
| const dateFilterKey = DATE_FILTER_KEYS.find((dateKey) => key === dateKey); | ||
| if (dateFilterKey) { | ||
| return filterFormValues[`${dateFilterKey}On`] ?? filterFormValues[`${dateFilterKey}After`] ?? filterFormValues[`${dateFilterKey}Before`]; | ||
| return searchAdvancedFiltersForm[`${dateFilterKey}On`] ?? searchAdvancedFiltersForm[`${dateFilterKey}After`] ?? searchAdvancedFiltersForm[`${dateFilterKey}Before`]; |
Explanation of Change
Add back the logic to set the filter form to the stored value when opening the RHP
Fixed Issues
$ #77992
Tests
Go to staging.new.expensify.com
Go to Reports > Expenses.
Click Filters.
Click From.
Select any user > Save.
Click View results.
Click Filters.
Click Reset filters.
Close the RHP without saving it.
Click Reset filters.
From filter should remain applied and Reset filters button will appear because user did not click View results after resetting filters.
Offline tests
N/A
QA Steps
Same as tests
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari