Skip to content

Commit f879bec

Browse files
authored
Merge pull request Expensify#72704 from lorretheboy/fix/72636
Expense - Report subtitle "From #report in workspace" is aligned to the left
2 parents ef2def5 + b652e89 commit f879bec

3 files changed

Lines changed: 20 additions & 15 deletions

File tree

src/components/AvatarWithDisplayName.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function AvatarWithDisplayName({
273273
)}
274274
</View>
275275

276-
<View style={[styles.flex1, styles.flexColumn]}>
276+
<View style={[styles.flex1, styles.flexColumn, styles.mnw0]}>
277277
{getCustomDisplayName(
278278
shouldUseCustomSearchTitleName,
279279
report,

src/components/ParentNavigationSubtitle.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ function ParentNavigationSubtitle({
125125
};
126126

127127
return (
128-
<View style={[styles.flexRow, styles.alignItemsCenter]}>
128+
<View style={[styles.flexRow, styles.alignItemsCenter, styles.flexShrink1, styles.mnw0]}>
129129
{!!statusText && (
130130
<View
131131
style={[
132132
styles.reportStatusContainer,
133+
styles.flexShrink0,
133134
styles.mr1,
134135
{
135136
backgroundColor: statusTextBackgroundColor,
@@ -141,7 +142,7 @@ function ParentNavigationSubtitle({
141142
</View>
142143
)}
143144
<Text
144-
style={[styles.optionAlternateText, styles.textLabelSupporting, styles.flex1, textStyles]}
145+
style={[styles.optionAlternateText, styles.textLabelSupporting, styles.flexShrink1, styles.mnw0, textStyles]}
145146
numberOfLines={1}
146147
>
147148
{!!reportName && (

src/pages/ReportDetailsPage.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -704,12 +704,14 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
704704
</>
705705
)}
706706
{!isEmptyObject(parentNavigationSubtitleData) && (isMoneyRequestReport || isInvoiceReport || isMoneyRequest || isTaskReport) && (
707-
<ParentNavigationSubtitle
708-
parentNavigationSubtitleData={parentNavigationSubtitleData}
709-
parentReportID={report?.parentReportID}
710-
parentReportActionID={report?.parentReportActionID}
711-
pressableStyles={[styles.mt1, styles.mw100]}
712-
/>
707+
<View style={[styles.w100, styles.mt1]}>
708+
<ParentNavigationSubtitle
709+
parentNavigationSubtitleData={parentNavigationSubtitleData}
710+
parentReportID={report?.parentReportID}
711+
parentReportActionID={report?.parentReportActionID}
712+
pressableStyles={[styles.mw100]}
713+
/>
714+
</View>
713715
)}
714716
</View>
715717
);
@@ -751,12 +753,14 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
751753
const shouldShowTitleField = caseID !== CASES.MONEY_REQUEST && !isFieldDisabled && isAdminOwnerApproverOrReportOwner(report, policy);
752754

753755
const nameSectionFurtherDetailsContent = (
754-
<ParentNavigationSubtitle
755-
parentNavigationSubtitleData={parentNavigationSubtitleData}
756-
parentReportID={report?.parentReportID}
757-
parentReportActionID={report?.parentReportActionID}
758-
pressableStyles={[styles.mt1, styles.mw100]}
759-
/>
756+
<View style={[styles.w100, styles.mt1]}>
757+
<ParentNavigationSubtitle
758+
parentNavigationSubtitleData={parentNavigationSubtitleData}
759+
parentReportID={report?.parentReportID}
760+
parentReportActionID={report?.parentReportActionID}
761+
pressableStyles={[styles.mw100]}
762+
/>
763+
</View>
760764
);
761765

762766
const nameSectionTitleField = !!titleField && (

0 commit comments

Comments
 (0)