Skip to content
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

Merged
merged 2 commits into from
Apr 29, 2024
Merged

Conversation

braunjj
Copy link
Contributor

@braunjj braunjj commented Apr 26, 2024

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

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

How I Tested These Changes

Loaded up the UI and clicked around.

Copy link

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-od34kb8r7-elementl.vercel.app
https://jb-font-fixes.components-storybook.dagster-docs.io

Built with commit 5630436.
This pull request is being automatically deployed with vercel-action

Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-6atyn1g0q-elementl.vercel.app
https://jb-font-fixes.core-storybook.dagster-docs.io

Built with commit 5630436.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor

@salazarm salazarm left a 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!

@braunjj braunjj merged commit 8d29e93 into master Apr 29, 2024
3 checks passed
@braunjj braunjj deleted the jb-font-fixes branch April 29, 2024 21:32
braunjj added a commit that referenced this pull request Apr 30, 2024
nikomancy pushed a commit to nikomancy/dagster that referenced this pull request May 1, 2024
## 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.
nikomancy pushed a commit to nikomancy/dagster that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants