Skip to content

Conversation

@natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Dec 5, 2025

Follow-up to #103685. This PR applies our new typography tokens to the existing theme object.

The values are equivalent, they just are now generated from from the Figma document and exposed in the theme.

Migration for core components will happen in a follow-up PR.

@natemoo-re natemoo-re requested a review from a team as a code owner December 5, 2025 19:25
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 5, 2025
Comment on lines +533 to +545
const legacyTypography = {
fontSize: typography.font.size,
fontWeight: {
normal: typography.font.weight.regular,
bold: typography.font.weight.medium,
},
text: {
family: typography.font.family.sans,
familyMono: typography.font.family.mono,
lineHeightHeading: typography.font.lineHeight.default,
lineHeightBody: typography.font.lineHeight.comfortable,
},
} as const;
Copy link
Member Author

Choose a reason for hiding this comment

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

Separated to a legacy object so we can migrate in follow-up

type: 'light' as 'light' | 'dark',
// @TODO: color theme contains some colors (like chart color palette, diff, tag and level)
...commonTheme,
fontSize,
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that the fontSize property of commonTheme was being overwritten here. That is no longer the case, but the overrides match the new values. No functional change here.

} as const;

const legacyTypography = {
fontSize: typography.font.size,
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Font size xl and 2xl values changed unexpectedly

The PR description states "The values are equivalent" but fontSize.xl changed from '18px' to '20px' and fontSize['2xl'] changed from '20px' to '24px'. This affects any component using these font size tokens and could cause visual regressions across the application.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Member Author

@natemoo-re natemoo-re Dec 5, 2025

Choose a reason for hiding this comment

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

See #104468 (comment). The old values were already being overwritten, so there is no functional change here. It was an intentional decision to adjust our type scale in UI2.

fontSize: typography.font.size,
fontWeight: {
normal: typography.font.weight.regular,
bold: typography.font.weight.medium,
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: fontWeight.bold changed from 600 to 500

The PR description claims values are equivalent, but fontWeight.bold changed from 600 to 500 (via typography.font.weight.medium). This makes bold text noticeably lighter throughout the application, which is a visual breaking change that contradicts the stated intent of the PR.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

This one is actually accurate! I'll check with @Jesse-Box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants