Make WordPress Core

Opened 11 years ago

Closed 3 years ago

#27831 closed defect (bug) (wontfix)

Hide Comments Icon & Count from Toolbar when there are no pending comments

Reported by: celloexpressions's profile celloexpressions Owned by: sabernhardt's profile sabernhardt
Milestone: Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: has-patch has-screenshots
Focuses: ui Cc:

Description

The updates icon is only displayed in the toolbar if there are pending updates, so why is the pending comments icon always there, usually displaying "0"?

The only useful purpose for this link when there aren't pending comments is to get to edit-comments.php to manage approved and spammed comments; however, this is much less actional than the other links in the toolbar (updates, add/edit/view posts, profile, etc.). A link to the Posts list table would be as useful if not more useful than this link to the comments list table, and would serve effectively the same purpose. There is always the potential to add a content-types menu, or even a toggle for the entire admin menu, to the toolbar in the future, but for now it seems wrong to include the comments link in this context when there are no pending comments.

Especially for sites that don't use, or don't often receive very many/frequent comments (which unfortunately is likely the majority), the comments icon in the Toolbar is clutter that should get out of the way when it's unneeded.

Attachments (4)

27831.diff (769 bytes) - added by celloexpressions 11 years ago.
Don't display the comments toolbar item if there are no comments awaiting moderation.
27831.1.patch (523 bytes) - added by sabernhardt 3 years ago.
refreshed patch
toolbar-comments-link-before.png (46.1 KB) - added by sabernhardt 3 years ago.
toolbar-comments-link-after.png (93.1 KB) - added by sabernhardt 3 years ago.
with refreshed patch

Download all attachments as: .zip

Change History (21)

@celloexpressions
11 years ago

Don't display the comments toolbar item if there are no comments awaiting moderation.

#1 @celloexpressions
11 years ago

  • Keywords has-patch added

Patch doesn't account for live-updating of the comment count when comments are approved/unapproved, but I think it's better this way. If the count goes down to zero, you can still see the number change to zero, then the icon is gone on the next pageload. If there were zero pending comments and you unapproved one, you wouldn't get it back, but I don't think that's much of an issue. We could certainly account for those situations differently if desired, though.

#2 follow-up: @Denis-de-Bernardy
11 years ago

Suggesting wontfix. The pending comments icon also lets you review and reply to existing comments hours after moderating them if needed. I think the button should stay for the convenience.

#3 in reply to: ↑ 2 @celloexpressions
11 years ago

Replying to Denis-de-Bernardy:

Suggesting wontfix. The pending comments icon also lets you review and reply to existing comments hours after moderating them if needed. I think the button should stay for the convenience.

Please read the ticket description. I'm suggesting that that use case is equivalent to wanting to visit any content list-table (posts, media, etc.), which needs a different solution. Since you mention hours, perhaps it would make sense to hide it after a period of time?

For sites that don't use comments at all, this will likely be addressed with #27111, but for sites with infrequent comments, this would be a nice de-cluttering step. When I say infrequent, I'm talking weeks and months, by the way.

#4 @Denis-de-Bernardy
11 years ago

You can remove them using a plugin, btw:

add_action('wp_before_admin_bar_render', function() {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu('comments');
});

#5 @celloexpressions
9 years ago

Related: #32678, which in its current form would take care of this as well.

#6 @swissspidy
8 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to Future Release

The need to quickly manage and write posts is surely bigger than the need to edit comments when there aren't even any pending comments.

What bugs me — and what I thought at first this ticket is about — is the "0" being displayed. It should not be there when there are no pending comments. There's no bubble in the admin menu either when there are no plugin updates.

Unfortunately there's a lack of traction on #32678, otherwise I'd be tempted to close this one as a duplicate. Anyway, leaving this for some more feedback.

#7 @celloexpressions
8 years ago

I still think we should hide the icon when there aren't any pending comments, to align with the update icon behavior. Since #32678 is likely to be in a holding pattern for some time due to the technical challenges of the admin menu integration, let's make this small change to reduce clutter and improve user experience.

#8 follow-up: @sabernhardt
4 years ago

  • Keywords needs-refresh added; 2nd-opinion removed
  • Milestone changed from Future Release to 5.8
  • Owner set to sabernhardt
  • Status changed from new to accepted

Yes, removing the link entirely when there are no new comments to moderate would be better than showing the number zero at half-opacity.

It would be nice to edit the conditional so it allows people to restore the link if desired, perhaps requiring a plugin similar to Links Manager after that was deprecated in #21307. Unlike #33165, the comment moderation link involves mainly administrators (plus editors), and the option to hide/show based on the count was not made available before.

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

#9 in reply to: ↑ 8 @SergeyBiryukov
4 years ago

Related: #50538

#10 @sabernhardt
4 years ago

  • Keywords needs-design-feedback ux-feedback added

This ticket was mentioned in Slack in #design by chaion07. View the logs.


4 years ago

#12 @chaion07
4 years ago

  • Keywords needs-screenshots added

This ticket was brought up during one of our Design Triages and we feel that proving us with a screenshot will help is getting some feedback in regards to the Design Aspect of things.

Thanks!

@sabernhardt
3 years ago

refreshed patch

@sabernhardt
3 years ago

with refreshed patch

#13 @sabernhardt
3 years ago

  • Keywords has-screenshots added; needs-refresh needs-screenshots removed

Current behavior for users with edit_posts capability (including Author):

  • On large screens, the Comments link displays the icon and moderation count in the toolbar (both admin and front end).
  • If the moderation count is zero, the number is presented at half-opacity (which just passes contrast guidelines with the default color scheme at 4.52:1).
  • The pending comments count is updated immediately in the toolbar with JavaScript as comments are approved, unapproved, deleted or restored from Trash/Spam.
  • On narrower screens (401px to 782px), the link is always there and always showing the icon without the number.
  • For the narrowest screens, the Comments link is hidden (in core styles).

With the refreshed patch:

  • The Comments link does not exist if there are zero comments to moderate when the page loads. If any comments are unapproved or restored from Trash/Spam, the toolbar link would not show again until after refreshing the page.
  • If the number of comments awaiting moderation is reduced to zero (without refreshing), the zero count still appears in the toolbar link at half-opacity. The script could be updated to remove the link, but I think it makes sense to leave the faded zero count in this case.

This ticket was mentioned in Slack in #design by paaljoachim. View the logs.


3 years ago

#15 @tomjdevisser
3 years ago

I really like the idea of cleaning up the admin bar. I would suggest removing the updates icon if there are none, but keeping the comments icon. This is the section that most clients/users will more frequently use even if there are no new comments, while the updates screen is only necessary when there are new updates.

#16 @estelaris
3 years ago

  • Keywords needs-design-feedback ux-feedback removed

From a UX perspective, removing the comments icon is not a good thing.

There are users, like bloggers, that rely too much on the comments icon as part of their daily work. If for any reason, they login and there are no comments, they will certainly panic believing the site is broken, resulting in a lot of wasted time and stress.

#17 @sabernhardt
3 years ago

  • Milestone 5.8 deleted
  • Resolution set to wontfix
  • Status changed from accepted to closed

Thanks for your input. I'll close it then.

Note: See TracTickets for help on using tickets.