WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 9 months ago

Last modified 8 months ago

#17275 closed enhancement (fixed)

UI: Missing comments count in admin screen

Reported by: ramiy Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.2
Component: Comments Keywords: has-patch has-screenshots
Focuses: ui Cc:

Description

See Attached image.

Attachments (7)

count.jpg (64.0 KB) - added by ramiy 5 years ago.
count-marked.jpg (20.5 KB) - added by ramiy 5 years ago.
17275.diff (1.9 KB) - added by solarissmoke 5 years ago.
17275.2 (1.6 KB) - added by ramiy 5 years ago.
Show approved-comments before moderated-comments, based on solarissmoke patch
17275.2.diff (1.8 KB) - added by ramiy 5 years ago.
Show approved-comments before moderated-comments, based on solarissmoke patch
count-tested.jpg (4.7 KB) - added by ramiy 5 years ago.
no-items.png (20.0 KB) - added by ramiy 8 months ago.

Download all attachments as: .zip

Change History (39)

@ramiy
5 years ago

@ramiy
5 years ago

#1 @scribu
5 years ago

  • Component changed from UI to Comments
  • Keywords needs-patch added; ui-feedback removed
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from major to normal

I'm pretty sure it's just a technical limitation, due to the fancy river of comments we have.

@solarissmoke
5 years ago

#2 @solarissmoke
5 years ago

  • Keywords has-patch added; needs-patch removed

#3 @ramiy
5 years ago

  • Owner set to ramiy
  • Status changed from new to accepted

#4 follow-up: @scribu
5 years ago

  • Owner ramiy deleted
  • Status changed from accepted to assigned

@ramiy: The owner field is meant either for the person that supplies the patch or that oversees the ticket (i.e. a commiter).

Last edited 5 years ago by scribu (previous) (diff)

#5 @scribu
5 years ago

If you want to signal that the patch works for you, just leave a comment saying so.

#6 @chexee
5 years ago

Patch works for me.

#7 @ocean90
5 years ago

  • Milestone changed from Future Release to 3.2
  • Severity changed from normal to minor

Can't see a problem with the small patch.

Because we are showing the same line on the Dashboard now too (see [17797]) we should implant it in 3.2 to be consistent.

#8 in reply to: ↑ 4 @ramiy
5 years ago

  • Owner set to solarissmoke

Replying to scribu:

@ramiy: The owner field is meant either for the person that supplies the patch or that oversees the ticket (i.e. a commiter).

Ok, Thanks for the feedback. I have reassignd the ticket to @solarissmoke (the patch supplier).

#9 @jane
5 years ago

  • Milestone changed from 3.2 to Future Release

Didn't make it in by freeze, revisit for 3.3.

#10 @ramiy
5 years ago

Also, we need to hide the "tabs" when the count is 0 (zero).

In posts and pages, for example, we don't see "Draft (0)" or "Trash (0)".

Same principle should be in comments, the Pending/Spam/Trash should be hidden when count in zero.

@ramiy
5 years ago

Show approved-comments before moderated-comments, based on solarissmoke patch

@ramiy
5 years ago

Show approved-comments before moderated-comments, based on solarissmoke patch

#11 @SergeyBiryukov
5 years ago

  • Milestone changed from Future Release to 3.3

#12 @ramiy
5 years ago

Patch tested. Looks great. Check the attached screenshot.

@ramiy
5 years ago

#13 @ryan
5 years ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3.

#14 @ramiy
5 years ago

  • Type changed from enhancement to defect (bug)

#15 @jane
4 years ago

  • Owner solarissmoke deleted
  • Type changed from defect (bug) to enhancement

#16 follow-up: @duck_
4 years ago

  • Keywords needs-patch added; has-patch removed

The patch doesn't work because it's showing the total number of comments, but the "All" view only displays approved and pending comments and not spammed ones.

For example with 2 approved comments, 2 pending comments and 1 spam comment I see "All (5)" but actually only 4 items are listed.

#17 @duck_
4 years ago

Any patch also has to deal with the JavaScript count updating too, i.e. decrementing the "All" and "Approved" counts when a comment is trashed/spammed.

#18 in reply to: ↑ 16 ; follow-up: @ramiy
4 years ago

Replying to duck_:

The patch doesn't work because it's showing the total number of comments, but the "All" view only displays approved and pending comments and not spammed ones.

I tested the patch few months ago, it worked for me (See the screenshot). Where there any changes that could effect the comments count?

#19 in reply to: ↑ 18 ; follow-up: @duck_
4 years ago

Replying to ramiy:

I tested the patch few months ago, it worked for me (See the screenshot).

If you look at the actual number of items being displayed and the count on the right (under the search box) you should only see the two approved comments and "2 items". I think it's confusing having "All (18)" as the view 'title' when 18 comments aren't being shown.

#20 in reply to: ↑ 19 ; follow-ups: @ramiy
4 years ago

Replying to duck_:

If you look at the actual number of items being displayed and the count on the right (under the search box) you should only see the two approved comments and "2 items". I think it's confusing having "All (18)" as the view 'title' when 18 comments aren't being shown.

It's not confusing, just like in posts/pages screen the "All" tab includes the trashed posts, in comments it includes the trash+spam comments.

I usually look at "Published" post count (don't care about drafts/trash). Same for comments, i am more intrested in "Approved" comments (don't care about spam/trash)

Last edited 4 years ago by ramiy (previous) (diff)

#21 in reply to: ↑ 20 @SergeyBiryukov
4 years ago

Replying to ramiy:

It's not confusing, just like in posts/pages screen the "All" tab includes the trashed posts, in comments it includes the trash+spam comments.

On Posts/Pages screens, the "All" tab only includes published, draft and pending posts.

Likewise, on Comments screen, the "All" tab only includes approved and pending comments.

#22 in reply to: ↑ 20 @duck_
4 years ago

Replying to ramiy:

It's not confusing, just like in posts/pages screen the "All" tab includes the trashed posts, in comments it includes the trash+spam comments.

Trashed posts don't count towards the "All" count on the posts screen. And with the patch applied trashed comments don't either only spammed ones.

Version 0, edited 4 years ago by duck_ (next)

#23 @ramiy
4 years ago

So what do you suggest to do?

You want to remove the "Spam" and "Trash" from the total count ("All" tab) ?

#24 @ramiy
3 years ago

  • Keywords has-patch ui-feedback added; needs-patch removed
  • Severity changed from minor to normal

#25 @helen
2 years ago

  • Focuses ui added
  • Keywords ui-feedback removed

#26 @wonderboymusic
10 months ago

Approved comment count shown via [33655]

#27 @afercia
10 months ago

Approved comment count shown via [33655]

https://cldup.com/r-EYwYGbhL.png

Very special thanks to @wonderboymusic for fixing all this stuff :) To have an idea of the amount of work done see #11200 and #32362. If I'm not mistaken, now that there's a correct count for "All" (approved and pending comments) it should be possible to show and dynamically update the count for "All".

#28 @wonderboymusic
9 months ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from assigned to closed

In 34506:

Comments List Table: include count for "All". Dynamically update.

Fixes #17275.

#29 @wonderboymusic
9 months ago

  • Milestone changed from Future Release to 4.4

#30 @ryan
9 months ago

  • Keywords has-screenshots added

#31 @afercia
9 months ago

In 34508:

Comments List Table: fix the translators comment for all count after [34506].

See #17275.

@ramiy
8 months ago

#32 @ramiy
8 months ago

In posts/pages/cpt and media, when no items found - you don't see the other tabs. The same should apply for comments, hiding Pending, Approved, Spam and Trash labels when they are empty.

Note: See TracTickets for help on using tickets.