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

feat: Create stories for DS color scheme #13099

Merged
merged 7 commits into from
Jul 10, 2024

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented Jun 2, 2024

Description

Adds a set of stories to Storybook, showcasing the Color scheme.

Only shows the base color tokens and the semantic colors.

Does not create Chromatic snapshots

Copy link

netlify bot commented Jun 2, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 84ea229
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/668dc89bfd70370008dc67b7
😎 Deploy Preview https://deploy-preview-13099--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 53 (🟢 up 2 from production)
Accessibility: 92 (no change from production)
Best Practices: 91 (🔴 down 1 from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the tooling 🔧 Changes related to tooling of the project label Jun 3, 2024
@TylerAPfledderer
Copy link
Contributor Author

@pettinarip I am not a fan of placing this in components/BaseStories as we are not featuring a component here. Maybe have a stories folder in @chakra-ui?

@pettinarip
Copy link
Member

Wohoo! this is great man. cc @nloureiro look at this 💪🏼

@pettinarip I am not a fan of placing this in components/BaseStories as we are not featuring a component here. Maybe have a stories folder in @chakra-ui?

Good point and good idea. Lets do that. It will be more organized.

@nloureiro
Copy link
Contributor

Awesome!!!
Thank you @TylerAPfledderer

Just a heads up, we probably will do a big update on the colors alongside the homepage EPIC.
This is a great base to bootstrap this change later next quarter.

@TylerAPfledderer
Copy link
Contributor Author

@pettinarip @nloureiro as an FYI, I am hoping to flip this over to creating the stories via MDX.

For Example, check out the Narmi Design System Color Stories which have the MDX doc of different groups of colors in their DS, which in turn generates the individual stories for each group.

This would probably be better discussed with overall consideration in adding docs to the other stories from the DS.

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

LGTM @TylerAPfledderer, left one potential improvement.

<Stack direction="column">
<Text size="sm">{value}</Text>
<Text size="sm">
{color}.{tokenKey}
Copy link
Member

Choose a reason for hiding this comment

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

Good job @TylerAPfledderer. I like how we are displaying the colors in the Primitives case.

Two things I think would be useful for devs to display on the semantic tokens story:

  1. code example or semantic token usage
  2. primitive color reference

For example, for the primary "base" token we could add:

  1. how it would be used in code: primary.base
  2. the primitive color used by this token: blue.500 or orange.500

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pettinarip will do! I think I have an approach in mind.

Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer Jun 25, 2024

Choose a reason for hiding this comment

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

@pettinarip I updated the labelling of the semantic tokens. It got a little tricky trying to come up with a good way to extract the foundation tokens for each to make as labels. I don't want to try and spend too much time trying to come up with some generator that would get messy in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Sure. Cool, it looks more useful now with the actual tokens that we use on the code, thanks!

color: string
children: ReactNode
}) => {
return (
Copy link
Member

Choose a reason for hiding this comment

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

image

@TylerAPfledderer Getting this when I look at the primitives in Dark Mode. Otherwise this all looks great!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wackerow yea... they should not be view in dark mode. Only light mode. I did not create this story with that in mind.

Need to figure out how I can update the SB config to force a color mode! That's been a back-burner task with the Chakra provider

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could just remove the color and bg to leave it under control of the parent.

Would look like this:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't think that would make sense because we don't see the orange shades in light mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe here I could more easily show the blues or the oranges based on color mode. I'll take a look at that.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure I followed you there @TylerAPfledderer.

IMO we should not do anything here in terms of color mode, since the purpose of this story is to list the color palette we use. The color mode should only be reflected within the semantic tokens story.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then I would try and disable the color mode toggle on the toolbar. We don't want to be switching modes because we just want to view everything at the same time (mimicking what it looks like in the figma file)

@corwintines corwintines self-assigned this Jul 9, 2024
Copy link
Member

@corwintines corwintines left a comment

Choose a reason for hiding this comment

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

Overall I think this is ready to pull in as is, and can make any improvements in other PRs. Any objections to pulling this in @pettinarip @TylerAPfledderer @wackerow?

@corwintines corwintines merged commit 0b7eae4 into ethereum:dev Jul 10, 2024
9 of 10 checks passed
@TylerAPfledderer TylerAPfledderer deleted the feat/color-scheme-stories branch July 10, 2024 02:20
This was referenced Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling 🔧 Changes related to tooling of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants