You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-07-04] Bring design patterns inline for all search filters #64021
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
We recently introduced two types of search filters. The first is "pop-over" filters, which live above the search results on the Reports page. The second kind of filter are "UI" filters, which are accessed when clicking on Filters.
Scope of changes
We'd like to extend the newer design patterns introduced with the "pop-over" filters, and make sure that every filter in Filters works exactly the same.
What this means in practice is:
Single-select
All single select UI filters should look like this.
functionSearchFiltersToPage(){// or SearchFiltersFromPage
...
const[selectedAccountIDs,setSelectedAccountIDs]=useState<string[]>(searchAdvancedFiltersForm?.to??[]);// change to searchAdvancedFiltersForm?.from ?? [] for SearchFiltersFromPageconstupdateSelectedAccountIDs=useCallback((accountIDs: string[])=>{setSelectedAccountIDs(accountIDs);},[]);constresetChanges=useCallback(()=>{setSelectedAccountIDs([]);},[]);constapplyChanges=useCallback(()=>{updateAdvancedFilters({to: selectedAccountIDs.length ? selectedAccountIDs : null});// change "to" to "from" for SearchFiltersFromPageNavigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS);},[selectedAccountIDs]);return(<ScreenWrappertestID={SearchFiltersToPage.displayName}// SearchFiltersToPage.displayName for SearchFiltersFromPage...><HeaderWithBackButtontitle={translate('common.to')}// 'common.from' for SearchFiltersFromPageonBackButtonPress={()=>{Navigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS);}}/><Viewstyle={[styles.flex1]}><SearchFiltersParticipantsSelectorinitialAccountIDs={searchAdvancedFiltersForm?.to??[]}// change to searchAdvancedFiltersForm?.from ?? [] for SearchFiltersFromPageonFiltersUpdate={updateSelectedAccountIDs}/></View><FixedFooterstyle={styles.mtAuto}><Button...text={translate('common.reset')}onPress={resetChanges}/><Button...successtext={translate('common.save')}onPress={applyChanges}/></FixedFooter></ScreenWrapper>);}
functionSearchDateFilterBase({dateKey, titleKey}: SearchDateFilterBaseProps){const[searchAdvancedFiltersForm]=useOnyx(ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM,{canBeMissing: true});const[view,setView]=useState<SearchDateModifier|null>(null);const[localDateValues,setLocalDateValues]=useState<SearchFiltersExportedPageValues>({After: searchAdvancedFiltersForm?.[`${dateKey}${CONST.SEARCH.DATE_MODIFIERS.AFTER}`]??null,Before: searchAdvancedFiltersForm?.[`${dateKey}${CONST.SEARCH.DATE_MODIFIERS.BEFORE}`]??null,On: searchAdvancedFiltersForm?.[`${dateKey}${CONST.SEARCH.DATE_MODIFIERS.ON}`]??null,});constsetDateValue=(key: SearchDateModifier,dateValue: string|null)=>{setLocalDateValues((currentValue)=>{return{
...currentValue,[key]: dateValue,};});};constnavigateToRootView=useCallback(()=>{setView(null);},[setView]);constresetChanges=useCallback(()=>{// Reset each field back to nullsetLocalDateValues((prev)=>{returnObject.fromEntries(Object.entries(prev).map(([key])=>[key,null]));});},[setLocalDateValues]);constapplyChanges=useCallback(()=>{updateAdvancedFilters({[`${dateKey}${CONST.SEARCH.DATE_MODIFIERS.ON}`]: localDateValues?.[CONST.SEARCH.DATE_MODIFIERS.ON],[`${dateKey}${CONST.SEARCH.DATE_MODIFIERS.AFTER}`]: localDateValues?.[CONST.SEARCH.DATE_MODIFIERS.AFTER],[`${dateKey}${CONST.SEARCH.DATE_MODIFIERS.BEFORE}`]: localDateValues?.[CONST.SEARCH.DATE_MODIFIERS.BEFORE],});Navigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS);},[dateKey,localDateValues]);if(!view){return(<SearchFiltersDateRootViewtitle={translate('titleKey')}value={localDateValues}setView={setView}setValue={setDateValue}applyChanges={applyChanges}resetChanges={resetChanges}/>);}return(<SearchFiltersDateCalendarViewview={view}value={localDateValues[view]}setValue={setDateValue}navigateBack={navigateToRootView}/>);}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
New feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
I'm not sure that tests are needed here since these are UI updates
and part of a project
But ....
Regression Test Proposal
Test:
Navigate to the search page.
Open the Filters modal.
Verify the Assignee, To, and From filters use the updated design.
Verify that the "Reset" button unchecks all selected users.
Verify that changing the From filter in the filters bar also updates the From filter in the filters list, and vice versa.
Verify that the Date, Approved date, Paid date, and Submitted date filters use the updated design.
Verify the "Reset" button in the calendar view only unsets the value for the selected modifier (i.e. After, Before, or On).
Verify the "Reset" button in the root filter view unsets the value for all modifiers (i.e. After, Before, and On).
Verify that changing the Date filter in the filters bar also updates the Date filter in the filters list, and vice versa.
Verify that the Billable and Reimbursable filters use the updated design.
Verify that the Card, Category, Currency, Expense type, and Tag filters use the updated design.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jun 11, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (
External)melvin-bot commentedon Jun 11, 2025
Current assignee @JmillsExpensify is eligible for the Bug assigner, not assigning anyone new.
sofi-a commentedon Jun 11, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-06-11 23:31:46 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Bring design patterns inline for all search filters
What is the root cause of that problem?
New feature request
What changes do you think we should make in order to solve the problem?
MultiSelectMembersListIteminsrc/componentsfor rendering a list of user avatars with checkboxes like in the design.src/components/Search/SearchFiltersParticipantsSelectorto useMultiSelectMembersListItem.SearchFiltersToPageandSearchFiltersFromPagepages to match the new design.SearchFiltersDateRootViewinsrc/pages/Search/SearchAdvancedFiltersPage/SearchDateFilterBase/RootView.tsxSearchFiltersDateCalendarViewinsrc/pages/Search/SearchAdvancedFiltersPage/SearchDateFilterBase/CalendarView.tsxSearchDateFilterBasetosrc/components/Search/SearchDateFilterBase/index.tsxand update it to match the new design.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
N/A
sofi-a commentedon Jun 11, 2025
@JmillsExpensify I'd like to take this one since I'm already working on #63152.
ZhenjaHorbach commentedon Jun 11, 2025
Sorry
But I don't see any details in your proposal 😅
sofi-a commentedon Jun 12, 2025
Updated proposal.
ZhenjaHorbach commentedon Jun 12, 2025
Okay
Now it looks solid
Thanks !
In this case I don't mind to go with this proposal !
🎀 👀 🎀 C+ reviewed !
19 remaining items
ZhenjaHorbach commentedon Jul 3, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
New feature
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
I'm not sure that tests are needed here since these are UI updates
and part of a project
But ....
Regression Test Proposal
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Jul 4, 2025
Payment Summary
Upwork Job
BugZero Checklist (@JmillsExpensify)
melvin-bot commentedon Jul 7, 2025
@JmillsExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
ZhenjaHorbach commentedon Jul 7, 2025
Not overdue
We are ready for payment !
JmillsExpensify commentedon Jul 9, 2025
Back from OOO. Payment summary as follows:
JmillsExpensify commentedon Jul 9, 2025
Upwork offer sent and regression steps added.
ZhenjaHorbach commentedon Jul 9, 2025
Requested in ND
JmillsExpensify commentedon Jul 9, 2025
Awesome, also paid out Upwork contract, so closing this one out.
garrettmknight commentedon Jul 21, 2025
$250 approved for @ZhenjaHorbach