You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm then presented an option to choose a pattern, which I expect. I select "Start blank" to choose one of the basic layouts provided for the query block. I then select "Title & Date" to populate a basic layout for the query.
My expectation is that the editor should respect the defaults I've applied to the initial variation.
Ideally, variations like "Title & Date" should only make changes to the layout of the Post Template block and not set any attributes in the query block. Less ideally, but also perfectly fine: it should merge itself with the first selected variation so that expectations can be set. Maybe an additional property of variations could be how they handle chaining?
In the current form, it seems that innerBlocks must be defined in the variation in order to have the variation attributes survive the initial insertion. The documentation kind of alludes to this, but it's not entirely clear.
Step-by-step reproduction instructions
Register a block variation for core/query with perPage set to 99.
Insert the block variation.
Select "Title & Date".
Expect perPage to be set to 99. See that it's set to 3.
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.2 with and without Gutenberg 15.7.0 active.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered:
Description
I've registered a variation for a custom post type that sets an initial
perPage
value of99
along with some other attributes.When I first add the variation to the editor, I see:
I'm then presented an option to choose a pattern, which I expect. I select "Start blank" to choose one of the basic layouts provided for the query block. I then select "Title & Date" to populate a basic layout for the query.
This becomes:
The originally selected variation's attributes have been overwritten by default attributes assigned to all core query variations.
My expectation is that the editor should respect the defaults I've applied to the initial variation.
Ideally, variations like "Title & Date" should only make changes to the layout of the Post Template block and not set any attributes in the query block. Less ideally, but also perfectly fine: it should merge itself with the first selected variation so that expectations can be set. Maybe an additional property of variations could be how they handle chaining?
In the current form, it seems that
innerBlocks
must be defined in the variation in order to have the variation attributes survive the initial insertion. The documentation kind of alludes to this, but it's not entirely clear.Step-by-step reproduction instructions
core/query
withperPage
set to99
.perPage
to be set to99
. See that it's set to3
.Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: