Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tall emojis are chopped off from top #32818

Merged
merged 8 commits into from
Dec 27, 2023
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 @@ -27,6 +28,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 @@ -119,6 +121,7 @@ const defaultProps = {
function ReportPreview(props) {
const theme = useTheme();
const styles = useThemeStyles();
const {getLineHeightStyle} = useStyleUtils();
const {translate} = useLocalize();

const managerID = props.iouReport.managerID || 0;
Expand Down Expand Up @@ -243,7 +246,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 @@ -1585,7 +1585,7 @@ const styles = (theme: ThemeColors) =>
optionDisplayName: {
fontFamily: fontFamily.EXP_NEUE,
minHeight: variables.alternateTextHeight,
lineHeight: variables.lineHeightXLarge,
lineHeight: variables.lineHeightXXLarge,
Copy link
Contributor

Choose a reason for hiding this comment

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

this caused a regression #33647

...whiteSpace.noWrap,
},

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

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

optionAlternateTextCompact: {
Expand Down Expand Up @@ -1734,7 +1734,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 @@ -3690,6 +3690,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) => ({
Expand Down
Loading