Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Add the Comments Pagination Next block #36562
Block Library: Add the Comments Pagination Next block #36562
Changes from all commits
d21fb9f
8f56293
8b659ab
59bfce9
969fe74
c57ad77
265e8d8
fd078b9
6ea4a87
ce731b8
3e310f3
5ef8519
60a2e71
db2e960
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I couldn't make the pagination work as expected. I'm not sure the implementation here is correct as we have a custom
Comments query
and get_next_comments_link internally uses the global query$page = get_query_var( 'cpage' );
I guess we should take into account
get_approved_comments
that is used in the parent block to fetch the comments and we might probably need to make a new custom query ourselves, similar to QueryPagination blocks.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.
Just noting that there were some recent changes in query pagination blocks that I'll have to check first, but the fact that I couldn't make this work as expected, still stands.
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.
I'm updating the code with a lot of changes that were requested if you prefer to wait for them.
How is your discussion settings configured? Maybe we have a different configuration there.
Maybe we need the comment query loop working with pagination at first, although we have already the page numbers working, so I will keep taking a look at it to have it working as expected.
Regarding
We started a discussion about that right here! I think now is starting to get more relevant the requirement of having a multi-query loop for comments.
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.
Thanks for the review! It's helping quite a lot to move the comments pagination forward.
You are adding the block outside a post or page? If this help you, I have these Discussion settings:
If you are not and it is not working, we should also have to take a look at the Comment Pagination, as I think we are using there also the
cpage
query var.We started a discussion about that here! Maybe this issue will help us understand the requirement of having multi-query comments like in the Query. I will add it to the conversation.