WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 17 months ago

#27831 new defect (bug)

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

Reported by: celloexpressions Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: has-patch 2nd-opinion
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 (1)

27831.diff (769 bytes) - added by celloexpressions 4 years ago.
Don't display the comments toolbar item if there are no comments awaiting moderation.

Download all attachments as: .zip

Change History (8)

@celloexpressions
4 years ago

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

#1 @celloexpressions
4 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
4 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
4 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
4 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
3 years ago

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

#6 @swissspidy
17 months 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
17 months 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.

Note: See TracTickets for help on using tickets.