WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 15 months ago

#44689 new enhancement

Convert user sites (my-sites.php) to table

Reported by: eArtboard Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: has-patch 2nd-opinion
Focuses: administration, multisite Cc:
PR Number:

Description

I think for better consistence we could add a table in the user's sites in a multisite like everything else in WordPress (super admin sites, users, posts etc.).

The Primary Site option could change from the bulk actions.

Attachments (4)

44689.diff (16.2 KB) - added by shariqkhan2012 16 months ago.
Changing the 'My Sites' page to tabular form like other similar screens (Posts list screen, users list screen etc)
MySItes-CurrentView.png (509.0 KB) - added by shariqkhan2012 16 months ago.
Current view of 'My sites'
MySItes-NewView.png (185.1 KB) - added by shariqkhan2012 16 months ago.
The view of 'My Sites' after the changes
Row_actions.png (24.5 KB) - added by shariqkhan2012 15 months ago.
Had forgotten to attach the screenshot demonstrating the row actions as well as the list view

Download all attachments as: .zip

Change History (13)

#1 @SergeyBiryukov
16 months ago

  • Focuses administration added

#2 @shariqkhan2012
16 months ago

The Primary Site option could change from the bulk actions.

I don't think that option belongs to 'Bulk actions', because there could be only one primary site.

On a related note, I don't think that there is a case for displaying 'Bulk actions' on this page.
Reasons: no actions fit the bill in this case.

For 'Bulk actions' we can't include:

  1. Delete: because a user may not be the admin of all sites listed under 'My Sites' and they are not allowed to delete sites to which they do not have admin privileges.
  1. Visit/Dashboard: It does not make any sense to visit the frontend/dashboard of multiple sites at once.
  1. 'Primary site': already explained above.

Since there is no valid candidate for 'Bulk actions', there is no point in displaying it in the first place.

An argument can be made that super-admins can delete any site, so 'Bulk actions' can be displayed for them.

I agree with changing the view to tables though.

Last edited 16 months ago by shariqkhan2012 (previous) (diff)

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


16 months ago

@shariqkhan2012
16 months ago

Changing the 'My Sites' page to tabular form like other similar screens (Posts list screen, users list screen etc)

#4 @shariqkhan2012
16 months ago

  • Keywords has-patch added

@shariqkhan2012
16 months ago

Current view of 'My sites'

@shariqkhan2012
16 months ago

The view of 'My Sites' after the changes

#5 @shariqkhan2012
16 months ago

Initially, I planned to add 'Set as Primary Site' as a row action to replace the current implementation as a dropdown. However, halfway through the code, I realized there is a do_action hook ('myblogs_allblogs_options') over there, and plugins may be using that hook to do execute various codes including displaying other content, which may not go well if it is added to action row.

So I have not put that code in place as of now. Need feedback on it.

Additionally, I also planned to add 'Delete' as a row action for the sites for which the user has the capabilities to delete. Currently, when a user tries to delete a site from Tools->Delete this site, they are taken to another screen which asks for confirmation and then sends a mail with a hashed URL.

Again, I refrained from implementing that because I was not sure how the user-flow should look like as adding the 'Delete' option in the row action would mean that, depending on their access permissions, users would be able to delete not only the site whose dashboard they are on at the moment but also their other sites.
Feedback welcome.

This ticket was mentioned in Slack in #core-multisite by shariqkhan2012. View the logs.


15 months ago

#7 @johnjamesjacoby
15 months ago

  • Keywords 2nd-opinion added
  • Version set to 3.0

I am in favor of this change. There may even be a previous ticket from me somewhere about this.

We've cloned this UI for "My Networks" in WP Multi Network, not because it is good, but because it is familiar.

Another consideration when thinking about changing this screen, is that it is intended to be a heads-up display of sites the user belongs to. In essence, it's the very first WordPress Core site-switcher to easily navigate between sites. These "tiles" could be cards or some other UI that shows more off (favicons, site descriptions, time zones, etc...)

I've made the argument previously that the left-hand primary navigation ("Dashboard > My Sites") isn't really the best place for users to discover how to switch between sites, but it's difficult to find better without a dedicated "user dashboard" we can surface everywhere. My WP User Profiles plugin does this, but it's not widely advertised or adopted.

Thanks @eArtboard for the ticket, and for putting the hard work into a first pass patch!

#8 @mnelson4
15 months ago

@shariqkhan2012

Initially, I planned to add 'Set as Primary Site' as a row action to replace the current implementation as a dropdown. However, halfway through the code, I realized there is a do_action hook ('myblogs_allblogs_options') over there, and plugins may be using that hook to do execute various codes including displaying other content, which may not go well if it is added to action row.

Ya, while I'd also prefer a row action of "Make Primary Blog", it's probably better to preserve backwards compatibility in case any plugins are using that action.

Additionally, I also planned to add 'Delete' as a row action

Yeah, probably best to do that on a separate ticket afterwards. Let's just have this focus on the UI change.

@johnjamesjacoby

These "tiles" could be cards or some other UI that shows more off (favicons, site descriptions, time zones, etc...)

That's true. I personally think the list table works well enough though, prefer the consistency, and am unaware of anyone actually making use of the tiled layout. The current tiled layout kinda looks half-baked IMO.

I tried this patch and it works fine. When I resize the screen so it's mobile-sized, I see the "show more" toggle button (see https://drive.google.com/a/eventespresso.com/file/d/1onRBXeTaUso5RQMzJnWdBu-RNFEHfu7O/view) appears but doesn't do anything, probably because there are no extra columns being hidden. If this ticket is merged in, however, we could optionally add more columns (or plugins could) which would make that useful again.

@shariqkhan2012
15 months ago

Had forgotten to attach the screenshot demonstrating the row actions as well as the list view

#9 @eArtboard
15 months ago

We could add the same columns like network "Sites" (Last Updated, Registered and Users).

Also I think is better to add the Primary Site form at the bottom of the table or better remove it. I like the idea to add "Make Primary" as row action. We could deprecated the "myblogs_allblogs_options" if possible.

Note: See TracTickets for help on using tickets.