-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 block enhanced pagination: false positives on patterns/template-parts (including TT4 default templates) #55706
Comments
Would the easiest/quickest solution be to make TT4 not use a template part in the query block? |
It's certainly worth considering a TT4 change for 6.4.0 I think this will be needed eventually as a defensive measure for themes containing the pattern That could be done in 6.4.1 if TT4 is edited if you wanted a little breathing room to get this PR wrapped up. |
@carolinan mentioned here that using patterns or template parts is best practice, so I thought it would be controversial to remove it:
But I agree with you that it will be better to target this change for 6.4.1 (I also proposed it in Slack). I'll investigate this possibility today. |
Thank you for the detailed issue and the video on the PR, that helps a lot clarifying the issue. As I'm not very familiar with the underlying technical problem, it's still not very clear to me why blocks from plugins are considered not compatible. I haven't seen a clear explanation of that, not even in the other related issues. For future reference and to help plugin authors better understand, could you please clarify exactly what makes plugin blocks not compatible? Thanks. |
Sure 🙂 After client-side navigation, we need to make sure that the interactive blocks are properly hydrated, but we can't guarantee that the interactive blocks that were not created with the Interactivity API will be hydrated because their hydration mechanism can vary. For example, they may rely on a There's a discussion here about how to allow third-party blocks to declare that compatibility. As that mechanism is not yet in place, for WP 6.4, we are considering any non-core block not compatible. |
It's not just a matter of avoiding code duplication, but template parts ensure that user changes propagate to all instances where the pattern is used. Post meta is all over the theme, if we stop using the template part, the user will have to manually find where it is to make any changes. |
Agreeing with Maggie here. Removing the template parts will be quite a PITA given we're just a week away from the 6.4 release. |
Yea, it's not ideal, but I do think we should ship the theme so that it works with the latest features. I'd consider this a last-resort fallback, perhaps only abstracting the blocks where we need to, not everywhere. |
Yes. It's not all the template parts, only the template parts that are inside of the Query blocks. But I think the solution we reached in the PR is solid enough to be merged. So, as long as people agree, there's no need to remove any TT4 template parts. |
We finally merged the PR, so now the enhanced pagination setting (now renamed to "force page reload", which is the inverse of "enhanced pagination") should be able to be used in TT4. |
Description
As reported by @afercia in this PR, the enhanced pagination of the Query block cannot be enabled in the Twenty Twenty-Four theme because we were being very cautious in detecting unsupported blocks.
This is the explanation of the issue:
<!-- wp:template-part {"slug":"post-meta"} /-->
), therefore you can't activate the enhanced pagination.Step-by-step reproduction instructions
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: