From f915afa7347079839d63a332306727b4dd612d4a Mon Sep 17 00:00:00 2001 From: annaweber Date: Sat, 13 Dec 2025 02:51:10 -0800 Subject: [PATCH 01/10] fix: android chat header markdown error --- .../ComposerWithSuggestions/ComposerWithSuggestions.tsx | 5 +++-- src/styles/index.ts | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx index aed9bf2927dea..04d658e9651a6 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx @@ -3,7 +3,7 @@ import lodashDebounce from 'lodash/debounce'; import type {ForwardedRef, RefObject} from 'react'; import React, {memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; import type {BlurEvent, LayoutChangeEvent, MeasureInWindowOnSuccessCallback, TextInput, TextInputContentSizeChangeEvent, TextInputKeyPressEvent, TextInputScrollEvent} from 'react-native'; -import {DeviceEventEmitter, InteractionManager, NativeModules, StyleSheet, View} from 'react-native'; +import {DeviceEventEmitter, InteractionManager, NativeModules, Platform, StyleSheet, View} from 'react-native'; import {useFocusedInputHandler} from 'react-native-keyboard-controller'; import type {OnyxEntry} from 'react-native-onyx'; import {useAnimatedRef, useSharedValue} from 'react-native-reanimated'; @@ -831,6 +831,7 @@ function ComposerWithSuggestions({ }); }, []); + const composerStyle = [styles.textInputCompose, isComposerFullSize ? styles.textInputFullCompose : styles.textInputCollapseCompose]; return ( <> }, 0, ), + androidComposerFix: { + height: undefined, + lineHeight: undefined, + alignSelf: 'stretch', + flexGrow: 1, + flexShrink: 1, + }, textInputFullCompose: { alignSelf: 'stretch', From b42fe7fa4015db3a8bb871e6415a5ebfdca915dc Mon Sep 17 00:00:00 2001 From: annaweber Date: Sat, 13 Dec 2025 03:48:21 -0800 Subject: [PATCH 02/10] fix: error --- .../ComposerWithSuggestions/ComposerWithSuggestions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx index 04d658e9651a6..1112fee40f199 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx @@ -850,7 +850,7 @@ function ComposerWithSuggestions({ onChangeText={onChangeText} onKeyPress={handleKeyPress} textAlignVertical="top" - style={Platform.OS === 'android' ? StyleSheet.flatten([composerStyle, styles.androidComposerFix]) : composerStyle} + style={Platform.OS === 'android' ? StyleSheet.flatten([...composerStyle, styles.androidComposerFix]) : composerStyle} maxLines={maxComposerLines} onFocus={handleFocus} onBlur={onBlur} From bbf2eedcb6ccc61b99e72d5c23f2c73b0403a50f Mon Sep 17 00:00:00 2001 From: annaweber Date: Mon, 15 Dec 2025 07:13:06 -0800 Subject: [PATCH 03/10] fix: platform check --- .../ComposerWithSuggestions.tsx | 5 ++--- src/styles/index.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx index 1112fee40f199..aed9bf2927dea 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx @@ -3,7 +3,7 @@ import lodashDebounce from 'lodash/debounce'; import type {ForwardedRef, RefObject} from 'react'; import React, {memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; import type {BlurEvent, LayoutChangeEvent, MeasureInWindowOnSuccessCallback, TextInput, TextInputContentSizeChangeEvent, TextInputKeyPressEvent, TextInputScrollEvent} from 'react-native'; -import {DeviceEventEmitter, InteractionManager, NativeModules, Platform, StyleSheet, View} from 'react-native'; +import {DeviceEventEmitter, InteractionManager, NativeModules, StyleSheet, View} from 'react-native'; import {useFocusedInputHandler} from 'react-native-keyboard-controller'; import type {OnyxEntry} from 'react-native-onyx'; import {useAnimatedRef, useSharedValue} from 'react-native-reanimated'; @@ -831,7 +831,6 @@ function ComposerWithSuggestions({ }); }, []); - const composerStyle = [styles.textInputCompose, isComposerFullSize ? styles.textInputFullCompose : styles.textInputCollapseCompose]; return ( <> }, 0, ), - androidComposerFix: { - height: undefined, - lineHeight: undefined, - alignSelf: 'stretch', - flexGrow: 1, - flexShrink: 1, - }, textInputFullCompose: { alignSelf: 'stretch', @@ -2094,6 +2087,13 @@ const staticStyles = (theme: ThemeColors) => textInputCollapseCompose: { maxHeight: '100%', flex: 4, + ...(Platform.OS === 'android' && { + height: undefined, + lineHeight: undefined, + alignSelf: 'stretch', + flexGrow: 1, + flexShrink: 1, + }), }, // composer padding should not be modified unless thoroughly tested against the cases in this PR: #12669 From cf1710a8d0a66804cbecb67206213b350322022d Mon Sep 17 00:00:00 2001 From: annaweber Date: Wed, 17 Dec 2025 12:40:50 -0800 Subject: [PATCH 04/10] fix: edit comment error --- src/pages/home/report/ReportActionItemMessageEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItemMessageEdit.tsx b/src/pages/home/report/ReportActionItemMessageEdit.tsx index 3d9c635349a96..f0ae06cf8e5ec 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.tsx +++ b/src/pages/home/report/ReportActionItemMessageEdit.tsx @@ -505,7 +505,7 @@ function ReportActionItemMessageEdit({ onKeyPress={triggerSaveOrCancel} value={draft} maxLines={shouldUseNarrowLayout ? CONST.COMPOSER.MAX_LINES_SMALL_SCREEN : CONST.COMPOSER.MAX_LINES} // This is the same that slack has - style={[styles.textInputCompose, styles.flex1, styles.bgTransparent]} + style={[styles.textInputCompose, styles.flex1, styles.bgTransparent, styles.textInputCollapseCompose]} onFocus={() => { setIsFocused(true); if (textInputRef.current) { From e65a413346d19ec259ff9356f5ff92e382b9114b Mon Sep 17 00:00:00 2001 From: annaweber Date: Mon, 22 Dec 2025 11:23:11 -0800 Subject: [PATCH 05/10] fix: expand error --- src/styles/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/styles/index.ts b/src/styles/index.ts index 3b3238e50282d..430d978d56626 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -2112,6 +2112,13 @@ const staticStyles = (theme: ThemeColors) => flex: 1, maxHeight: '100%', verticalAlign: 'top', + ...(Platform.OS === 'android' && { + height: undefined, + lineHeight: undefined, + alignSelf: 'stretch', + flexGrow: 1, + flexShrink: 1, + }), }, textInputCollapseCompose: { From 6cae652ea6307247be30949f6c251ab20f41a47f Mon Sep 17 00:00:00 2001 From: annaweber Date: Sun, 28 Dec 2025 02:26:24 -0800 Subject: [PATCH 06/10] fix: code optimize --- .../report/ReportActionItemMessageEdit.tsx | 2 +- src/styles/index.ts | 21 +++++++------------ src/styles/utils/index.ts | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/pages/home/report/ReportActionItemMessageEdit.tsx b/src/pages/home/report/ReportActionItemMessageEdit.tsx index 33b4e165c009c..24b92eb4249dc 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.tsx +++ b/src/pages/home/report/ReportActionItemMessageEdit.tsx @@ -506,7 +506,7 @@ function ReportActionItemMessageEdit({ onKeyPress={triggerSaveOrCancel} value={draft} maxLines={shouldUseNarrowLayout ? CONST.COMPOSER.MAX_LINES_SMALL_SCREEN : CONST.COMPOSER.MAX_LINES} // This is the same that slack has - style={[styles.textInputCompose, styles.flex1, styles.bgTransparent, styles.textInputCollapseCompose]} + style={[styles.textInputCompose, styles.flex1, styles.bgTransparent]} onFocus={() => { setIsFocused(true); if (textInputRef.current) { diff --git a/src/styles/index.ts b/src/styles/index.ts index 430d978d56626..15d3d11bb3e74 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -2103,6 +2103,13 @@ const staticStyles = (theme: ThemeColors) => paddingBottom: 0, alignSelf: 'center', verticalAlign: 'middle', + ...(Platform.OS === 'android' && { + height: undefined, + lineHeight: undefined, + alignSelf: 'stretch', + flexGrow: 1, + flexShrink: 1, + }), }, 0, ), @@ -2112,25 +2119,11 @@ const staticStyles = (theme: ThemeColors) => flex: 1, maxHeight: '100%', verticalAlign: 'top', - ...(Platform.OS === 'android' && { - height: undefined, - lineHeight: undefined, - alignSelf: 'stretch', - flexGrow: 1, - flexShrink: 1, - }), }, textInputCollapseCompose: { maxHeight: '100%', flex: 4, - ...(Platform.OS === 'android' && { - height: undefined, - lineHeight: undefined, - alignSelf: 'stretch', - flexGrow: 1, - flexShrink: 1, - }), }, // composer padding should not be modified unless thoroughly tested against the cases in this PR: #12669 diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 10de277f10f14..9b6cdfa124e1b 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -1873,7 +1873,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ return {}; } - const composerLineHeight = styles.textInputCompose.lineHeight ?? 0; + const composerLineHeight = variables.lineHeightXLarge; return { maxHeight: maxLines * composerLineHeight, From 87415a084c059ad312d2dc272173f9b458ad8233 Mon Sep 17 00:00:00 2001 From: annaweber Date: Sun, 28 Dec 2025 22:20:30 -0800 Subject: [PATCH 07/10] fix: height --- src/styles/utils/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 9b6cdfa124e1b..52561904f2993 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -1,4 +1,4 @@ -import {StyleSheet} from 'react-native'; +import {StyleSheet, Platform} from 'react-native'; // eslint-disable-next-line no-restricted-imports import type {AnimatableNumericValue, Animated, ColorValue, ImageStyle, PressableStateCallbackType, StyleProp, TextStyle, ViewStyle} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -1873,7 +1873,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ return {}; } - const composerLineHeight = variables.lineHeightXLarge; + const composerLineHeight = Platform.OS === 'android' ? variables.lineHeightXLarge : styles.textInputCompose.lineHeight ?? 0; return { maxHeight: maxLines * composerLineHeight, From 6913f8b4ef636ea662b2860925d1ada5465399f3 Mon Sep 17 00:00:00 2001 From: annaweber Date: Sun, 28 Dec 2025 22:26:31 -0800 Subject: [PATCH 08/10] fix: prettier --- src/styles/utils/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 52561904f2993..e4b97f58618ae 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -1,4 +1,4 @@ -import {StyleSheet, Platform} from 'react-native'; +import {Platform, StyleSheet} from 'react-native'; // eslint-disable-next-line no-restricted-imports import type {AnimatableNumericValue, Animated, ColorValue, ImageStyle, PressableStateCallbackType, StyleProp, TextStyle, ViewStyle} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -1873,7 +1873,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ return {}; } - const composerLineHeight = Platform.OS === 'android' ? variables.lineHeightXLarge : styles.textInputCompose.lineHeight ?? 0; + const composerLineHeight = Platform.OS === 'android' ? variables.lineHeightXLarge : (styles.textInputCompose.lineHeight ?? 0); return { maxHeight: maxLines * composerLineHeight, From a2c28e873487b186a164a5f854ed3bd265d500bf Mon Sep 17 00:00:00 2001 From: annaweber Date: Sat, 3 Jan 2026 17:14:55 -0800 Subject: [PATCH 09/10] fix: composer height --- src/styles/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index e4b97f58618ae..0f27dbc2d3a6b 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -1873,7 +1873,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ return {}; } - const composerLineHeight = Platform.OS === 'android' ? variables.lineHeightXLarge : (styles.textInputCompose.lineHeight ?? 0); + const composerLineHeight = variables.lineHeightXLarge ?? 0; return { maxHeight: maxLines * composerLineHeight, From bcfb4433572c96248f2ac6b3c340d4d168d408ac Mon Sep 17 00:00:00 2001 From: annaweber Date: Sat, 3 Jan 2026 17:25:12 -0800 Subject: [PATCH 10/10] fix: prettier and lint --- src/styles/utils/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 0f27dbc2d3a6b..86b75b473aa6d 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -1,4 +1,4 @@ -import {Platform, StyleSheet} from 'react-native'; +import {StyleSheet} from 'react-native'; // eslint-disable-next-line no-restricted-imports import type {AnimatableNumericValue, Animated, ColorValue, ImageStyle, PressableStateCallbackType, StyleProp, TextStyle, ViewStyle} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -1873,7 +1873,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ return {}; } - const composerLineHeight = variables.lineHeightXLarge ?? 0; + const composerLineHeight = variables.lineHeightXLarge ?? 0; return { maxHeight: maxLines * composerLineHeight,