-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix Pagination
thread count in Discussion
#10477
Conversation
Size Change: -220 B (0%) Total Size: 751 kB
ℹ️ View Unchanged
|
remove unused total page count from state, as it can be inferred from the filters
08336ca
to
a3bbc62
Compare
this is the only relevant value for `Filters` and `Comments` to display with correct pagination
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.
Right so topLevelCommentCount
is the number of "comments" not including threads/replies and commentCount
is the number of both comments + replies
It all makes sense now but wonder if we can put that in a JSDoc comment somewhere for folk (incl. us) in the future
Not quite, actually! Thanks for asking as I only realised after you wrote this. Looking at the API responses, |
the API response will correctly report on the number of top-level comments based on whether the results should display threaded or not!
What does this change?
totalCount
which depends on the threads filtering optionWhy?
A user reported that the current thread count was incorrect:
We conflated
commentCount
andtopLevelCommentCount
in #10299 (comment)Screenshots