[HOLD - TESTING][Typography] Add semantic type tokens and block new raw font sizes - #96880
Draft
grgia wants to merge 11 commits into
Draft
[HOLD - TESTING][Typography] Add semantic type tokens and block new raw font sizes#96880grgia wants to merge 11 commits into
grgia wants to merge 11 commits into
Conversation
Contributor
|
🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Contributor
|
🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
grgia
commented
Jul 23, 2026
Comment on lines
108
to
+109
| <Text | ||
| fontSize={variables.fontSizeLabel} | ||
| variant="label" |
Contributor
|
🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here. |
Contributor
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
# Conflicts: # config/eslint/eslint.seatbelt.tsv
# Conflicts: # config/eslint/eslint.seatbelt.tsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Text styles now come from a typography token layer (
src/styles/typography.ts), and new rawfontSize/lineHeightliterals are blocked by lint.Type styles have drifted with nothing to stop it:
fontSizeH1andfontSizeH2are both 19, and ~75text*styles express about a dozen real roles because color is baked into type styles. The token file defines a primitive scale plus semantic variants named after the Figma type styles, and the existingtext*styles are aliased to those tokens with color re-attached at the alias boundary. Design confirmed the Figma library is the source of truth for values, so this PR also aligns four drifted values (headline line height 32→28, label 18→16, micro strong 16→14, intro headline 45→44). Everything else renders exactly as before.Product/*styles<Text variant="...">added,fontSizeprop deprecatedeslint-seatbeltQRSharemigrated as the worked exampleintroHeadlinematches the new FigmaProduct/Intro HeadlinestyleFixed Issues
$ #37503
PROPOSAL:
Tests
npm run test -- tests/unit/NoRawTypographyRuleTest.ts tests/unit/TextVariantTest.tsxand verify both suites pass.fontSize: 17to any component style, runnpm run linton that file, and verify therulesdir/no-raw-typographyerror appears.main.Offline tests
None, style definitions only. No network-dependent behavior.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari