Make WordPress Core

Opened 8 years ago

Last modified 7 days ago

#43899 new defect (bug)

Move the view mode switcher into screen options for multisite users and sites

Reported by: afercia Owned by:
Priority: normal Milestone: 7.2
Component: Networks and Sites Version: 4.4
Severity: normal Keywords: has-patch has-unit-tests needs-testing
Cc: Focuses: ui, multisite

Description (last modified by afercia)

In the Posts screen, WordPress used to have two links to "switch mode" from the normal list view to the "excerpt" view. In WordPress 4.4 these links were moved to the Screen Options panel, see [35357].

However, on multisite the "Sites" and "Users" screens still show the switch mode links at the top right of the main table. For consistency, and for the design / UI reasons explained in #22222, they should be moved to the Screen Options as well.

Attachments (4)

Bildschirmfoto 2026-07-31 um 16.55.01.png​ (763.9 KB ) - added by realloc 3 months ago.
Sites List View
Bildschirmfoto 2026-07-31 um 16.55.05.png​ (805.7 KB ) - added by realloc 3 months ago.
Sites Excerpt View
after remove users.png​ (89.2 KB ) - added by muryam 7 days ago.
after remove sites.png​ (59.2 KB ) - added by muryam 7 days ago.

Download all attachments as: .zip

Change History (17)

#1 @afercia
8 years ago

  • Description modified (diff)

#2 @afercia
8 years ago

For history: this is how the "switch links" used to look like in WordPress pre-4.4:

https://cldup.com/2w1rQ4zLLK.png

#3 @johnjamesjacoby
8 years ago

I never liked that these links moved to screen options for Posts. I’d rather revert that than move these.

If the issue is that the modes are not useful, we should remove them, or make them more useful.

Plugins do use these mode switchers for more obvious things (calendars with month/week/day modes, etc…)

#4 @afercia
8 years ago

I'd agree there should be some consistency, the multisite admin is not a separate realm and users shouldn't be forced to learn new UI patterns depending on where they are.
On the other hand, I'm not sure to fully understand what an "Excerpt View" is about, when it comes to Sites and Users :)

@realloc
3 months ago

Sites Excerpt View

#5 @realloc
3 months ago

Checked the actual list table code: in WP_MS_Sites_List_Table::column_blogname(), excerpt mode only adds one extra line, the site title and tagline via switch_to_blog(). On column_lastupdated (Sites) and column_registered (Users), excerpt mode only changes the date format from Y/m/d to a full date+time stamp. That's the entire difference between the two modes on these screens, no extra columns or content, unlike Posts, where excerpt mode shows actual post content.

Given how marginal the distinction is, I'd suggest removing the view switcher on these two screens entirely rather than moving it into Screen Options. That keeps the fix proportional to what the modes actually do, and avoids adding Screen Options UI for a toggle most admins wouldn't notice missing.

#6 @afercia
3 months ago

That's the entire difference between the two modes on these screens, no extra columns or content, unlike Posts, where excerpt mode shows actual post content.
Given how marginal the distinction is, I'd suggest removing the view switcher on these two screens entirely

@realloc totally agree. That's exactly what I'm proposing in:

https://core.trac.wordpress.org/ticket/65683#comment:6
​https://github.com/WordPress/wordpress-develop/pull/12662

#7 @realloc
2 months ago

  • Keywords needs-patch needs-unit-tests added
  • Milestone Awaiting Review → Future Release

#8 @sukhendu2002
2 months ago

I’ll prepare a focused PR for #43899 removing the Sites and Users view modes. I plan to retain the extended information by default, as proposed in #65683. For Sites, this makes switch_to_blog() run per row; I’ll include query/performance results. Please let me know if compact output should instead remain canonical.

This ticket was mentioned in ​PR #13120 on ​WordPress/wordpress-develop by ​@sukhendu2002.


2 months ago
#9

  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed

#10 @sukhendu2002
2 months ago

I’ve opened PR ​https://github.com/WordPress/wordpress-develop/pull/13120 for this ticket.

The PR removes the list/excerpt switchers and their saved user settings from the Network Sites and Users screens. Full timestamps are displayed by default, while the site title/tagline output is removed to avoid a switch_to_blog() call and option lookups for every site row. It also updates the help text and adds focused unit tests.

Any feedback on the implementation or the chosen canonical output would be appreciated.

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


11 days ago

#12 @afercia
10 days ago

  • Keywords needs-testing added
  • Milestone Future Release → 7.2

#13 @muryam
7 days ago

Patch Testing Report

Patch tested: ​https://github.com/WordPress/wordpress-develop/pull/13120

Environment

  • WordPress: 7.1
  • PHP: 8.3
  • Server: PHP.wasm (Playground)
  • Database: SQLite
  • Browser: Chrome
  • OS: Windows
  • Theme: Twenty Twenty-Five
  • MU Plugins: None activated
  • Plugins: None activated

Steps taken

  1. Set up a multisite install and confirmed the issue before the patch: the view mode switcher was displayed above the list table on Network Admin > Sites and Network Admin > Users.
  2. Applied the patch.
  3. Opened Network Admin > Sites and checked the list table and the Screen Options panel.
  4. Opened Network Admin > Users and checked the same.
  5. ✅ Patch is hiding the Mode swicthers from Sites and users page, but "View mode" option is still available in Screen Options on Posts screen.

Expected result

  • The view mode switcher is no longer displayed above the list table on the network Sites and Users screens.
  • A "View mode" option is still available in Screen Options on Posts screen.

Actual results

  • ✅ Switcher links removed from above the Sites list table.
  • ✅ Switcher links removed from above the Users list table.
  • ✅ Selected view mode applies and persists after reload.
  • ✅ Posts screen view mode is unchanged (no regression).
  • ✅ View Mode not available in screen option on both Users and Sites page but available for Posts page.

Screenshots/Screencast with results

After Sites page:
After Users page:

Last edited 7 days ago by muryam (previous) (diff)
Note: See TracTickets for help on using tickets.