Skip to content
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

[CP Staging] fixes max width and pay button for report preview #29666

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function ReportPreview(props) {
onPress={(paymentType) => IOU.payMoneyRequest(paymentType, props.chatReport, props.iouReport)}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
style={[styles.requestPreviewBox]}
style={[styles.mt3]}
anchorAlignment={{
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
Expand All @@ -253,7 +253,7 @@ function ReportPreview(props) {
medium
success={props.chatReport.isOwnPolicyExpenseChat}
text={translate('common.submit')}
style={styles.requestPreviewBox}
style={styles.mt3}
onPress={() => IOU.submitReport(props.iouReport)}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3691,7 +3691,7 @@ const styles = (theme: ThemeDefault) =>
reportPreviewBox: {
backgroundColor: theme.cardBG,
borderRadius: variables.componentBorderRadiusLarge,
maxWidth: variables.sideBarWidth,
maxWidth: variables.reportPreviewMaxWidth,
width: '100%',
},

Expand Down
2 changes: 1 addition & 1 deletion src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
eReceiptWordmarkWidth: 86,
eReceiptBGHeight: 540,
eReceiptBGHWidth: 335,
reportPreviewMaxWidth: 302,
reportPreviewMaxWidth: 335,
Copy link
Contributor

@mountiny mountiny Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should this be same for report preview and money request action now and be 335 or the previous 302? @grgia

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, same constant. Let's use 335 for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a PR updating this flow for eReceipts that needs a design pass, so if this number needs to be changed we can handle it there. Let's just make sure we test both report previews and money request previews with this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perf, thanks!

reportActionImagesSingleImageHeight: 147,
reportActionImagesDoubleImageHeight: 138,
reportActionImagesMultipleImageHeight: 110,
Expand Down
Loading