From 8f636e7af948f5646dced5a187ce7bcaed952424 Mon Sep 17 00:00:00 2001 From: thelullabyy Date: Mon, 8 Dec 2025 19:32:42 +0800 Subject: [PATCH 1/2] fix: revert the revert of 74676 --- .../HTMLEngineProvider/BaseHTMLEngineProvider.tsx | 3 ++- .../MoneyRequestReportPreviewContent.tsx | 2 +- .../TransactionPreview/TransactionPreviewContent.tsx | 10 +++++++++- src/styles/index.ts | 12 ++++++++++-- src/styles/variables.ts | 2 ++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx index 01fad4517e07..e882ed2fd89f 100755 --- a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx +++ b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx @@ -5,6 +5,7 @@ import type {TNode} from 'react-native-render-html'; import useThemeStyles from '@hooks/useThemeStyles'; import convertToLTR from '@libs/convertToLTR'; import FontUtils from '@styles/utils/FontUtils'; +import variables from '@styles/variables'; import type ChildrenProps from '@src/types/utils/ChildrenProps'; import {computeEmbeddedMaxWidth, isChildOfTaskTitle} from './htmlEngineUtils'; import htmlRenderers from './HTMLRenderers'; @@ -150,7 +151,7 @@ function BaseHTMLEngineProvider({textSelectable = false, children, enableExperim 'account-manager-link': HTMLElementModel.fromCustomModel({tagName: 'account-manager-link', contentModel: HTMLContentModel.textual}), 'next-step': HTMLElementModel.fromCustomModel({ tagName: 'next-step', - mixedUAStyles: {...styles.textLabelSupporting, ...styles.lh16}, + mixedUAStyles: {...styles.textLabelSupporting, paddingVertical: variables.labelPaddingVertical}, contentModel: HTMLContentModel.textual, }), 'next-step-email': HTMLElementModel.fromCustomModel({tagName: 'next-step-email', contentModel: HTMLContentModel.textual}), diff --git a/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx index 3a2419ca318e..4df976cbcfd5 100644 --- a/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx @@ -703,7 +703,7 @@ function MoneyRequestReportPreviewContent({ {reportStatus} )} - {expenseCount} + {expenseCount} ) )} diff --git a/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx b/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx index d9d887e750ef..deafd959b954 100644 --- a/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx +++ b/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx @@ -377,7 +377,15 @@ function TransactionPreviewContent({ /> {RBRMessage} diff --git a/src/styles/index.ts b/src/styles/index.ts index 19fba200fd0a..7c9a22163c77 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -359,7 +359,7 @@ const staticStyles = (theme: ThemeColors) => alignItems: 'center', justifyContent: 'center', borderRadius: variables.componentBorderRadiusSmall, - height: 16, + minHeight: 16, }, reportStatusText: { @@ -1450,6 +1450,10 @@ const staticStyles = (theme: ThemeColors) => color: theme.textSupporting, }, + lhUndefined: { + lineHeight: undefined, + }, + lh14: { lineHeight: variables.lineHeightSmall, }, @@ -4109,8 +4113,12 @@ const staticStyles = (theme: ThemeColors) => height: 450, }, + textMicroSupportingPadding: { + padding: variables.paddingSmall, + }, + tabSelectorButton: { - height: variables.tabSelectorButtonHeight, + minHeight: variables.tabSelectorButtonHeight, padding: variables.tabSelectorButtonPadding, flexDirection: 'row', alignItems: 'center', diff --git a/src/styles/variables.ts b/src/styles/variables.ts index 49e33bcd2101..043ca75b3171 100644 --- a/src/styles/variables.ts +++ b/src/styles/variables.ts @@ -52,6 +52,7 @@ export default { defaultAvatarPreviewSize: 360, fabBottom: 25, breadcrumbsFontSize: getValueUsingPixelRatio(19, 32), + labelPaddingVertical: Math.abs((getValueUsingPixelRatio(13, 19) - 16) / 2), fontSizeXXSmall: 7, fontSizeSmall: getValueUsingPixelRatio(11, 17), fontSizeExtraSmall: 9, @@ -133,6 +134,7 @@ export default { inputHeightSmall: 28, inputIconMarginTopSmall: getValueUsingPixelRatio(8, 11), inputIconMarginTopLarge: getValueUsingPixelRatio(16, 21), + paddingSmall: getValueUsingPixelRatio(7, 8), formErrorLineHeight: getValueUsingPixelRatio(18, 23), communicationsLinkHeight: getValueUsingPixelRatio(20, 30), alternateTextHeight: getValueUsingPixelRatio(20, 24), From d375fc962b925cfa3115444537d05783db27fb39 Mon Sep 17 00:00:00 2001 From: thelullabyy Date: Mon, 8 Dec 2025 19:36:13 +0800 Subject: [PATCH 2/2] fix: useMemo dep --- src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx index e882ed2fd89f..b43192861715 100755 --- a/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx +++ b/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx @@ -194,6 +194,7 @@ function BaseHTMLEngineProvider({textSelectable = false, children, enableExperim styles.taskTitleMenuItemItalic, styles.em, styles.h1, + styles.lh16, styles.blockquote, styles.onlyEmojisTextLineHeight, styles.subTextFileUpload,