From 2fde4ce739818423d53c14b4ea56b5b69b8a8d99 Mon Sep 17 00:00:00 2001 From: Brandon Henry Date: Fri, 22 Mar 2024 19:32:34 -0500 Subject: [PATCH 1/5] init --- src/libs/Localize/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Localize/index.ts b/src/libs/Localize/index.ts index 39a8741990042..127b4da7c1823 100644 --- a/src/libs/Localize/index.ts +++ b/src/libs/Localize/index.ts @@ -115,7 +115,7 @@ function getTranslatedPhrase( return translatedPhrase(...phraseParameters); } - // We set the translated value in the cache only for the phrases without parameters. + // We set the translated value in the cache only for the phrases without parameters.. cacheForLocale?.set(phraseKey, translatedPhrase); return translatedPhrase; } From 3a63b4692ccd06f6b346c0067b508768fecb4d7d Mon Sep 17 00:00:00 2001 From: Brandon Henry Date: Thu, 28 Mar 2024 00:05:33 -0500 Subject: [PATCH 2/5] Added custom styling --- src/components/SelectionList/BaseSelectionList.tsx | 2 +- src/components/SelectionList/types.ts | 3 +++ src/pages/SearchPage/index.tsx | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index 015fd284c0b4b..812153692593d 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -514,7 +514,7 @@ function BaseSelectionList( )} {!!headerMessage && ( - + {headerMessage} )} diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index e691a5bdb191d..e56527d501b34 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -226,6 +226,9 @@ type BaseSelectionListProps = Partial & { /** Message to display at the top of the list */ headerMessage?: string; + /** Styles to apply to the header message */ + headerMessageStyle?: StyleProp; + /** Text to display on the confirm button */ confirmButtonText?: string; diff --git a/src/pages/SearchPage/index.tsx b/src/pages/SearchPage/index.tsx index 07096ce6c2d5f..f535bb0149433 100644 --- a/src/pages/SearchPage/index.tsx +++ b/src/pages/SearchPage/index.tsx @@ -168,6 +168,7 @@ function SearchPage({betas, reports, isSearchingForReports, navigation}: SearchP textInputHint={offlineMessage} onChangeText={setSearchValue} headerMessage={headerMessage} + headerMessageStyle={headerMessage === translate('common.noResultsFound') ? [themeStyles.ph4, themeStyles.pb5] : undefined} onLayout={setPerformanceTimersEnd} autoFocus onSelectRow={selectReport} From e7ebebbd569989712d5aa9311fc07f2d710e1325 Mon Sep 17 00:00:00 2001 From: Brandon Henry Date: Thu, 28 Mar 2024 00:06:28 -0500 Subject: [PATCH 3/5] Update index.ts --- src/libs/Localize/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Localize/index.ts b/src/libs/Localize/index.ts index 127b4da7c1823..39a8741990042 100644 --- a/src/libs/Localize/index.ts +++ b/src/libs/Localize/index.ts @@ -115,7 +115,7 @@ function getTranslatedPhrase( return translatedPhrase(...phraseParameters); } - // We set the translated value in the cache only for the phrases without parameters.. + // We set the translated value in the cache only for the phrases without parameters. cacheForLocale?.set(phraseKey, translatedPhrase); return translatedPhrase; } From 65e2cae814ace7371d92dfdd7aa3b820c8838a60 Mon Sep 17 00:00:00 2001 From: Brandon Henry Date: Thu, 28 Mar 2024 19:09:48 -0500 Subject: [PATCH 4/5] Squashed commit of the following: commit 34d1497aec6900e31a15c16781483aca35138626 Merge: cdb8f23922 4822c1befc Author: Brandon Henry Date: Thu Mar 28 19:08:40 2024 -0500 Merge remote-tracking branch 'upstream/main' into 37984-fix-search-lhn-no-results-found-padding commit cdb8f23922eaf962fbf5ccc832a2463ff5a2cd1c Merge: cfd7a8b5de 6c95dfb493 Author: Brandon Henry Date: Thu Mar 28 00:00:30 2024 -0500 Merge remote-tracking branch 'upstream/main' into 37984-fix-search-lhn-no-results-found-padding commit cfd7a8b5de5c63f058364e9dfc6811c5def6401b Author: Brandon Henry Date: Tue Mar 26 21:10:53 2024 -0500 added new styling for headermessage --- src/components/SelectionList/BaseSelectionList.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index d2fc97b510a86..2ab04eebffe76 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -69,6 +69,7 @@ function BaseSelectionList( listHeaderWrapperStyle, isRowMultilineSupported = false, textInputRef, + headerMessageStyle = [styles.ph5, styles.pb5] }: BaseSelectionListProps, ref: ForwardedRef, ) { From 9585a874336f97ea6825a2ff59635f7b2ac6ee92 Mon Sep 17 00:00:00 2001 From: Brandon Henry Date: Thu, 28 Mar 2024 19:49:27 -0500 Subject: [PATCH 5/5] updated conditional --- src/components/SelectionList/BaseSelectionList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index 2ab04eebffe76..175a6bc128846 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -69,7 +69,7 @@ function BaseSelectionList( listHeaderWrapperStyle, isRowMultilineSupported = false, textInputRef, - headerMessageStyle = [styles.ph5, styles.pb5] + headerMessageStyle, }: BaseSelectionListProps, ref: ForwardedRef, ) { @@ -515,7 +515,7 @@ function BaseSelectionList( )} {!!headerMessage && ( - + {headerMessage} )}