[wp-trac] [WordPress Trac] #27831: Hide Comments Icon & Count from Toolbar when there are no pending comments

WordPress Trac noreply at wordpress.org
Mon May 10 15:10:27 UTC 2021


#27831: Hide Comments Icon & Count from Toolbar when there are no pending comments
-------------------------------------------------+-------------------------
 Reporter:  celloexpressions                     |       Owner:
                                                 |  sabernhardt
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.8
Component:  Toolbar                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-design-feedback ux-  |     Focuses:  ui
  feedback has-screenshots                       |
-------------------------------------------------+-------------------------
Changes (by sabernhardt):

 * keywords:
     has-patch needs-refresh needs-design-feedback ux-feedback needs-
     screenshots
     => has-patch needs-design-feedback ux-feedback has-screenshots


Comment:

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/27831#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list