-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Library - Query Loop]: Set default block variations not to inherit from global query #33163
[Block Library - Query Loop]: Set default block variations not to inherit from global query #33163
Conversation
…erit from global query
Size Change: +32 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
Thanks Nik! That will be very helpful! |
The query block is an interesting one, I've always thought of it as a block you should not manually insert and configure that often, if ever, and that the primary point of interaction with it is through (future) higher level blocks that wrap around it. Correct me if I'm wrong: this PR is mostly about ensuring what you see when you insert the block in a post is more predictably what you get/expect? I.e. since in the editor we can't know what query is inherited, it'll rarely be accurate. In that vein, the change seems fine to me: if you do insert this block manually, it's probably because you want to make your own custom little loop. The downside is if you're actually a theme developer building a template, you should probably be inheriting the query on this block. Right? Happy to give a green check, but just wanted to understand the motivation. Thanks as always for your work. |
It has this effect for now in 5.8 that we don't have the
Exactly, but I believe we'll solve this for 5.9. So this PR better suits the current usage of |
I thought it was to make sure that all default variations match? |
It is! I'm just explaining why the block patterns were changed to this default as well here: #31856 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me
…erit from global query (#33163)
…erit from global query (#33163)
…erit from global query (#33163)
Description
This PR just adds as a default argument of
inherit
tofalse
for the defaultQuery Loop
variations. Since we have this default value in current available patterns and the block will be exposed in post/page editors for 5.8, this setting makes more sense for now. An issue for dynamic calculating and setting this value is here:#30369Testing instructions
Query Loop
block in a pageQuery Loop
block and clickStart blank
inherit
value tofalse
and allow you to customize the query properties, and of course that they work properly as before.Before
Screen.Recording.2021-07-02.at.12.34.58.PM.mov
After
Screen.Recording.2021-07-02.at.12.34.08.PM.mov