Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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. |
|
I haven't looked at the code deeply here. But can we not achieve this by refactoring the existing jerky pagination blocks rather than creating full duplicates of it? |
|
@fabiankaegy I considered this option, but went with a separate block, because most of the code of both blocks are branch conditions on the query, and there is little in common between a post query and a term query. For example, If the display logic of numbers and previous / next is common, it seems to me it is only a very small part of the code, and I'm not sure if it would be worth the complexity of factorizing it. |
4f06c89 to
7b8e6b9
Compare
Introduce new blocks to enable pagination for terms queries, including "Previous", "Next", and "Page Numbers" links.
7b8e6b9 to
2380c40
Compare
What?
Introduce new blocks to enable pagination for terms queries, including "Previous", "Next", and "Page Numbers" links.
Why?
Terms query was introduced in 6.9. There is many use case were someone may use pagination on a term query, for example with a "Magazine Issue" taxonomy. See #73751.
How?
Add
terms-query-paginationand correspondingprevious,nextandnumbersblocks, as well as atermspagequery var.Testing Instructions
Terms Queryblock, limit the number of displayed terms to 2.Terms Queryblock in the tree, and add theTerms Query PaginationblockScreenshots