-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Description
Currently in Query Loop and Template Parts we use the pattern setup flow, where a user can choose and insert directly a semantic pattern or some default block variation(scope: block).
Right now we have only one variation that is exposed to the inserter(Posts List), but that is subject to change with this issue. The problem here is that patterns and the scope block variations have different attributes and this results to override the Posts List variation attributes.
The problem is for any block that uses pattern setup flow like Template Part, but is not visible there because that block's variations only contain the area attribute which is also the one used in calculating the active variation(in isActive function).
We need to find a good way to preserve some important attributes(or part of them if is an object like query) and in general make sure that these preserved attributes do no affect the presentation/design.
This also applies to the replace with pattern flow.
Should we remove Posts List variation for now? It seems it just adds unnecessary confusion right now.
Related: #32268
Step-by-step reproduction instructions
- In post editor insert a Posts List variation
- Select any default block variation or a pattern(patterns usually don't contain
sticky: 'exclude',like Posts List do) - Observe that the
stickyoption is not set toexcludelike we declare here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/query/variations.js#L51