WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 7 days ago

Last modified 7 days ago

#47495 closed enhancement (fixed)

WP_Privacy_Request_Table should not show views that have a count of 0.

Reported by: pbiron Owned by: pbiron
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Privacy Keywords: has-patch commit
Focuses: ui, administration Cc:

Description

Other core list tables that have a get_views() method do not output a view if the count for that view is 0, e.g., WP_Posts_List_Table doesn't output "Pending (0)" if there are no posts with $post_status === 'pending').

However, WP_Privacy_Requests_Table does output "Pending (0)" if there are no pending requests.

For consistency's sake, I think WP_Privacy_Requests_Table should skip views with count of 0.

Attachments (2)

47495.diff (1.1 KB) - added by pbiron 13 months ago.
Screen Shot 2020-04-21 at 12.38.14 AM.png (41.5 KB) - added by garrett-eclipse 3 months ago.
Comments list table displaying all status counts even with 0 items.

Download all attachments as: .zip

Change History (12)

@pbiron
13 months ago

This ticket was mentioned in Slack in #core-privacy by pbiron. View the logs.


4 months ago

#2 @pbiron
4 months ago

  • Milestone changed from Awaiting Review to 5.5
  • Owner set to pbiron
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.


3 months ago

@garrett-eclipse
3 months ago

Comments list table displaying all status counts even with 0 items.

#4 @garrett-eclipse
3 months ago

  • Focuses ui administration added
  • Keywords 2nd-opinion needs-design-feedback added

Thanks @pbiron for the ticket and patch, applying and testing the patch works as outlined.

I am a bit hesitant of moving forward here as I see Requests being more in line with Comments than posts and the Comments list table does display the additional status' for Pending, Approved, Spam and Trash.
https://core.trac.wordpress.org/raw-attachment/ticket/47495/Screen%20Shot%202020-04-21%20at%2012.38.14%20AM.png

In my eyes displaying all status' is helpful to the user experience as it outlines the expected process visually by showing what status buckets the requests will need to pass through.

I'm marking for 2nd-opinion and also flagging to get some design feedback on the UX here. I'm all for consistency so if it's decided to suppress empty status labels then we should also address the Comments list table or potentially vice versa if displaying them is useful for to the user for the interface then resurfacing them on other list tables may be the avenue forward.

Last edited 3 months ago by garrett-eclipse (previous) (diff)

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


10 days ago

#6 @davidbaumwald
10 days ago

@pbiron Is this still in the cards for 5.5 with Beta 1 landing next week?

Last edited 7 days ago by davidbaumwald (previous) (diff)

#7 @pbiron
9 days ago

@garrett-eclipse what do you think?

Personally, I still think views with 0 counts should not be shown. I'm pretty sure that of all the list tables in core, the privacy and comments list tables are the only ones that show views with 0 count. That is: posts, plugins, users, ms sites, ms themes, ms users (the later 3 in multisite) all "hide" views with 0 counts. The terms and links list tables don't support views (which they should, but that's another matter).

But, this is not really that big of a deal, so if the design feedback that has been requested doesn't come in time for this to land in 5.5, it can be punted.

#8 @mapk
8 days ago

  • Keywords needs-design-feedback removed

The Design Team discussed this [in Slack today]https://wordpress.slack.com/archives/C02S78ZAL/p1593708788256000. We're in agreement that the 0 count views should be hidden.

#9 @pbiron
8 days ago

  • Keywords commit added; 2nd-opinion removed

Related: #50538

#10 @SergeyBiryukov
7 days ago

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

In 48284:

Privacy: Hide views that have a count of 0 on privacy request tables, for consistency with other list tables.

Props pbiron, garrett-eclipse, mapk, melchoyce, estelaris.
Fixes #47495.

Note: See TracTickets for help on using tickets.