Make WordPress Core

Opened 2 years ago

Closed 17 months ago

Last modified 17 months 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:


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 2 years ago.
Screen Shot 2020-04-21 at 12.38.14 AM.png (41.5 KB) - added by garrett-eclipse 20 months ago.
Comments list table displaying all status counts even with 0 items.

Download all attachments as: .zip

Change History (12)

2 years ago

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

21 months ago

#2 @pbiron
21 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.

20 months ago

20 months ago

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

#4 @garrett-eclipse
20 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.

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 that makes sense and in that case we should also address the Comments list table.

Version 0, edited 20 months ago by garrett-eclipse (next)

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

17 months ago

#6 @davidbaumwald
17 months ago

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

Last edited 17 months ago by davidbaumwald (previous) (diff)

#7 @pbiron
17 months 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
17 months 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
17 months ago

  • Keywords commit added; 2nd-opinion removed

Related: #50538

#10 @SergeyBiryukov
17 months 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.