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

Block variation transforms with InnerBlocks and custom transforms #26962

Closed
ntsekouras opened this issue Nov 13, 2020 · 4 comments
Closed

Block variation transforms with InnerBlocks and custom transforms #26962

ntsekouras opened this issue Nov 13, 2020 · 4 comments
Labels
[Feature] Block Variations Block variations, including introducing new variations and variations as a feature Needs Design Feedback Needs general design feedback. [Type] Feature New feature to highlight in changelogs.

Comments

@ntsekouras
Copy link
Contributor

ntsekouras commented Nov 13, 2020

The problem that needs solving here is having a way to 'update' a block to another block variation, after its creation.

The first step was to handle the 'simple' block variations, and by 'simple' I mean the variations that were applying specific attribute values only. In this step the feature was introduced to Navigation block. (issue: #25231, PR: #26687)

Now we need to implement a way of handling all block variation transforms. This means we have to handle blocks with InnerBlocks as well, like Query, Columns etc..

Another thing is that there will be a need for extending variations API to support custom transforms. For example changing a Columns block of 3 columns to 2 columns. This might be a separate issue and step 3 of this problem though...

Block variations reference: https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#variations-optional

@ntsekouras ntsekouras added [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Feature New feature to highlight in changelogs. labels Nov 13, 2020
@mapk
Copy link
Contributor

mapk commented Nov 23, 2020

Aligning with the Navigation block, I imagine the Query block would look similar to this:

transform-variations

There's some oddly repeated description text for each of these options though. It will most likely need a copy review.

@mapk mapk added the Needs Design Feedback Needs general design feedback. label Nov 23, 2020
@mapk
Copy link
Contributor

mapk commented Nov 23, 2020

Here's how this would look without descriptions.

without-desc

@youknowriad
Copy link
Contributor

This issue is a bit unclear to me? Is it still relevant?

@ntsekouras
Copy link
Contributor Author

It is relevant, but probably the best solution would be schemas (#41606).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Variations Block variations, including introducing new variations and variations as a feature Needs Design Feedback Needs general design feedback. [Type] Feature New feature to highlight in changelogs.
Projects
None yet
Development

No branches or pull requests

3 participants