Skip to content
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
1 change: 1 addition & 0 deletions src/components/MessagesRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function MessagesRow({messages = {}, type, onDismiss, containerStyles, dismissEr
<Tooltip text={dismissText}>
<PressableWithoutFeedback
onPress={onDismiss}
style={styles.touchableButtonImage}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the stale margin from the created-action error row

When a room-creation error is rendered by ReportActionItemCreated, that caller still passes errorRowStyles={[styles.ml10, styles.mr2, styles.mb2]} at src/pages/inbox/report/ReportActionItemCreated.tsx:70. The new 40px pressable already places the 20px icon 10px from the edge, so the retained 8px right margin moves this dismiss icon 18px inward, unlike the equivalent report-action error rows updated in this commit. Remove styles.mr2 from that caller as well so this error state gets the intended alignment.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@MelvinBot, apply the feedback above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 I removed styles.mr2 from the created-action error row and pushed it (b0434db0). The row now uses [styles.ml10, styles.mb2] in ReportActionItemCreated.tsx:70. This matches the other report-action error rows.

One more caller still passes styles.mr2: the wallet terms error row in WalletPage/index.tsx:895. Its dismiss "X" now sits 18px from the edge. Do you want me to remove it there too?

I couldn't run lint or Prettier in this environment. The change only removes one array item, so CI should confirm it.

role={CONST.ROLE.BUTTON}
accessibilityLabel={dismissText}
sentryLabel={CONST.SENTRY_LABEL.MESSAGES_ROW.DISMISS}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/inbox/report/AncestorReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function AncestorReportActionItem({
shouldDisableOpacity={!!reportAction?.pendingAction}
pendingAction={report?.pendingFields?.addWorkspaceRoom ?? report?.pendingFields?.createChat}
errors={report?.errorFields?.addWorkspaceRoom ?? report?.errorFields?.createChat}
errorRowStyles={[styles.ml10, styles.mr2]}
errorRowStyles={styles.ml10}
onClose={deleteAncestorReportAndNavigateToConcierge}
>
{shouldDisplayThreadDivider && (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/inbox/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ function ReportActionItem({
}
shouldHideOnDelete={!isDeletedParentAction}
errors={(linkedTransactionRouteError ?? !isOnSearch) ? getLatestErrorMessageField(action as OnyxDataWithErrors) : {}}
errorRowStyles={[styles.ml10, styles.mr2]}
errorRowStyles={styles.ml10}
needsOffscreenAlphaCompositing={isMoneyRequestAction(action)}
shouldDisableStrikeThrough
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/inbox/report/ReportActionItemCreated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function ReportActionItemCreated({reportID, policyID}: ReportActionItemCreatedPr
<OfflineWithFeedback
pendingAction={report?.pendingFields?.addWorkspaceRoom ?? report?.pendingFields?.createChat}
errors={report?.errorFields?.addWorkspaceRoom ?? report?.errorFields?.createChat}
errorRowStyles={[styles.ml10, styles.mr2, styles.mb2]}
errorRowStyles={[styles.ml10, styles.mb2]}
onClose={() =>
clearCreateChatError(
report,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/inbox/report/ReportActionItemParentAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function ReportActionItemParentAction({
errors={
report?.errorFields?.createChatThread ?? (report?.errorFields?.createChat ? getMicroSecondOnyxErrorWithTranslationKey('report.genericCreateReportFailureMessage') : null)
}
errorRowStyles={[styles.ml10, styles.mr2]}
errorRowStyles={styles.ml10}
onClose={onCloseParentReportActionItem}
>
{ancestors.map(({report: ancestorReport, reportAction: ancestorReportAction, shouldDisplayNewMarker}) => (
Expand Down
Loading