Skip to content

Commit

Permalink
Merge pull request #28110 from akinwale/task-27052
Browse files Browse the repository at this point in the history
feat: address remaining design inconsistencies for distance requests
  • Loading branch information
Joel Bettner authored Oct 3, 2023
2 parents 7550d3f + 96df50f commit 5df6334
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 8 additions & 7 deletions src/components/MoneyRequestConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ function MoneyRequestConfirmationList(props) {
onPress={(_event, value) => confirm(value)}
options={splitOrRequestOptions}
buttonSize={CONST.DROPDOWN_BUTTON_SIZE.LARGE}
style={[styles.mt2]}
/>
);

Expand Down Expand Up @@ -501,7 +502,7 @@ function MoneyRequestConfirmationList(props) {
title={props.iouComment}
description={translate('common.description')}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_DESCRIPTION.getRoute(props.iouType, props.reportID))}
style={[styles.moneyRequestMenuItem, styles.mb2]}
style={[styles.moneyRequestMenuItem]}
titleStyle={styles.flex1}
disabled={didConfirm || props.isReadOnly}
numberOfLinesTitle={2}
Expand All @@ -527,7 +528,7 @@ function MoneyRequestConfirmationList(props) {
shouldShowRightIcon={!props.isReadOnly && isTypeRequest}
title={props.iouCreated || format(new Date(), CONST.DATE.FNS_FORMAT_STRING)}
description={translate('common.date')}
style={[styles.moneyRequestMenuItem, styles.mb2]}
style={[styles.moneyRequestMenuItem]}
titleStyle={styles.flex1}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_DATE.getRoute(props.iouType, props.reportID))}
disabled={didConfirm || props.isReadOnly || !isTypeRequest}
Expand All @@ -537,7 +538,7 @@ function MoneyRequestConfirmationList(props) {
shouldShowRightIcon={!props.isReadOnly && isTypeRequest}
title={props.iouMerchant}
description={translate('common.distance')}
style={[styles.moneyRequestMenuItem, styles.mb2]}
style={[styles.moneyRequestMenuItem]}
titleStyle={styles.flex1}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_DISTANCE.getRoute(props.iouType, props.reportID))}
disabled={didConfirm || props.isReadOnly || !isTypeRequest}
Expand All @@ -547,7 +548,7 @@ function MoneyRequestConfirmationList(props) {
shouldShowRightIcon={!props.isReadOnly && isTypeRequest}
title={props.iouMerchant}
description={translate('common.merchant')}
style={[styles.moneyRequestMenuItem, styles.mb2]}
style={[styles.moneyRequestMenuItem]}
titleStyle={styles.flex1}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_MERCHANT.getRoute(props.iouType, props.reportID))}
disabled={didConfirm || props.isReadOnly || !isTypeRequest}
Expand All @@ -559,7 +560,7 @@ function MoneyRequestConfirmationList(props) {
title={props.iouCategory}
description={translate('common.category')}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_CATEGORY.getRoute(props.iouType, props.reportID))}
style={[styles.moneyRequestMenuItem, styles.mb2]}
style={[styles.moneyRequestMenuItem]}
disabled={didConfirm || props.isReadOnly}
/>
)}
Expand All @@ -569,12 +570,12 @@ function MoneyRequestConfirmationList(props) {
title={props.iouTag}
description={policyTagListName}
onPress={() => Navigation.navigate(ROUTES.MONEY_REQUEST_TAG.getRoute(props.iouType, props.reportID))}
style={[styles.moneyRequestMenuItem, styles.mb2]}
style={[styles.moneyRequestMenuItem]}
disabled={didConfirm || props.isReadOnly}
/>
)}
{shouldShowBillable && (
<View style={[styles.flexRow, styles.mb4, styles.justifyContentBetween, styles.alignItemsCenter, styles.ml5, styles.mr8]}>
<View style={[styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.ml5, styles.mr8, styles.optionRow]}>
<Text color={!props.iouIsBillable ? themeColors.textSupporting : undefined}>{translate('common.billable')}</Text>
<Switch
accessibilityLabel={translate('common.billable')}
Expand Down
8 changes: 5 additions & 3 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,8 @@ const styles = (theme) => ({
},

optionsListSectionHeader: {
height: variables.optionsListSectionHeaderHeight,
marginTop: 8,
marginBottom: 4,
},

overlayStyles: (current) => ({
Expand Down Expand Up @@ -3630,7 +3631,7 @@ const styles = (theme) => ({

mapView: {
flex: 1,
borderRadius: 20,
borderRadius: 16,
overflow: 'hidden',
},

Expand All @@ -3647,7 +3648,8 @@ const styles = (theme) => ({
},

confirmationListMapItem: {
...spacing.m5,
...spacing.mv2,
...spacing.mh5,
height: 200,
},

Expand Down

0 comments on commit 5df6334

Please sign in to comment.