Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
b5e960d
use the revamped search actions bar
bernhardoj Mar 25, 2026
f51f688
remove group by, limit, view from filters page
bernhardoj Mar 25, 2026
9631205
remove save search from filters page
bernhardoj Mar 25, 2026
c4ae138
remove unnecessary label
bernhardoj Mar 25, 2026
59060f2
add sort order filters menu
bernhardoj Mar 25, 2026
68e2ead
lint
bernhardoj Mar 25, 2026
7b05fde
remov extra padding
bernhardoj Mar 25, 2026
7364505
show all applied date-type filters
bernhardoj Mar 25, 2026
5e319bd
simplify code
bernhardoj Mar 25, 2026
b233138
simplify code
bernhardoj Mar 25, 2026
08a8e56
simplify again
bernhardoj Mar 25, 2026
817c6d5
add more locale
bernhardoj Mar 25, 2026
7d80088
fix test
bernhardoj Mar 25, 2026
80b928a
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Mar 25, 2026
d241817
remove extra padding
bernhardoj Mar 25, 2026
5448ec5
remove unused hook
bernhardoj Mar 25, 2026
7e9a68f
rename
bernhardoj Mar 25, 2026
6cea74d
fix padding
bernhardoj Mar 25, 2026
6204e53
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Mar 26, 2026
1747a0b
update comment
bernhardoj Mar 26, 2026
19e2dbd
refactor to switch case
bernhardoj Mar 26, 2026
1ccbdbb
fix typing
bernhardoj Mar 26, 2026
913a601
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Mar 27, 2026
649451c
fix padding issue
bernhardoj Mar 27, 2026
45048f6
fix alignment issue
bernhardoj Mar 27, 2026
aa6f84f
fix search placeholder in center
bernhardoj Mar 27, 2026
e77f29e
reduce padding
bernhardoj Mar 27, 2026
c1a4281
remove unused style
bernhardoj Mar 27, 2026
b59241f
fix skeleton height
bernhardoj Mar 27, 2026
d05451d
add three dots
bernhardoj Mar 27, 2026
67d93fc
update the font size
bernhardoj Mar 27, 2026
c4b6381
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Mar 30, 2026
554bfd0
move group currency filter to Display dropdown
bernhardoj Mar 30, 2026
e6d92a8
lint
bernhardoj Mar 30, 2026
428327e
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Mar 31, 2026
0d3a315
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 1, 2026
21553b0
fix wrong popover size
bernhardoj Apr 1, 2026
8bc6132
missnig date filter when using date range
bernhardoj Apr 1, 2026
293c3c2
delete unused test
bernhardoj Apr 1, 2026
3f044d0
prettier
bernhardoj Apr 1, 2026
3315054
always show the input
bernhardoj Apr 2, 2026
cdbe286
show help button
bernhardoj Apr 2, 2026
db9d316
Keep the search input visible and put the actions bar next to it
bernhardoj Apr 2, 2026
533cb3c
fix jumping table when selecting item
bernhardoj Apr 2, 2026
ed8916c
remove unused param
bernhardoj Apr 2, 2026
72be716
show filters bar in mobile view
bernhardoj Apr 2, 2026
4244d07
update test
bernhardoj Apr 2, 2026
16e486e
lint
bernhardoj Apr 2, 2026
1355be3
add more spacing when filter bars is visible
bernhardoj Apr 2, 2026
900fb52
fix type
bernhardoj Apr 2, 2026
a205c1d
remove unused import
bernhardoj Apr 2, 2026
39144fa
don't apply margin if no filters
bernhardoj Apr 2, 2026
fad79bb
make the input height fixed
bernhardoj Apr 2, 2026
8b3f660
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 10, 2026
1d1c20a
conflict
bernhardoj Apr 10, 2026
9ca4a2f
remove gap
bernhardoj Apr 10, 2026
c7c5846
show all applied filters
bernhardoj Apr 10, 2026
1a97a9b
update comment
bernhardoj Apr 10, 2026
47f6522
prettier
bernhardoj Apr 10, 2026
a6b7343
fix typo
bernhardoj Apr 10, 2026
461e4b7
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 10, 2026
65dfa35
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 11, 2026
eec2f3d
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 13, 2026
31f1a35
pass down hasFilterBars
bernhardoj Apr 13, 2026
ce3a709
lazily load search save page
bernhardoj Apr 13, 2026
bad1470
fix input padding style
bernhardoj Apr 13, 2026
12400ec
use key as list key
bernhardoj Apr 13, 2026
12c4f8e
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 14, 2026
13a57d9
fix extra padding bottom
bernhardoj Apr 14, 2026
40f0845
fix popover height
bernhardoj Apr 14, 2026
c63c616
fix bullet point doesn't have spacing
bernhardoj Apr 14, 2026
b505071
fix broken modal
bernhardoj Apr 14, 2026
c7f1577
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 14, 2026
ee532e2
revert unintended change
bernhardoj Apr 14, 2026
6f02725
prettier
bernhardoj Apr 14, 2026
c2f459e
make it consistent
bernhardoj Apr 14, 2026
e641a7d
add groupBy, limit, view to skipped filters
bernhardoj Apr 14, 2026
8bd3ca7
fix padding
bernhardoj Apr 14, 2026
0306803
fix broken height
bernhardoj Apr 14, 2026
189f60d
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 15, 2026
57d283e
delete unused style
bernhardoj Apr 15, 2026
08b0720
show button as icon on medium screen
bernhardoj Apr 15, 2026
2b7f406
lint
bernhardoj Apr 15, 2026
565eaab
Merge branch 'main' into feat/81558-revamp-search-actions-bar-imp
bernhardoj Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8829,22 +8829,11 @@ const CONST = {
SELECT_ALL_BUTTON: 'Search-SelectAllButton',
TYPE_MENU_BUTTON: 'Search-TypeMenuButton',
FILTER_DISPLAY: 'Search-FilterDisplay',
FILTER_TYPE: 'Search-FilterType',
FILTER_STATUS: 'Search-FilterStatus',
FILTER_DATE: 'Search-FilterDate',
FILTER_FROM: 'Search-FilterFrom',
FILTER_WORKSPACE: 'Search-FilterWorkspace',
FILTER_GROUP_BY: 'Search-FilterGroupBy',
FILTER_SORT_BY: 'Search-FilterSortBy',
FILTER_GROUP_CURRENCY: 'Search-FilterGroupCurrency',
FILTER_VIEW: 'Search-FilterView',
FILTER_LIMIT: 'Search-FilterLimit',
FILTER_FEED: 'Search-FilterFeed',
FILTER_POSTED: 'Search-FilterPosted',
FILTER_WITHDRAWN: 'Search-FilterWithdrawn',
FILTER_WITHDRAWAL_TYPE: 'Search-FilterWithdrawalType',
FILTER_HAS: 'Search-FilterHas',
FILTER_IS: 'Search-FilterIs',
ADVANCED_FILTERS_BUTTON: 'Search-AdvancedFiltersButton',
COLUMNS_BUTTON: 'Search-ColumnsButton',
SELECT_ALL_MATCHING_BUTTON: 'Search-SelectAllMatchingButton',
Expand Down
4 changes: 0 additions & 4 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ const SCREENS = {
REPORT_VERIFY_ACCOUNT: 'Search_Report_Verify_Account',
ADVANCED_FILTERS_RHP: 'Search_Advanced_Filters_RHP',
ADVANCED_FILTERS_TYPE_RHP: 'Search_Advanced_Filters_Type_RHP',
ADVANCED_FILTERS_GROUP_BY_RHP: 'Search_Advanced_Filters_GroupBy_RHP',
ADVANCED_FILTERS_VIEW_RHP: 'Search_Advanced_Filters_View_RHP',
ADVANCED_FILTERS_STATUS_RHP: 'Search_Advanced_Filters_Status_RHP',
ADVANCED_FILTERS_DATE_RHP: 'Search_Advanced_Filters_Date_RHP',
ADVANCED_FILTERS_SUBMITTED_RHP: 'Search_Advanced_Filters_Submitted_RHP',
Expand All @@ -65,7 +63,6 @@ const SCREENS = {
ADVANCED_FILTERS_POSTED_RHP: 'Search_Advanced_Filters_Posted_RHP',
ADVANCED_FILTERS_WITHDRAWN_RHP: 'Search_Advanced_Filters_Withdrawn_RHP',
ADVANCED_FILTERS_CURRENCY_RHP: 'Search_Advanced_Filters_Currency_RHP',
ADVANCED_FILTERS_GROUP_CURRENCY_RHP: 'Search_Advanced_Filters_Group_Currency_RHP',
ADVANCED_FILTERS_DESCRIPTION_RHP: 'Search_Advanced_Filters_Description_RHP',
ADVANCED_FILTERS_MERCHANT_RHP: 'Search_Advanced_Filters_Merchant_RHP',
ADVANCED_FILTERS_REPORT_ID_RHP: 'Search_Advanced_Filters_ReportID_RHP',
Expand All @@ -81,7 +78,6 @@ const SCREENS = {
ADVANCED_FILTERS_WITHDRAWAL_ID_RHP: 'Search_Advanced_Filters_Withdrawal_ID_RHP',
ADVANCED_FILTERS_TAG_RHP: 'Search_Advanced_Filters_Tag_RHP',
ADVANCED_FILTERS_HAS_RHP: 'Search_Advanced_Filters_Has_RHP',
ADVANCED_FILTERS_LIMIT_RHP: 'Search_Advanced_Filters_Limit_RHP',
ADVANCED_FILTERS_FROM_RHP: 'Search_Advanced_Filters_From_RHP',
ADVANCED_FILTERS_TO_RHP: 'Search_Advanced_Filters_To_RHP',
ADVANCED_FILTERS_TITLE_RHP: 'Search_Advanced_Filters_Title_RHP',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ function MoneyRequestReportTransactionList({

const groupByPopoverComponent = useCallback(
(props: {closeOverlay: () => void}) => (
<View style={[styles.pt4, styles.pb1]}>
<View style={[!isSmallScreenWidth && styles.pv4]}>
<View style={styles.getSelectionListPopoverHeight(groupByOptions.length || 1, windowHeight, false, isInLandscapeMode, false)}>
<SelectionList
data={groupByOptions}
Expand All @@ -508,11 +508,12 @@ function MoneyRequestReportTransactionList({
setReportLayoutGroupBy(item.keyForList, reportLayoutGroupBy);
props.closeOverlay();
}}
style={{contentContainerStyle: [styles.pb0]}}
/>
</View>
</View>
),
[groupByOptions, reportLayoutGroupBy, styles, windowHeight, isInLandscapeMode],
[groupByOptions, reportLayoutGroupBy, styles, windowHeight, isSmallScreenWidth, isInLandscapeMode],
);

const transactionListContent = (
Expand Down
160 changes: 107 additions & 53 deletions src/components/Search/FilterDropdowns/DisplayPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ import type {SearchAdvancedFiltersForm} from '@src/types/form';
import type {SearchResults} from '@src/types/onyx';
import {getEmptyObject} from '@src/types/utils/EmptyObject';
import GroupByPopup from './GroupByPopup';
import GroupCurrencyPopup from './GroupCurrencyPopup';
import SingleSelectPopup from './SingleSelectPopup';
import SortByPopup from './SortByPopup';
import SortOrderPopup from './SortOrderPopup';
import TextInputPopup from './TextInputPopup';

type DisplayPopupProps = {
Expand All @@ -41,8 +43,10 @@ function DisplayPopup({queryJSON, searchResults, closeOverlay, onSort}: DisplayP
const [selectedDisplayFilter, setSelectedDisplayFilter] = useState<
| typeof CONST.SEARCH.SYNTAX_ROOT_KEYS.LIMIT
| typeof CONST.SEARCH.SYNTAX_ROOT_KEYS.GROUP_BY
| typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.GROUP_CURRENCY
| typeof CONST.SEARCH.SYNTAX_ROOT_KEYS.VIEW
| typeof CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_BY
| typeof CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_ORDER
| null
>(null);

Expand All @@ -52,9 +56,6 @@ function DisplayPopup({queryJSON, searchResults, closeOverlay, onSort}: DisplayP
const view = viewOptions.find((option) => option.value === queryJSON.view) ?? viewOptions.at(0) ?? null;
const shouldShowColumnsButton = isLargeScreenWidth && (queryJSON.type === CONST.SEARCH.DATA_TYPES.EXPENSE || queryJSON.type === CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT);

const sortByValue = queryJSON.sortBy;
const groupByValue = searchAdvancedFilters[CONST.SEARCH.SYNTAX_ROOT_KEYS.GROUP_BY];
const viewValue = searchAdvancedFilters[CONST.SEARCH.SYNTAX_ROOT_KEYS.VIEW];
const limitValue = searchAdvancedFilters[CONST.SEARCH.SYNTAX_ROOT_KEYS.LIMIT];

if (!selectedDisplayFilter) {
Expand All @@ -64,12 +65,18 @@ function DisplayPopup({queryJSON, searchResults, closeOverlay, onSort}: DisplayP

const isExpenseType = queryJSON.type === CONST.SEARCH.DATA_TYPES.EXPENSE;
const isTripType = queryJSON.type === CONST.SEARCH.DATA_TYPES.TRIP;
const sortByValue = queryJSON.sortBy;
const sortOrderValue = queryJSON.sortOrder;
const groupByValue = searchAdvancedFilters[CONST.SEARCH.SYNTAX_ROOT_KEYS.GROUP_BY];
const groupCurrencyValue = searchAdvancedFilters[CONST.SEARCH.SYNTAX_FILTER_KEYS.GROUP_CURRENCY];
const viewValue = searchAdvancedFilters[CONST.SEARCH.SYNTAX_ROOT_KEYS.VIEW];

return (
<View style={[!shouldUseNarrowLayout && styles.pv4]}>
<MenuItemWithTopDescription
shouldShowRightIcon
description={translate('search.display.sortBy')}
title={translate(getSearchColumnTranslationKey(sortByValue))}
title={`${translate(getSearchColumnTranslationKey(sortByValue))} ${CONST.DOT_SEPARATOR} ${translate(`search.filters.sortOrder.${sortOrderValue}`)}`}
Comment thread
bernhardoj marked this conversation as resolved.
onPress={() => setSelectedDisplayFilter(CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_BY)}
sentryLabel={CONST.SENTRY_LABEL.SEARCH.FILTER_SORT_BY}
/>
Expand All @@ -82,6 +89,15 @@ function DisplayPopup({queryJSON, searchResults, closeOverlay, onSort}: DisplayP
sentryLabel={CONST.SENTRY_LABEL.SEARCH.FILTER_GROUP_BY}
/>
)}
{!!groupBy && (
<MenuItemWithTopDescription
shouldShowRightIcon
description={translate('common.groupCurrency')}
title={groupCurrencyValue}
onPress={() => setSelectedDisplayFilter(CONST.SEARCH.SYNTAX_FILTER_KEYS.GROUP_CURRENCY)}
sentryLabel={CONST.SENTRY_LABEL.SEARCH.FILTER_GROUP_CURRENCY}
/>
)}
{isExpenseType && !!groupByValue && (
<MenuItemWithTopDescription
shouldShowRightIcon
Expand Down Expand Up @@ -138,70 +154,108 @@ function DisplayPopup({queryJSON, searchResults, closeOverlay, onSort}: DisplayP
close(() => Navigation.setParams({q: queryString, rawQuery: undefined}));
};

const goBack = () => {
if (selectedDisplayFilter === CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_ORDER) {
setSelectedDisplayFilter(CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_BY);
return;
}
setSelectedDisplayFilter(null);
};

const subtitle = {
[CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_BY]: translate('search.display.sortBy'),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_ORDER]: translate('search.display.sortOrder'),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.GROUP_BY]: translate('search.display.groupBy'),
[CONST.SEARCH.SYNTAX_FILTER_KEYS.GROUP_CURRENCY]: translate('common.groupCurrency'),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.VIEW]: translate('search.view.label'),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.LIMIT]: translate('search.display.limitResults'),
};

const subPopup = {
[CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_BY]: (
<SortByPopup
searchResults={searchResults}
queryJSON={queryJSON}
groupBy={groupBy}
onSort={onSort}
closeOverlay={() => setSelectedDisplayFilter(null)}
/>
),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.GROUP_BY]: (
<GroupByPopup
style={styles.p0}
label={shouldUseNarrowLayout ? undefined : translate('search.display.groupBy')}
sections={groupBySections}
value={groupBy}
closeOverlay={() => setSelectedDisplayFilter(null)}
onChange={(item) => {
const newValue = item?.value;
if (!newValue) {
updateFilterForm({groupBy: undefined, groupCurrency: undefined});
} else {
updateFilterForm({groupBy: newValue});
}
}}
/>
),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.VIEW]: (
<SingleSelectPopup
style={styles.p0}
label={shouldUseNarrowLayout ? undefined : translate('search.view.label')}
items={viewOptions}
value={view}
closeOverlay={() => setSelectedDisplayFilter(null)}
onChange={(item) => updateFilterForm({view: item?.value ?? CONST.SEARCH.VIEW.TABLE})}
/>
),
[CONST.SEARCH.SYNTAX_ROOT_KEYS.LIMIT]: (
<TextInputPopup
style={styles.pv0}
placeholder={translate('search.filters.limit')}
defaultValue={limitValue}
closeOverlay={() => setSelectedDisplayFilter(null)}
onChange={(value) => updateFilterForm({limit: value})}
/>
),
};
let subPopup: React.JSX.Element | null = null;

switch (selectedDisplayFilter) {
case CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_BY:
subPopup = (
<SortByPopup
searchResults={searchResults}
queryJSON={queryJSON}
groupBy={groupBy}
onSort={onSort}
onSortOrderPress={() => setSelectedDisplayFilter(CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_ORDER)}
closeOverlay={closeOverlay}
/>
);
break;
case CONST.SEARCH.SYNTAX_ROOT_KEYS.SORT_ORDER:
subPopup = (
<SortOrderPopup
queryJSON={queryJSON}
onSort={onSort}
closeOverlay={closeOverlay}
/>
);
break;
case CONST.SEARCH.SYNTAX_ROOT_KEYS.GROUP_BY:
subPopup = (
<GroupByPopup
style={styles.p0}
sections={groupBySections}
value={groupBy}
closeOverlay={closeOverlay}
onChange={(item) => {
const newValue = item?.value;
if (!newValue) {
updateFilterForm({groupBy: undefined, groupCurrency: undefined});
} else {
updateFilterForm({groupBy: newValue});
}
}}
/>
);
break;
case CONST.SEARCH.SYNTAX_FILTER_KEYS.GROUP_CURRENCY:
subPopup = (
<GroupCurrencyPopup
onChange={(item) => updateFilterForm({groupCurrency: item?.value})}
closeOverlay={closeOverlay}
/>
);
break;
case CONST.SEARCH.SYNTAX_ROOT_KEYS.VIEW:
subPopup = (
<SingleSelectPopup
style={styles.p0}
items={viewOptions}
value={view}
closeOverlay={closeOverlay}
onChange={(item) => updateFilterForm({view: item?.value ?? CONST.SEARCH.VIEW.TABLE})}
/>
);
break;
case CONST.SEARCH.SYNTAX_ROOT_KEYS.LIMIT:
subPopup = (
<TextInputPopup
style={styles.pv0}
placeholder={translate('search.filters.limit')}
defaultValue={limitValue}
closeOverlay={closeOverlay}
onChange={(value) => updateFilterForm({limit: value})}
/>
);
break;
default:
break;
}

return (
<View style={[!shouldUseNarrowLayout && styles.pv4]}>
<HeaderWithBackButton
shouldDisplayHelpButton={false}
style={[styles.h10, styles.pv1, styles.mb2]}
subtitle={subtitle[selectedDisplayFilter]}
onBackButtonPress={() => setSelectedDisplayFilter(null)}
onBackButtonPress={goBack}
/>
{subPopup[selectedDisplayFilter]}
{subPopup}
</View>
);
}
Expand Down
Loading
Loading