Skip to content

Commit

Permalink
Fix paddings on advanced filters screens
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Aug 2, 2024
1 parent cd1be96 commit 6122ce8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/pages/Search/AdvancedSearchFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {useOnyx} from 'react-native-onyx';
import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton';
import type {LocaleContextProps} from '@components/LocaleContextProvider';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import ScrollView from '@components/ScrollView';
import type {AdvancedFiltersKeys} from '@components/Search/types';
import useLocalize from '@hooks/useLocalize';
import useSingleExecution from '@hooks/useSingleExecution';
Expand Down Expand Up @@ -114,7 +115,7 @@ function AdvancedSearchFilters() {
};

return (
<View style={[styles.flex1, styles.justifyContentBetween]}>
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.justifyContentBetween]}>
<View>
{advancedFilters.map((item) => {
const onPress = singleExecution(waitForNavigate(() => Navigation.navigate(item.route)));
Expand All @@ -132,11 +133,11 @@ function AdvancedSearchFilters() {
</View>
<FormAlertWithSubmitButton
buttonText={translate('search.viewResults')}
containerStyles={[styles.mh4, styles.mt4]}
containerStyles={[styles.m4, styles.mb5]}
onSubmit={onFormSubmit}
enabledWhenOffline
/>
</View>
</ScrollView>
);
}

Expand Down
1 change: 1 addition & 0 deletions src/pages/Search/SearchAdvancedFiltersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function SearchAdvancedFiltersPage() {
testID={SearchAdvancedFiltersPage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton title={translate('search.filtersHeader')} />
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Search/SearchFiltersCategoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ function SearchFiltersCategoryPage() {
testID={SearchFiltersCategoryPage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton
Expand All @@ -134,7 +135,7 @@ function SearchFiltersCategoryPage() {
Navigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS);
}}
/>
<View style={[styles.flex1]}>
<View style={[styles.flex1, styles.pb5]}>
<SelectionList
sections={sections}
textInputValue={searchTerm}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Search/SearchFiltersCurrencyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function SearchFiltersCurrencyPage() {
testID={SearchFiltersCurrencyPage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
{({didScreenTransitionEnd}) => (
<FullPageNotFoundView shouldShow={false}>
Expand All @@ -55,7 +56,7 @@ function SearchFiltersCurrencyPage() {
/>
<FormAlertWithSubmitButton
buttonText={translate('common.save')}
containerStyles={[styles.m4]}
containerStyles={[styles.m4, styles.mb5]}
onSubmit={handleOnSubmit}
enabledWhenOffline
/>
Expand Down
1 change: 1 addition & 0 deletions src/pages/Search/SearchFiltersDatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function SearchFiltersDatePage() {
testID={SearchFiltersDatePage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Search/SearchFiltersDescriptionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function SearchFiltersDescriptionPage() {
testID={SearchFiltersDescriptionPage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton
Expand All @@ -51,7 +52,7 @@ function SearchFiltersDescriptionPage() {
submitButtonText={translate('common.save')}
enabledWhenOffline
>
<View style={styles.mb4}>
<View style={styles.mb5}>
<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.DESCRIPTION}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Search/SearchFiltersMerchantPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function SearchFiltersMerchantPage() {
testID={SearchFiltersMerchantPage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton
Expand All @@ -51,7 +52,7 @@ function SearchFiltersMerchantPage() {
submitButtonText={translate('common.save')}
enabledWhenOffline
>
<View style={styles.mb4}>
<View style={styles.mb5}>
<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.MERCHANT}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Search/SearchFiltersReportIDPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function SearchFiltersReportIDPage() {
testID={SearchFiltersReportIDPage.displayName}
shouldShowOfflineIndicatorInWideScreen
offlineIndicatorStyle={styles.mtAuto}
includeSafeAreaPaddingBottom={false}
>
<FullPageNotFoundView shouldShow={false}>
<HeaderWithBackButton
Expand All @@ -51,7 +52,7 @@ function SearchFiltersReportIDPage() {
submitButtonText={translate('common.save')}
enabledWhenOffline
>
<View style={styles.mb4}>
<View style={styles.mb5}>
<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.REPORT_ID}
Expand Down

0 comments on commit 6122ce8

Please sign in to comment.