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

Update theme.json docs for WordPress 5.8 #33131

Merged
merged 4 commits into from
Jul 2, 2021
Merged

Conversation

oandregal
Copy link
Member

@oandregal oandregal commented Jul 1, 2021

Part of #20331

WordPress 5.8 comes with support for theme.json, so we need to update the docs accordingly: remove references to "experimental", highlight which parts only work on Gutenberg vs WordPress 5.8, etc.

See the document.

Note that there're a few call-outs that will be displayed differently in the block editor handbook. For reference, this is how the current call-out looks:

Captura de ecrã de 2021-07-01 12-10-37

@oandregal oandregal requested review from mkaz and DaisyOlsen July 1, 2021 10:09
@oandregal oandregal self-assigned this Jul 1, 2021
@oandregal oandregal added [Type] Developer Documentation Documentation for developers Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jul 1, 2021
The settings section has the following structure:

{% codetabs %}
{% WordPress %}
Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about naming this "WordPress 5.8" instead.

The reason I didn't was that I believe this text has to be a single string without spaces. When I introduced the "Input"/"Output" for sections like this one https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#css-custom-properties-presets-custom I have a vague memory of having used "theme.json"/"CSS styles" and that it was problematic. Will look it up to confirm.

Copy link
Member Author

@oandregal oandregal Jul 1, 2021

Choose a reason for hiding this comment

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

#28655 illustrates what happened when using spaces in the codetabs texts.


### Settings

<div class="callout callout-alert">
Copy link
Member Author

Choose a reason for hiding this comment

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

This would be styled as a callout.

@@ -462,8 +511,81 @@ Note that the name of the variable is created by adding `--` in between each nes

### Styles

<div class="callout callout-alert">
Copy link
Member Author

Choose a reason for hiding this comment

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

This would be styled as a callout.

@@ -702,6 +826,10 @@ h3 {

### customTemplates

<div class="callout callout-alert">
Copy link
Member Author

Choose a reason for hiding this comment

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

This would be styled as a callout.

@@ -727,6 +855,10 @@ Within this field themes can list the custom templates present in the `block-tem

### templateParts

<div class="callout callout-alert">
Copy link
Member Author

Choose a reason for hiding this comment

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

This would be styled as a callout.

@oandregal oandregal changed the title Update theme.json docs for 5 8 Update theme.json docs for WordPress 5.8 Jul 1, 2021
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

Thank you for these updates. They look good to me 👍

"duotone": [],
"gradients": [],
"link": false,
"palette": []
Copy link
Member

Choose a reason for hiding this comment

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

It may be helpful to define a preset like a color so people know how to do it.

Copy link
Member Author

Choose a reason for hiding this comment

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

There's a section fully focused on presets.

@oandregal oandregal merged commit 3938f14 into trunk Jul 2, 2021
@oandregal oandregal deleted the update/theme-json-for-5-8 branch July 2, 2021 08:09
@github-actions github-actions bot added this to the Gutenberg 11.1 milestone Jul 2, 2021
@oandregal oandregal mentioned this pull request Jul 2, 2021
82 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants