Skip to content
Merged
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
7 changes: 4 additions & 3 deletions src/pages/workspace/rules/MerchantRulesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ function MerchantRulesSection({policyID}: MerchantRulesSectionProps) {
renderTitle={renderTitle}
subtitle={translate('workspace.rules.merchantRules.subtitle')}
subtitleMuted
childrenStyles={[styles.gap3]}
>
{hasRules && (
<View style={[styles.mt3]}>
<View style={[styles.mt3, styles.gap2]}>
{sortedRules.map((rule) => {
const merchantName = rule.filters?.right ?? '';
const isExactMatch = rule.filters?.operator === CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO;
Expand All @@ -136,8 +137,8 @@ function MerchantRulesSection({policyID}: MerchantRulesSectionProps) {
<MenuItemWithTopDescription
description={matchDescription}
title={ruleDescription}
wrapperStyle={[styles.sectionMenuItemTopDescription]}
descriptionTextStyle={[styles.textSupportingNormal, styles.textStrong, styles.themeTextColor]}
wrapperStyle={[styles.borderedContentCard, styles.ph4, styles.pv4]}
descriptionTextStyle={[styles.textNormalThemeText]}

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.

This change caused #87270. Switching descriptionTextStyle from textSupportingNormal (which includes lineHeight: 20) to textNormalThemeText (which only sets fontSize: 15 with no lineHeight) caused MenuItem to fall back to its default lineHeight: 16. With a 16/15 ratio and numberOfLines={2} + overflow: hidden, descender characters ('g', 'y', 'p', etc.) on the last visible line get clipped. Fixed in #87300 by adding lineHeight: variables.fontSizeNormalHeight to the description text style.

titleStyle={[styles.textLabelSupporting, styles.fontSizeLabel]}
shouldShowRightIcon
onPress={() => Navigation.navigate(ROUTES.RULES_MERCHANT_EDIT.getRoute(policyID, rule.ruleID))}
Expand Down
Loading