Skip to content

Commit

Permalink
Merge pull request #32818 from rezkiy37/fix/26044-tall-emojies
Browse files Browse the repository at this point in the history
Fix tall emojis are chopped off from top
  • Loading branch information
arosiclair authored Dec 27, 2023
2 parents 6a4770a + fb19a56 commit 104d77d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {showContextMenuForReport} from '@components/ShowContextMenuContext';
import Text from '@components/Text';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import useLocalize from '@hooks/useLocalize';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import compose from '@libs/compose';
Expand All @@ -28,6 +29,7 @@ import * as ReportUtils from '@libs/ReportUtils';
import * as TransactionUtils from '@libs/TransactionUtils';
import reportActionPropTypes from '@pages/home/report/reportActionPropTypes';
import reportPropTypes from '@pages/reportPropTypes';
import variables from '@styles/variables';
import * as IOU from '@userActions/IOU';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -120,6 +122,7 @@ const defaultProps = {
function ReportPreview(props) {
const theme = useTheme();
const styles = useThemeStyles();
const {getLineHeightStyle} = useStyleUtils();
const {translate} = useLocalize();

const [hasMissingSmartscanFields, sethasMissingSmartscanFields] = useState(false);
Expand Down Expand Up @@ -270,7 +273,7 @@ function ReportPreview(props) {
<View style={styles.reportPreviewBoxBody}>
<View style={styles.flexRow}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text style={[styles.textLabelSupporting, styles.mb1, styles.lh20]}>{getPreviewMessage()}</Text>
<Text style={[styles.textLabelSupporting, styles.mb1, getLineHeightStyle(variables.lineHeightXXLarge)]}>{getPreviewMessage()}</Text>
</View>
{!iouSettled && hasErrors && (
<Icon
Expand Down
9 changes: 5 additions & 4 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ const styles = (theme: ThemeColors) =>
...whiteSpace.preWrap,
color: theme.heading,
fontSize: variables.fontSizeXLarge,
lineHeight: variables.lineHeightXXLarge,
lineHeight: variables.lineHeightXXXLarge,
},

textHeadlineH1: {
Expand Down Expand Up @@ -1579,7 +1579,7 @@ const styles = (theme: ThemeColors) =>
optionDisplayName: {
fontFamily: fontFamily.EXP_NEUE,
minHeight: variables.alternateTextHeight,
lineHeight: variables.lineHeightXLarge,
lineHeight: variables.lineHeightXXLarge,
...whiteSpace.noWrap,
},

Expand All @@ -1599,7 +1599,7 @@ const styles = (theme: ThemeColors) =>

optionAlternateText: {
minHeight: variables.alternateTextHeight,
lineHeight: variables.lineHeightXLarge,
lineHeight: variables.lineHeightXXLarge,
},

optionAlternateTextCompact: {
Expand Down Expand Up @@ -1727,7 +1727,7 @@ const styles = (theme: ThemeColors) =>
fontFamily: fontFamily.EXP_NEUE_BOLD,
fontSize: variables.fontSizeNormal,
fontWeight: fontWeightBold,
lineHeight: variables.lineHeightXLarge,
lineHeight: variables.lineHeightXXLarge,
...wordBreak.breakWord,
},

Expand Down Expand Up @@ -3684,6 +3684,7 @@ const styles = (theme: ThemeColors) =>
fontFamily: isSelected ? fontFamily.EXP_NEUE_BOLD : fontFamily.EXP_NEUE,
fontWeight: isSelected ? fontWeightBold : '400',
color: isSelected ? theme.text : theme.textSupporting,
lineHeight: 14,
} satisfies TextStyle),

tabBackground: (hovered: boolean, isFocused: boolean, background: string | Animated.AnimatedInterpolation<string>) => ({
Expand Down

0 comments on commit 104d77d

Please sign in to comment.