-
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
Query Loop Block: remove Posts List variation #63404
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -98 B (-0.01%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Flaky tests detected in 7feeb43. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9887292839
|
As per my comment here, we shouldn't remove this if we don't have an alternative for this one, like dynamic registration of variations for post types. |
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.
Works as expected ✅
Without this PR, the Latest posts
block variation can be added and it ignores the Inherit query from template
setting entirely, causing confusion.
With this PR, the Latest posts
block variation doesn't appear on the inserter, and no content is lost if there are instances already on your site.
I personally don't think that is a blocker; there is no harm in the form of content loss by disabling the variation until we have an alternative that works as expected for users. I gave an approval but I don't feel strongly if we don't want to remove it in the end. |
There's some discussion here as well: #63353. The alternative could be to rename the block, but it's tricky to say in a few words what not inheriting means. Even "latest" or "recent" posts could be confusing: people might think that's the blog. This block variation is also not very useful for showing recent posts in the sidebar, because it has pagination etc. It's not designed for that. So I don't get the purpose of this variation at all. |
Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: priethor <priethor@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
What?
Why?
As mentioned here, this is causing more harm than good because when you insert this block, the query won't inherit the main query by default.
This block variation is also not very useful for showing recent posts in the sidebar, because it has pagination etc. It's not designed for that. So it seems this variation does not have any good use cases, or it has bad defaults.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast