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

Layout: Document the current state of the layout block support #42619

Merged
merged 8 commits into from
Oct 5, 2022

Conversation

andrewserong
Copy link
Contributor

@andrewserong andrewserong commented Jul 22, 2022

What?

Following on from #40875 and as part of #39336, this PR attempts to document the current state of the Layout block support.

Why?

While the Layout block support is currently an experimental feature, it is only experimental in the sense that the API is unstable and likely to change. The feature is in use in core and production sites, so while it is experimental, let's attempt to document the current state of the layout support, the purpose and intention behind it, and what it outputs.

The goal with this PR should be to help make it easier to understand how and why things are happening, and also how to opt-in or opt-out of the behaviour as needed (tying into #42544)

How?

  • Update the styles architecture page to include a section on Layout. If need be, we could always pull Layout into a separate file, but I think it makes sense to keep it with the other styles topics.

Tasks

  • Link through to how to opt-in to custom blockGap styles and expose the UI for it
  • Point to where the code lives for the base layout definitions, and the logic to compute those definitions.
  • Flag that the block support is not yet (officially) ready to be opted-into by 3rd party blocks
  • Add is-layout-constrained now that the constrained layout type has been added: Try "constrained" content width as new layout type #42763

Testing Instructions

👀 Proofread and verify that the information is accurate 😄

@andrewserong andrewserong added [Type] Developer Documentation Documentation for developers [Status] In Progress Tracking issues with work in progress Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jul 22, 2022
@andrewserong andrewserong self-assigned this Jul 22, 2022
@andrewserong andrewserong force-pushed the try/documenting-the-layout-block-support branch from 56a5d88 to 1dbb50a Compare September 21, 2022 04:45
@andrewserong andrewserong changed the title [WIP] Layout: Attempt to document the current state of the layout block support Layout: Document the current state of the layout block support Sep 21, 2022
@andrewserong andrewserong force-pushed the try/documenting-the-layout-block-support branch from 8df0b84 to 4db074e Compare October 5, 2022 03:35
@andrewserong andrewserong marked this pull request as ready for review October 5, 2022 03:35
@andrewserong andrewserong added [Feature] Layout Layout block support, its UI controls, and style output. and removed [Status] In Progress Tracking issues with work in progress labels Oct 5, 2022
Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

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

Content is good and clear.

Thank you for writing this!

docs/explanations/architecture/styles.md Outdated Show resolved Hide resolved
docs/explanations/architecture/styles.md Outdated Show resolved Hide resolved
docs/explanations/architecture/styles.md Outdated Show resolved Hide resolved
docs/explanations/architecture/styles.md Outdated Show resolved Hide resolved
andrewserong and others added 2 commits October 5, 2022 15:22
Co-authored-by: Ramon <ramonjd@users.noreply.github.com>
Co-authored-by: Ramon <ramonjd@users.noreply.github.com>
Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

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

Thanks for writing this out, it's very comprehensive! Just one small nit re: naming but looks good otherwise 🎉

docs/explanations/architecture/styles.md Outdated Show resolved Hide resolved
Co-authored-by: tellthemachines <tellthemachines@users.noreply.github.com>
@andrewserong
Copy link
Contributor Author

Thanks for all the feedback @ramonjd and @tellthemachines, I've pushed updates to address each of the notes. I doubt the performance tests will be finished before I wrap up for the day, so I'll look at merging this in tomorrow.

I am being hypocritical coz I do this too, and feel free to ignore:

On this note, I always love detailed feedback on grammar, so very happy for these sorts of comments and explanations! 🙇

@ramonjd ramonjd merged commit 7416235 into trunk Oct 5, 2022
@ramonjd ramonjd deleted the try/documenting-the-layout-block-support branch October 5, 2022 08:19
@github-actions github-actions bot added this to the Gutenberg 14.4 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Layout Layout block support, its UI controls, and style output. 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.

3 participants