Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#32953 closed defect (bug) (maybelater)

List table: order by comments should be by total comments count

Reported by: afercia's profile afercia Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Administration Keywords: needs-patch
Focuses: ui Cc:

Description

Quickly discussed in the design channel on Slack. Now that the comments column in the List Tables is going under a design (and accessibility) review, see #32152 a reordering issue is getting more noticeable. Please see the screenshot below: when reordering by comments count, the order is by "approved" comments and that doesn't look right:

https://cldup.com/zBtoFsqZ2R.png

It's a bit weird, visually, that the cell with "no comments" comes before the cell with 1 pending comment.
A more logic order by would be by "total comments count" meaning approved + pending. Also, the column header says "Comments" and doesn't specify if they're approved or pending ones, so ordering by total comments count maybe would make more sense.

Change History (7)

#1 @helen
9 years ago

  • Milestone changed from Awaiting Review to 4.3

Moving this into 4.3 since #32152 exposes how weird it is, however, as I recall this uses the comment_count value that is cached in the wp_posts table, so we may be at an impasse here, depending on where else that value is used.

#2 @helen
9 years ago

Looks like it's used in:

  • get_comments_number() - a very popular templating function.
  • By extension of the above, comments_bubble() and get_comments_number_text().
  • feed_links_extra()
  • Feeds.
  • The patch on #32152 :)
  • And of course, any other query anybody has that orders by comment count, and likely currently expects it to be the approved comment count.

I don't know how we could order by total comments otherwise.

This ticket was mentioned in Slack in #core by afercia. View the logs.


9 years ago

#4 @helen
9 years ago

  • Milestone 4.3 deleted
  • Resolution set to maybelater
  • Status changed from new to closed

As far as I can tell, short of adding a new column to the posts table for a combined comment count (which would then have to be populated and could be all wonky with different comment statuses, etc.), there's nothing we can do here that scales. Real resolution is cantfix, but let's maybelater it :)

#5 @afercia
9 years ago

Thanks Helen. I've finally realized what the technical difficulties are :) In future iterations maybe we should just try to think to a different design for the "0" approved bubbles. Designers needed!

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


9 years ago

#7 @hugobaeta
9 years ago

Following some conversation on Slack, here's a couple of proposals:

https://cldup.com/YnKI1KvNtL.png

In the conversation, @helen mentioned the impossibility of an ideal scenario, where the order would be set by a "total comment" ("approved" + "pending") count. So the consensus is to move in the "Proposal 1" direction.

The color for that bubble is #cbcdce (Something I'm calling Gray-100 on my colors codepen, but I need to rework eventually. At least it's a gray with "purpose", a tint derived from the new Base Gray), and the lack of decent contrast is not a concern here, since it help create a clear "zero" idea - they serve basically as a holder for "pending" bubbles when needed, and create consistency on empty cells between others with "pending".

Note: See TracTickets for help on using tickets.