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
Updated theme.json schema descriptions to be more complete #48475
base: trunk
Are you sure you want to change the base?
Updated theme.json schema descriptions to be more complete #48475
Conversation
Fixes WordPress#48450. Props tresorama.
@tomdevisser This change might make sense, but unfortunately, these schemas are also used at the Personally, I feel that the description of the higher level properties will tell us to which level the change is being made. What do you think? |
@t-hamano Oh, sorry, hadn't noticed that. So there's no way to "decouple" these descriptions? There must be right? |
Addition: In any case we could still update the description for |
If this will be merged I suggest to also update the description for |
@tresorama I deliberately didn't use the term |
If this is not possible maybe this can be somehow inspirational. This is how Chakra let dev open documentation directly on context. Maybe put detailed description in doc site and link there from schema. I posted here because it's related. |
Maybe i'm missing something, sorry but i started using Gutenberg in last 10 days . In test that i have done I can only "see" that max-width (content or wide) is applied to a block only if that block is child of "Group" block (not Row or Stack). If I go to site editor (not page editor) and place an "Image" at root level the UI doesn't let me choose between "wide (wideSize)" or "none (contentSize)", and in the frontend the"Image" is full width. I noted that "Group" has a css class This is why i was saying Editor Kapture.2023-02-27.at.20.26.03.mp4 |
@tresorama Got it, and makes sense, but from a frontend perspective when the alignment is "None", that's what you call "constrained". That felt weird to me, as "constrained" sounds like it's not the default option. But it also varies per block. I guess an Image is usually not a top-level block, but mainly used as an inner block to blocks like Group, Columns, Row, etc. That was my philosophy anyway, but you can look at it from both ways. Let's see if anyone else has a strong opinion about this, I think it's fine either way but this one makes a bit more sense to me. |
In my mental model :
Of course this subject is "opinion" land. I have not spent enougt time with Gutenberg to have a strong opinion, let's wait for core maintainers. I only add this:
|
@tresorama Yes, makes a lot of sense when looking at the classes, something I never need to cause I always use block variations, custom blocks (block.json) and theme.json for my styling where I use my own classes. As that's the recommended way (core classes could change at any time).
Also agreed, let's see if others chime in with different opinions. |
Fixes #48450.
Props tresorama.
What?
Updated descriptions in theme.json's schema.
Why?
Some descriptions were very short and incomplete, which made them confusing.
How?
By taking suggestions on #48450 and adjusting theme how I saw fit.
Testing Instructions
styles.typography
styles.color
styles.border
styles.filter
styles.shadow
styles.outline
settings.layout.contentSize