-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Suggested Search & Filter Revamp #61170
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
Merged
Merged
Changes from 95 commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
601f8be
create search type menu
JS00001 736e43e
fix search menu popover
JS00001 481e506
cleanup styles
JS00001 967bf73
add more sections
JS00001 a842630
start adding conditions
JS00001 5a57e07
getApprover list
JS00001 4b28033
add exporter
JS00001 a47606c
routes for search
JS00001 cf705eb
fix crashing
JS00001 45a6551
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 19b3ec5
fix types of status and fix query building
JS00001 0695750
add better route filtering that allows for active items
JS00001 b823155
empty states
JS00001 392ddd8
add seelction for type
JS00001 288240f
fix searching by report filter
JS00001 d158500
fix how filters work
JS00001 ca92df1
begin empty state search/consolidation
JS00001 962c422
type safety for search view
JS00001 581bcd4
remove strange 'current query' items in popover
JS00001 bbbba19
add clear button and start filter bar
JS00001 adf17f3
add advanced filter, scrap search status bar, addd search filter bar
JS00001 acd3018
add new poup components, begin testing UI changes
JS00001 e608f92
dropdown component complete
JS00001 9ec397f
setup props for single & multi
JS00001 085c15e
single select functionality
JS00001 7b04639
add new SingleSelectListItem
JS00001 dc3f155
create filter lists of specific data
JS00001 50ba0c2
progress with dropdowns actually working
JS00001 474d827
dropdown working
JS00001 cd4d2d1
loading skeleton
JS00001 7a5545b
date picker start
JS00001 1a0c208
date picker cleanup
JS00001 2fb4fe2
remove type and status from RHP
JS00001 6796992
complete date selection for all except 'on'
JS00001 21d42ce
add user select list
JS00001 b07a372
update user select list item to match the UI
JS00001 a434fcc
add date on support
JS00001 56bf222
user selection works
JS00001 79653b2
cleanup code values
JS00001 1f7234f
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 758ed43
finish user select popup
JS00001 52bbb5b
add label to bottom sheets, fix crashing when navigating
JS00001 a013dae
remove createdBy, update to use 'from'
JS00001 13c9228
fix fireworks styling
JS00001 8ae06a3
fix calendar overlay
JS00001 f58ce49
create report on empty state
JS00001 ba09b58
fix styling issues on mobile
JS00001 1f2cef4
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 53b3d34
add back submodule, oops!
JS00001 0b0b247
update icon to be 'clear' icon, fix sizing on mobile
JS00001 2150638
height for user selection list
JS00001 376c049
fix list height
JS00001 19a8ec5
fix date selection issues
JS00001 de32ed6
fix search resetting because of re-renders
JS00001 3743463
fix styling of popovers
JS00001 af473fd
fix type errors
JS00001 db1ce4e
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 5105aad
eslint fixes
JS00001 3b0cb1d
fix tests and eslint
JS00001 a4bee06
fix eslint
JS00001 9ba635a
fix key console error
JS00001 c1f09f9
fix menu selected calculations
JS00001 08a9cf3
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 4ffa649
Update type menu to return sections
JS00001 bddd3d5
add keyboard avoiding view for users
JS00001 39f95b2
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 a7d0cd1
update clear button
JS00001 875cea0
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 6b20204
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 f660052
make sections reactive
JS00001 8074006
fix popup styling issues
JS00001 ed6156e
finish initial design feedback
JS00001 cab9617
fix crash, reorder expense status
JS00001 74b387e
fix pay suggestions to only show if at least one policy has reimburs…
JS00001 c75f2f2
begin export date picker
JS00001 8a102e5
continue updating logic of calendar
JS00001 99fae42
Fix how 'never' works
JS00001 f356aba
fix menu item sizing by adding compact mode
JS00001 3b33612
allow exported:never to be saved
JS00001 47df72c
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 0169fb7
fix eslint & types
JS00001 d6e76bc
fix empty state bug and 'pay' being visible
JS00001 f16ab86
use checkboxes, non-bold titles for sections, remove BG from radio bu…
JS00001 ac71d26
fix padding for user select popup
JS00001 1685a3e
add 'payer' and 'exporter'
JS00001 75f8cad
update button size
JS00001 5fb7f33
update suggested queries
JS00001 78d0a15
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 0d98132
update parsers to be re-generated
JS00001 5cd0dcd
make 'reset' close instantly & reset changes
JS00001 2b76d3e
fix button positioning
JS00001 88c1ce8
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 174fdd3
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 211c370
fix type issues
JS00001 1bc38f6
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 81275af
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 305dd0c
update report utils
JS00001 31bcf9b
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 86b1882
Revert submodule pointer for Mobile-Expensify
JS00001 847513d
address comments
JS00001 073a97a
prettier fix
JS00001 67970ee
update to remove pay & update payer to be a single value
JS00001 38e7f4e
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 77f1fe7
remove export
JS00001 04ee412
Merge branch 'main' of github.com:Expensify/App into jsenyitko-search…
JS00001 9e5179a
add min & max dates, fix popup behavior
JS00001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
src/components/Search/FilterDropdowns/DateSelectPopup/CalendarView.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React, {useState} from 'react'; | ||
import {View} from 'react-native'; | ||
import Button from '@components/Button'; | ||
import CalendarPicker from '@components/DatePicker/CalendarPicker'; | ||
import HeaderWithBackButton from '@components/HeaderWithBackButton'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import type {SearchDateModifier, SearchDateModifierLower} from '@libs/SearchUIUtils'; | ||
|
||
type CalendarViewProps = { | ||
view: SearchDateModifier; | ||
value: string | null; | ||
navigateBack: () => void; | ||
setValue: (key: SearchDateModifier, value: string | null) => void; | ||
}; | ||
|
||
function CalendarView({view, value, navigateBack, setValue}: CalendarViewProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
const {shouldUseNarrowLayout} = useResponsiveLayout(); | ||
const [localDateValue, setLocalDateValue] = useState(value); | ||
|
||
const lowerDateModifier = view.toLowerCase() as SearchDateModifierLower; | ||
|
||
const resetChanges = () => { | ||
setValue(view, null); | ||
navigateBack(); | ||
}; | ||
|
||
const saveChanges = () => { | ||
setValue(view, localDateValue); | ||
navigateBack(); | ||
}; | ||
|
||
return ( | ||
<View style={[!shouldUseNarrowLayout && styles.pv4]}> | ||
<HeaderWithBackButton | ||
shouldDisplayHelpButton={false} | ||
style={[styles.h10, styles.pb3]} | ||
subtitle={translate(`common.${lowerDateModifier}`)} | ||
onBackButtonPress={navigateBack} | ||
/> | ||
|
||
<CalendarPicker | ||
value={localDateValue ?? undefined} | ||
onSelected={setLocalDateValue} | ||
/> | ||
|
||
<View style={[styles.flexRow, styles.gap2, styles.ph5, styles.pt2]}> | ||
<Button | ||
medium | ||
style={[styles.flex1]} | ||
text={translate('common.reset')} | ||
onPress={resetChanges} | ||
/> | ||
<Button | ||
success | ||
medium | ||
style={[styles.flex1]} | ||
text={translate('common.save')} | ||
onPress={saveChanges} | ||
/> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
CalendarView.displayName = 'CalendarView'; | ||
export default CalendarView; |
70 changes: 70 additions & 0 deletions
70
src/components/Search/FilterDropdowns/DateSelectPopup/RootView.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import Button from '@components/Button'; | ||
import MenuItem from '@components/MenuItem'; | ||
import Text from '@components/Text'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import type {SearchDateModifier, SearchDateModifierLower} from '@libs/SearchUIUtils'; | ||
import CONST from '@src/CONST'; | ||
import type {DateSelectPopupValue} from '.'; | ||
|
||
type RootViewProps = { | ||
value: DateSelectPopupValue; | ||
applyChanges: () => void; | ||
resetChanges: () => void; | ||
setView: (view: SearchDateModifier) => void; | ||
}; | ||
|
||
function RootView({value, applyChanges, resetChanges, setView}: RootViewProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
const {shouldUseNarrowLayout} = useResponsiveLayout(); | ||
|
||
const label = translate('common.date'); | ||
|
||
return ( | ||
<View style={[!shouldUseNarrowLayout && styles.pv4, styles.gap2]}> | ||
{shouldUseNarrowLayout && <Text style={[styles.textLabel, styles.textSupporting, styles.ph5, styles.pv1]}>{label}</Text>} | ||
|
||
<View> | ||
{Object.values(CONST.SEARCH.DATE_MODIFIERS).map((dateType) => { | ||
const dateValue = value[dateType]; | ||
const description = dateValue ?? undefined; | ||
const lowerDateModifier = dateType.toLowerCase() as SearchDateModifierLower; | ||
|
||
return ( | ||
<MenuItem | ||
key={dateType} | ||
shouldShowRightIcon | ||
title={translate(`common.${lowerDateModifier}`)} | ||
description={description} | ||
viewMode={CONST.OPTION_MODE.COMPACT} | ||
onPress={() => setView(dateType)} | ||
/> | ||
); | ||
})} | ||
</View> | ||
|
||
<View style={[styles.flexRow, styles.gap2, styles.ph5]}> | ||
<Button | ||
medium | ||
style={[styles.flex1]} | ||
text={translate('common.reset')} | ||
onPress={resetChanges} | ||
/> | ||
<Button | ||
success | ||
medium | ||
style={[styles.flex1]} | ||
text={translate('common.apply')} | ||
onPress={applyChanges} | ||
/> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
RootView.displayName = 'RootView'; | ||
export default RootView; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.