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

Storybook: Add stub doc on existing colors. #65982

Merged
merged 5 commits into from
Oct 10, 2024
Merged

Storybook: Add stub doc on existing colors. #65982

merged 5 commits into from
Oct 10, 2024

Conversation

jasmussen
Copy link
Contributor

What?

Adds a first stub file for a new Storybook document on the colors that exist in base styles.

2024-10-09 12 10 02 localhost c91af00f1d2a

Why?

You shouldn't have to look in an SCSS file to find the existing colors documented,

Testing Instructions

Check out the branch, and run storybook: npm run storybook:dev, then browse to Tokens > Color

@jasmussen jasmussen added [Type] Enhancement A suggestion for improvement. Storybook Storybook and its stories for components Design System Issues related to the system of combining components according to best practices. labels Oct 9, 2024
@jasmussen jasmussen self-assigned this Oct 9, 2024
@jameskoster
Copy link
Contributor

This is neat :)

I wonder if it would be beneficial to group the grays together like you'd done with the alert colors. This would condense the page a lot.

Notes on accessibility pairings can appear in a section below with more details.

While they're not part of gutenberg, components do reference accent/theme color(s), so we should probably include those too?

@jasmussen
Copy link
Contributor Author

Thank you!

I wonder if it would be beneficial to group the grays together like you'd done with the alert colors. This would condense the page a lot.

Notes on accessibility pairings can appear in a section below with more details.

These two together, make a lot of sense.

While they're not part of gutenberg, components do reference accent/theme color(s), so we should probably include those too?

I'm tempted to do that as a followup. More than actually documenting the colors, the most important part of this PR is to get a start on organizing some of these bits. Once some of the missing pages are built out, I'm hoping there can be a slew of tiny PRs that are easy to make, that can be inspired by these first tiny steps. What do you think?

Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

Given the scope of this PR (kickstarting an effort to add more docs), this is LGTM

We can focus on information hierarchy, contents and format later down the line.

We also need to get more knowledgeable with the tools offered natively by Storybook , such as the ColorPalette and ColorItem components used in this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

While this document (and following ones) are a WIP, should we make less discoverable? Maybe we could change the file path to something like storybook/stories/_system/tokens/color.mdx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I would prefer not to, because even if the document, and followups of the same type, are meant to be stubs and starting points, they should nevertheless be immediately useful, and document what's already shipping. In this case, these colors are just extracted from base styles, but are more easily digestible here.

However I'm happy to defer to opinions otherwise, and move it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have a strong opinion either. Maybe @mattrwalker can help, as he recently worked on the Storybook's site map?

In any case, not a blocking comment. Any changes that we discuss can be applied in follow-up PRs.

@jasmussen
Copy link
Contributor Author

Just noting that I pushed a quick update to address Jay's feedback. The appearance is now this:

Screenshot 2024-10-09 at 15 20 19

@jasmussen jasmussen marked this pull request as ready for review October 9, 2024 13:21
Copy link

github-actions bot commented Oct 9, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: mattrwalker <mattryanwalker@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@mattrwalker
Copy link
Contributor

Just noting that I pushed a quick update to address Jay's feedback. The appearance is now this:

Screenshot 2024-10-09 at 15 20 19

Might have to mess with the layout, looks a little crowded now, but as a start to documenting what exists, this is great.

@jameskoster
Copy link
Contributor

Hmm yeah. Maybe black and white are their own set?

@jasmussen
Copy link
Contributor Author

I had the same thought. I have to step away for a bit, can do tomorrow, otherwise feel free to push.

@jasmussen
Copy link
Contributor Author

Looks pretty good to me:
Screenshot 2024-10-10 at 08 40 02

@ciampo ciampo merged commit d809650 into trunk Oct 10, 2024
64 checks passed
@ciampo ciampo deleted the add/color-readme branch October 10, 2024 09:42
@github-actions github-actions bot added this to the Gutenberg 19.5 milestone Oct 10, 2024
ciampo added a commit that referenced this pull request Oct 14, 2024
* Storybook: Add stub doc on existing colors.

* Update 4.6 to 4.5 for contrast.

* Update based on feedback.

* Use SCSS also for the alerts.

* Separate white and black.

---

Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: mattrwalker <mattryanwalker@git.wordpress.org>
karthick-murugan pushed a commit to karthick-murugan/gutenberg that referenced this pull request Nov 13, 2024
* Storybook: Add stub doc on existing colors.

* Update 4.6 to 4.5 for contrast.

* Update based on feedback.

* Use SCSS also for the alerts.

* Separate white and black.

---

Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: mattrwalker <mattryanwalker@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design System Issues related to the system of combining components according to best practices. Storybook Storybook and its stories for components [Type] Enhancement A suggestion for improvement.
Projects
Status: 💫 Done
Development

Successfully merging this pull request may close these issues.

4 participants