-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Search v2] [App] Create search results page #45409
Merged
luacmartins
merged 33 commits into
Expensify:main
from
software-mansion-labs:search-v2/search-results
Jul 30, 2024
Merged
Changes from 13 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
cc9cfce
Add template of Search Results Page
WojtekBoman 03d2a51
Merge branch 'main' into search-v2/search-results
WojtekBoman 25e6034
Merge branch 'main' into search-v2/search-results
WojtekBoman 9f9b5ef
Run prettier
WojtekBoman 0c146d6
Merge branch 'adamgrzybowski/use-new-query-syntax' into search-result…
WojtekBoman ec25f9c
Adjust SearchResults to queryJSON
WojtekBoman 90227ac
Merge branch 'main' into search-v2/search-results
WojtekBoman 9e60aca
Remove unnecessary components
WojtekBoman a39a5f3
Adjust components styles to display search results
WojtekBoman f89a196
Replace texts with translation paths
WojtekBoman 68c9bfa
Unify checks in SearchPageHeader
WojtekBoman db1600e
Remove console.log
WojtekBoman e1e50c6
Remove Filters button
WojtekBoman c6c9fca
Add Filters buttons on narrow and wide layouts
WojtekBoman 2c296e7
cleanup destructuring route.params in SearchPage
WojtekBoman 067f484
Rename isSearchResultsMode to isCustomQueryMode
WojtekBoman 05dc344
Add SearchUtils.isCustomQuery and cleanup SearchPageHeader
WojtekBoman 10bd38f
Fix SearchStatusMenuNarrow
WojtekBoman dda75e4
Fix filters.svg
WojtekBoman 2bb4774
Merge branch 'main' into search-v2/search-results
WojtekBoman bcd2f8d
Display header title using input, remove Filters button
WojtekBoman c664c4b
Remove unnecessary margin from SearchStatusMenuNarrow
WojtekBoman 8169525
Rename isCustomQueryMode to isCustomQuery
WojtekBoman f022bae
Add HeaderWrapper to SearchPageHeader
WojtekBoman b774317
Remove unnecessary styles
WojtekBoman 01ed964
Merge branch 'main' into search-v2/search-results
WojtekBoman 4b999a4
Modify getSearchHeaderTitle to use getFilters
WojtekBoman 6141a77
Refactor operatorsToSignMap
WojtekBoman 1074c1b
Fix displaying search header title
WojtekBoman 5919064
Remove SearchUtils.isCustomQuery
WojtekBoman 8b2bd3c
Remove unused imports
WojtekBoman 023ecf4
Merge branch 'main' into search-v2/search-results
WojtekBoman 6cffd47
Fix optionality of isCustomQuery in SearchListWithHeader
WojtekBoman 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
assets/images/simple-illustrations/simple-illustration__filters.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 | ||||
---|---|---|---|---|---|---|
|
@@ -21,9 +21,12 @@ type HeaderProps = { | |||||
|
||||||
/** Additional header container styles */ | ||||||
containerStyles?: StyleProp<ViewStyle>; | ||||||
|
||||||
/** Whether the subtitle should be displayed above the title */ | ||||||
showSubtitleAboveTitle?: boolean; | ||||||
}; | ||||||
|
||||||
function Header({title = '', subtitle = '', textStyles = [], containerStyles = [], shouldShowEnvironmentBadge = false}: HeaderProps) { | ||||||
function Header({title = '', subtitle = '', textStyles = [], containerStyles = [], shouldShowEnvironmentBadge = false, showSubtitleAboveTitle = false}: HeaderProps) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NAB supertitle is a common word used for this subtitle above title
Suggested change
|
||||||
const styles = useThemeStyles(); | ||||||
const renderedSubtitle = useMemo( | ||||||
() => ( | ||||||
|
@@ -46,6 +49,7 @@ function Header({title = '', subtitle = '', textStyles = [], containerStyles = [ | |||||
return ( | ||||||
<View style={[styles.flex1, styles.flexRow, containerStyles]}> | ||||||
<View style={styles.mw100}> | ||||||
{showSubtitleAboveTitle && renderedSubtitle} | ||||||
{typeof title === 'string' | ||||||
? !!title && ( | ||||||
<Text | ||||||
|
@@ -56,7 +60,7 @@ function Header({title = '', subtitle = '', textStyles = [], containerStyles = [ | |||||
</Text> | ||||||
) | ||||||
: title} | ||||||
{renderedSubtitle} | ||||||
{!showSubtitleAboveTitle && renderedSubtitle} | ||||||
</View> | ||||||
{shouldShowEnvironmentBadge && <EnvironmentBadge />} | ||||||
</View> | ||||||
|
This file contains 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 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 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 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 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure, but If I recall correctly, then our Header for SearchResults is temporary until v2.3. So if this is a temporary header, then do we have to modify the core component
Header
?Could we do some dirty fix instead, and leave a comment that it's temporary?
Im afraid that in future we will change our Search header, but nobody will remember to clean up
components/Header
.Does this make sense and is there anything you can come up with?