Fix descender character clipping in merchant rule rows#84187
Fix descender character clipping in merchant rule rows#84187luacmartins merged 3 commits intomainfrom
Conversation
…ping The descriptionTextStyle overrides fontSize to 15px but relies on the default lineHeight of 16px from MenuItem, creating a ratio too tight for descender characters (g, y, p, q, j). Adding lh20 (lineHeight: 20) provides the proper lineHeight for fontSizeNormal (15px). Co-authored-by: Carlos Martins <luacmartins@users.noreply.github.com>
Co-authored-by: Situ Chandra Shil <108292595+situchan@users.noreply.github.com>
|
Updated |
|
@thesahindia @luacmartins One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
Co-authored-by: Carlos Martins <luacmartins@users.noreply.github.com>
|
@sobitneupane @luacmartins One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
The failing checks ( This PR only modifies I've pushed an empty commit to retrigger CI. |
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.3.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.32-3 🚀
|


Explanation of Change
The
descriptionTextStyleinMerchantRulesSection.tsxoverrides the description font size to 15px (viastyles.fontSizeNormal) but doesn't provide a matchinglineHeight. TheMenuItemcomponent internally applies a defaultlineHeightof 16px (textLineHeightNormal) for description text when a title is present. This creates a lineHeight-to-fontSize ratio of only 1.067 (16/15), which is too tight for letters with descenders (g, y, p, q, j). Combined withoverflow: clipfrom React Native Web'snumberOfLines={2}implementation, descender strokes on the last visible line get clipped.This PR adds
styles.lh20(lineHeight: 20) to thedescriptionTextStylearray. The value 20px is thefontSizeNormalHeightspecifically designed forfontSizeNormal(15px), giving a proper ratio of 1.33 that comfortably accommodates descenders.Fixed Issues
$ #84176
Tests
Offline tests
This is a styling-only change. No network requests are involved — the merchant rule row renders from local state regardless of connectivity.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — styling change only affects web (lineHeight with overflow:clip). Native platforms don't use
-webkit-line-clamp.Android: mWeb Chrome
Same fix applies —
styles.lh20sets proper lineHeight on all platforms.iOS: Native
N/A — styling change only affects web (lineHeight with overflow:clip). Native platforms don't use
-webkit-line-clamp.iOS: mWeb Safari
Same fix applies —
styles.lh20sets proper lineHeight on all platforms.MacOS: Chrome / Safari
Verified via automated browser testing — descender characters (g, y) in merchant rule row text are fully visible after adding
styles.lh20.