Skip to content

Commit

Permalink
Merge pull request #57113 from software-mansion-labs/289Adam289/57074…
Browse files Browse the repository at this point in the history
…-57071-fix-deploy-blockers

[CP Staging] fix blank area and status bar
  • Loading branch information
luacmartins authored Feb 19, 2025
2 parents 220c69f + cb8aad4 commit aa6c2e2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
4 changes: 3 additions & 1 deletion src/components/Search/SearchPageHeader/SearchPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ function SearchPageHeader({queryJSON, searchName, searchRouterListVisible, hideS
}, [allCards, currencyList, hideProductTrainingTooltip, personalDetails, policyCategories, policyTagsLists, queryJSON, reports, taxRates]);

const InputRightComponent = useMemo(() => {
return headerButtonsOptions.length > 0 ? (
return headerButtonsOptions.length > 0 && (!shouldUseNarrowLayout || selectionMode?.isEnabled) ? (
<ButtonWithDropdownMenu
onPress={() => null}
shouldAlwaysShowDropdownMenu
Expand Down Expand Up @@ -370,6 +370,8 @@ function SearchPageHeader({queryJSON, searchName, searchRouterListVisible, hideS
styles.productTrainingTooltipWrapper,
styles.searchAutocompleteInputResults,
translate,
selectionMode,
shouldUseNarrowLayout,
]);

if (shouldUseNarrowLayout && selectionMode?.isEnabled) {
Expand Down
40 changes: 22 additions & 18 deletions src/pages/Search/SearchPageNarrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,27 +138,31 @@ function SearchPageNarrow({queryJSON, policyID, searchName, shouldGroupByReports
/>
</View>
<View style={[styles.flex1]}>
<Animated.View style={[topBarAnimatedStyle, !searchRouterListVisible && styles.narrowSearchRouterInactiveStyle, styles.narrowSearchHeaderStyle]}>
<SearchPageHeader
queryJSON={queryJSON}
searchRouterListVisible={searchRouterListVisible}
hideSearchRouterList={() => {
setSearchRouterListVisible(false);
}}
onSearchRouterFocus={() => {
topBarOffset.set(StyleUtils.searchHeaderDefaultOffset);
setSearchRouterListVisible(true);
}}
shouldGroupByReports={shouldGroupByReports}
/>
{!searchRouterListVisible && (
<SearchStatusBar
<Animated.View style={[topBarAnimatedStyle, !searchRouterListVisible && styles.narrowSearchRouterInactiveStyle, styles.flex1, styles.bgTransparent]}>
<View style={[styles.narrowSearchHeaderStyle]}>
<SearchPageHeader
queryJSON={queryJSON}
onStatusChange={() => {
topBarOffset.set(withTiming(StyleUtils.searchHeaderDefaultOffset, {duration: ANIMATION_DURATION_IN_MS}));
searchRouterListVisible={searchRouterListVisible}
hideSearchRouterList={() => {
setSearchRouterListVisible(false);
}}
onSearchRouterFocus={() => {
topBarOffset.set(StyleUtils.searchHeaderDefaultOffset);
setSearchRouterListVisible(true);
}}
shouldGroupByReports={shouldGroupByReports}
/>
)}
</View>
<View style={[styles.appBG]}>
{!searchRouterListVisible && (
<SearchStatusBar
queryJSON={queryJSON}
onStatusChange={() => {
topBarOffset.set(withTiming(StyleUtils.searchHeaderDefaultOffset, {duration: ANIMATION_DURATION_IN_MS}));
}}
/>
)}
</View>
</Animated.View>
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3768,7 +3768,7 @@ const styles = (theme: ThemeColors) =>

narrowSearchHeaderStyle: {
paddingTop: 1,
flex: 1,
backgroundColor: theme.appBG,
},

narrowSearchRouterInactiveStyle: {
Expand Down

0 comments on commit aa6c2e2

Please sign in to comment.