Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Comments count includes deleted comments, which it shouldn't
Using this post purely as an example, because I'm quite sure that the problem is general. Observe:
At first, we are told that there are "4 comments":
Expanding inline, the summary says 4 of 4 comments are being shown, so where are the other three?
The mystery is resolved once one goes to the full thread page, instead of looking at the inline view:
The number of comments as being reported in the inline comments view / post UI should match what's actually visible to the user. In the above example, the "General comments" thread would be reported as having only one comment; if one navigates to the comment thread page, then it might be reasonable to also indicate the existence of the three now-deleted comments, but since those are invisible to pretty much everyone, they shouldn't be included in the comment count.
1 answer
We fixed the inconsistency a different way. Instead of computing the numbers for all threads at page-load time, we still report the full number of comments, but when you expand the comment thread you see that there are deleted ones, like this:
Expanding the thread now accounts for all of the comments so the numbers add up. I can't find an example right now to confirm, but I believe that if there are lots of comments and some early ones are deleted, you'll still see five (undeleted) comments along with the "skipping N" entries.
1 comment thread