[Query Loop]: Improve block variations in blocks with pattern setup flow #42533
Labels
[Block] Query Loop
Affects the Query Loop Block
[Feature] Block Variations
Block variations, including introducing new variations and variations as a feature
[Type] Bug
An existing feature does not function as intended
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 thescope
block variations have different attributes and this results to override thePosts 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(inisActive
function).We need to find a good way to preserve some important attributes(or part of them if is an
object
likequery
) 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
sticky: 'exclude',
like Posts List do)sticky
option is not set toexclude
like we declare here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/query/variations.js#L51The text was updated successfully, but these errors were encountered: