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

Docs: Table of styles keys with since versions #48265

Conversation

DaisyOlsen
Copy link
Contributor

@DaisyOlsen DaisyOlsen commented Feb 21, 2023

What?

This PR is a first pass at expanding theme.json documentation with more granular information. Starting with a table of theme.json styles keys and the versions implemented in theme.json and the styles editor, respectively.

I'm not sure this is the best long-term approach to display this information, but working within the confines of what can be accomplished on the DevHub site.

Fixes #44340

ToDo

  • Add Introductory text
  • Add theme.json since versions
  • Add styles editor since versions
  • Maybe add styles. to the beginning of each key for the sake of being complete

Why?

It can be difficult to know exactly what options are available in theme.json and, from those, which have a user interface implementation that can be used from the styles editor panel.

This table will ideally also exist on the Theme Developer Handbook, covering only options that have been already made available in Core.

I've created this as a new page since the theme.json How-To page has become extremely long.

How?

This table is a first attempt at making this information available in an easy-to-scan format. This is PR is not ready to publish but is being submitted for feedback about the overall format of the table..

Testing Instructions

Confirm that the list of styles keys is complete and accurate and the Since columns contain accurate versions for WP Core inclusion or N/A if not yet available.

@github-actions
Copy link

github-actions bot commented Feb 21, 2023

Flaky tests detected in 93b48ca.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4326947518
📝 Reported issues:

Copy link
Contributor

@justintadlock justintadlock left a comment

Choose a reason for hiding this comment

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

I haven't checked to see if every setting is here , but I did notice that spacing.spacingScale and spacing.spacingSizes were missing. And, color.duotone. Note sure if you're aiming for complete coverage of all possible settings.

@DaisyOlsen
Copy link
Contributor Author

Aren't the items you mentioned in settings? The table is only covering styles as the issue is about mapping style controls to The styles editor UI and not about supports or presets(there are a few presets that do have a UI, though, which should be addressed somewhere along the way.)

@justintadlock
Copy link
Contributor

Aren't the items you mentioned in settings? The table is only covering styles as the issue is about mapping style controls to The styles editor UI and not about supports or presets(there are a few presets that do have a UI, though, which should be addressed somewhere along the way.)

Yes, it wasn't clear to me what was going on. Since these are styles, I think it'd be beneficial to put that in the intro that these keys can apply to the root, blocks, or elements under the styles property in theme.json.

Otherwise, it looks good to me.

@DaisyOlsen
Copy link
Contributor Author

I think this PR is ready for a round of approval reviews. I would love to get this pushed live within the next week, so any suggestions to improve on this would be great.

@DaisyOlsen DaisyOlsen requested review from justintadlock and bph March 4, 2023 17:53
@DaisyOlsen DaisyOlsen self-assigned this Mar 8, 2023
@DaisyOlsen DaisyOlsen added the [Type] Developer Documentation Documentation for developers label Mar 8, 2023
@DaisyOlsen DaisyOlsen merged commit 4d2d3e0 into trunk Mar 8, 2023
@DaisyOlsen DaisyOlsen deleted the 44340-themes-provide-more-resources-to-clarify-what-can-be-done-in-themejson-vs-styles-interface branch March 8, 2023 17:38
@github-actions github-actions bot added this to the Gutenberg 15.4 milestone Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Themes: Provide more resources to clarify what can be done in theme.json vs Styles interface
2 participants