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-06-27] [Due for payment 2025-06-25] [Suggested Search V1] Add Status and Type filters to Filters list. #63152
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're on the cusp of adding dedicated "exposed filters for Type and Status as part of the broader "Suggested Search" project.
Problem
These same filters don't appear in Filters, which is confusing given that Filters is designed to be a full list of all possible filters.
Solution
For consistency, let's add both Type and Status to Filters. In fact, this was previously considered in #61235, though it was deemed out of scope since our "exposed filter" patterns were still in planning.
Some additional notes on design spec:
If a user selects Type > Trip in the exposed filters and then clicks on Filters, the Trip filter should show the same selection.
The same is true in reverse. If a user selects Type > TripinFiltersand tapsView results, then the exposed filter for Type` above the search table should show the same.
Type always appears at the top of the General section in Filters, as the type dictates what filters are visible.
The rest of the existing General filters are alphabetical, and it's fine to keep showing them in that order (e.g. Status appears below Has keywords and above To.
Type is a single-select filter. The patterns are the same as an exposed filter and in Filters.
Status is a multi-select filter.T he patterns are the same as an exposed filter and in Filters, though in Filters the Unreported option is always shown.
Create a new component SearchFiltersStatusPage inside src/pages/Search/SearchAdvancedFiltersPage.
The main difference from SearchFiltersTypePage is that SearchFiltersStatusPage uses MultipSelectListItem.
updateSelectedItems, resetChanges, and applyChanges are defined as follows:
constupdateSelectedItems=useCallback((item: ListItem)=>{if(item.isSelected){setSelectedItems(selectedItems.filter((i)=>i!==item.keyForList));return;}// If the user selects "All", reset selected itemsif(item.keyForList===CONST.SEARCH.STATUS.EXPENSE.ALL){setSelectedItems([CONST.SEARCH.STATUS.EXPENSE.ALL]);return;}constitems=Object.values(CONST.SEARCH.STATUS[currentType]);constnewItem=items.find((i)=>i===item.keyForList);if(newItem){// If the user selects a specific status, ensure "All" is not selectedsetSelectedItems([...selectedItems.filter((i)=>i!==CONST.SEARCH.STATUS.EXPENSE.ALL),newItem]);}},[currentType,selectedItems],);
constresetChanges=useCallback(()=>{setSelectedItems([]);// Also possible to default to CONST.SEARCH.STATUS.EXPENSE.ALL},[]);
@sofi-a The big change for this involves a new UI pattern for type and status. Lets wait for #62851 to merge, You can then reuse SingleSelectListItem and MultiSelectListItem, which were created there. However, the new patterns are probably the biggest change of this. We want to make components that can be implemented overtime for all of the other advanced filters, so we need to create a reusable advanced search filter pattern.
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 May 30, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (
External)melvin-bot commentedon May 30, 2025
Current assignee @JmillsExpensify is eligible for the Bug assigner, not assigning anyone new.
sofi-a commentedon May 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Add Status and Type filters to Filters list
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?
ROUTES.tsSCREENS.tslinkingConfig/config.tsSearchFiltersTypePageinsidesrc/pages/Search/SearchAdvancedFiltersPage.Where
listData,updateSelectedItem,resetChanges, andapplyChangesare defined as follows:SearchFiltersStatusPageinsidesrc/pages/Search/SearchAdvancedFiltersPage.The main difference from
SearchFiltersTypePageis thatSearchFiltersStatusPageusesMultipSelectListItem.The list of statuses to be displayed depends on the selected
Typein the filter. Hence,listDatais defined as followsupdateSelectedItems,resetChanges, andapplyChangesare defined as follows:ModalStackNavigatorsTypeandStatustobaseFilterConfiginAdvancedSearchFilters.CONST.tsunderSEARCH.SYNTAX_FILTER_KEYS.typeFiltersKeysinAdvancedSearchFilters.getFilterDisplayTitlefunction to correctly displayfilter values.filtersto correctly display filter labels.Typefilter appears at the top of theGeneralsection.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
JS00001 commentedon May 30, 2025
@sofi-a The big change for this involves a new UI pattern for type and status. Lets wait for #62851 to merge, You can then reuse SingleSelectListItem and MultiSelectListItem, which were created there. However, the new patterns are probably the biggest change of this. We want to make components that can be implemented overtime for all of the other advanced filters, so we need to create a reusable advanced search filter pattern.
Could you focus more on this in the proposal?
sofi-a commentedon May 30, 2025
@JS00001 Sure, I can base my proposal on the changes introduced in #62851.
sofi-a commentedon Jun 1, 2025
Updated proposal
55 remaining items
melvin-bot commentedon Jul 1, 2025
@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?
JmillsExpensify commentedon Jul 2, 2025
Updated the payment summary
JmillsExpensify commentedon Jul 2, 2025
I'll create the manual offer shortly
JS00001 commentedon Jul 2, 2025
This should be good to close once payment is complete. Everything is deployed!
JmillsExpensify commentedon Jul 2, 2025
@sofi-a I'm not seeing your Upwork information in our records. Do you mind providing a link to your Upwork profile?
JmillsExpensify commentedon Jul 2, 2025
Actually nevermind! I found it via Upwork search.
sofi-a commentedon Jul 2, 2025
Oh okay.
JmillsExpensify commentedon Jul 2, 2025
Yes, all good! Offer is out via Upwork if you are around to accept it.
JmillsExpensify commentedon Jul 2, 2025
$125 approved for @c3024
JmillsExpensify commentedon Jul 2, 2025
All contributors approved/paid out. Closing this one!