-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clean up text styles and simplify text style names #21450
Conversation
Deploy preview for dagit-storybook ready! ✅ Preview Built with commit 5630436. |
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 5630436. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
## Summary & Motivation This PR aims to clean up all of our text styles, and introduces a new simplified naming convention that matches the style names within Figma. The old text style naming convention of `body`, `body1`, and `body2` was difficult to grok, ie: is body2 bigger or smaller than body1? When should I `CaptionBold` or `SubtitleCaption`? **Now we now have just 3 main text styles `Subtitle`, `Body`, and `Mono`.** - Each of these comes in a large and small variant, ie: `SubtitleLarge`| `Subtitle` | `SubtitleSmall` - There are 3 other less utilized styles `title`, `heading`, and `code`. The full set of styles now looks like this, and IMO is much easier to reason about. ![image](https://github.com/dagster-io/dagster/assets/2798333/dcc79be7-aa03-45a5-9d9b-81a57d6aae73) ## Legacy styles I've renamed or removed all the previous styles except for `caption` which is used in a lot of places. `caption` is the exact same style as the new `bodySmall` style. ## In Figma This has all been updated in Figma as well. In Dev mode, selecting any text will now show it's corresponding style name in code. ![image](https://github.com/dagster-io/dagster/assets/2798333/4d34a002-1046-43be-a7f6-d08725e94e05) ## How I Tested These Changes Loaded up the UI and clicked around.
Summary & Motivation
This PR aims to clean up all of our text styles, and introduces a new simplified naming convention that matches the style names within Figma.
The old text style naming convention of
body
,body1
, andbody2
was difficult to grok, ie: is body2 bigger or smaller than body1? When should ICaptionBold
orSubtitleCaption
?Now we now have just 3 main text styles
Subtitle
,Body
, andMono
.SubtitleLarge
|Subtitle
|SubtitleSmall
title
,heading
, andcode
.The full set of styles now looks like this, and IMO is much easier to reason about.
Legacy styles
I've renamed or removed all the previous styles except for
caption
which is used in a lot of places.caption
is the exact same style as the newbodySmall
style.In Figma
This has all been updated in Figma as well. In Dev mode, selecting any text will now show it's corresponding style name in code.
How I Tested These Changes
Loaded up the UI and clicked around.