WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 3 days ago

#15317 assigned defect (bug)

My Sites limited to 23 sites on Admin Bar

Reported by: ronbme Owned by: morganestes
Milestone: 4.4 Priority: low
Severity: normal Version: 3.1
Component: Toolbar Keywords: ux-feedback has-patch
Focuses: ui, multisite Cc:

Description

I have a test site with 25 sites. I can only access 23 from the My Sites tab on the admin bar.

(This is a minor bug, but I hadn't seen it mentioned.)

Ron

I'm using latest trunk.

Attachments (6)

15317.patch (2.4 KB) - added by ocean90 5 years ago.
15317.2.patch (1.3 KB) - added by SergeyBiryukov 4 years ago.
wp15317.patch (595 bytes) - added by magnus78 4 months ago.
css fix
screencapture-at-wed-aug-12-21-04-52-cdt-2015.png (43.2 KB) - added by morganestes 3 weeks ago.
Last item cut off
screencapture-at-wed-aug-12-21-02-27-cdt-2015.png (194.9 KB) - added by morganestes 3 weeks ago.
Flyout detatched
15317-search.patch (1.9 KB) - added by austinginder 4 days ago.

Download all attachments as: .zip

Change History (37)

@ocean905 years ago

comment:1 @ocean905 years ago

  • Component changed from General to Administration
  • Keywords has-patch ux-feedback added
  • Milestone changed from Awaiting Review to 3.1
  • Priority changed from normal to low

It's limited to your screen size.

15317.patch - With this patch only the first 15 blogs will be shown and then a link to my-sites.php

comment:2 @westi5 years ago

Limiting the list is problematic because the working length can be screensize dependent

Someone with that many sites probably wants to be able to hide some of them - which would be plugin territory.

comment:3 @ocean905 years ago

  • Keywords has-patch ux-feedback removed
  • Milestone changed from 3.1 to Future Release

Like westi said, a plugin could use the filter in get_blogs_of_user().

comment:4 @Denis-de-Bernardy5 years ago

Couldn't we add something like this in the CSS?

max-height: 600px;
overflow-y: auto; /* or scroll */

comment:5 follow-up: @nacin4 years ago

  • Milestone changed from Future Release to 3.3

WP.com has a scrolling aspect to it. Perhaps we can borrow that behavior, at least as a stopgap.

comment:6 in reply to: ↑ 5 @azaozz4 years ago

Replying to nacin:

Yes but it requires jQuery. Perhaps we can add it only when the admin bar is in the admin.

The css overflow-x/overflow-y don't work there (at least in FF) so the scrolling actually hides the top 3 and shows the bottom 3 links in the submenus (and vice-versa).

comment:7 @ocean904 years ago

#wpadminbar #wp-admin-bar-my-sites-secondary {
	max-height: 500px;
	overflow-y: scroll;
}

could work, but the submenus are hidden.

comment:8 @rekall4 years ago

just added a few sites on a fresh multiuser setup so i could see what the chatter is about...

here's a "what if" scenario:

what if we were to add mouseenter/mouseleave events to the first & last elements of the list (or to two new elements to the list with decorative up/down arrows) to the dropdown such that the cropping properties were to 'slide' the visible portion of the container? this way you could still limit the size of the list, not have to rely on a scrollbar (using overflow-y: scroll) which would conflict with the pop-out menu to the right, and instead provide a more intuitive natural way of scrolling the box up/down at will?

Last edited 4 years ago by rekall (previous) (diff)

comment:9 @ryan4 years ago

  • Component changed from Administration to Admin Bar

comment:10 @ryan4 years ago

  • Milestone changed from 3.3 to Future Release

This is not a regression from 3.2. Let's take care of it in 3.4

@SergeyBiryukov4 years ago

comment:11 @SergeyBiryukov4 years ago

  • Keywords has-patch added

Could we limit the number and make it filterable so that a plugin wouldn't have to resort to get_blogs_of_user filter?

Refreshed 15317.patch for current trunk.

Other solutions would probably require #19979.

comment:12 @Rarst3 years ago

Please note that any toolbar menu is potentially affected and they are not limited to core code, but actively added by extensions as well.

Fixing or providing filters for one specific menu won't address issue in general.

comment:13 @jeremyfelt3 years ago

  • Cc jeremy.felt@… added

comment:14 @ivnus3 years ago

  • Cc ivnus added

comment:15 @ryanduff2 years ago

  • Cc ryan@… added

comment:16 @austinginder2 years ago

  • Cc austinginder added

comment:17 @SergeyBiryukov21 months ago

#26416 was marked as a duplicate.

comment:18 @helen13 months ago

#29295 was marked as a duplicate.

comment:19 follow-up: @trepmal13 months ago

When faced with an unusably long menu, I created a little search feature. Here it is as a plugin: https://github.com/trepmal/my-sites-search

comment:20 in reply to: ↑ 19 @SergeyBiryukov13 months ago

Replying to trepmal:

When faced with an unusably long menu, I created a little search feature. Here it is as a plugin: https://github.com/trepmal/my-sites-search

This looks great and can probably be applied to arbitrary long menus as well (to address comment:12).

comment:21 @mrjarbenne13 months ago

  • Focuses multisite added

That search plugin is great when faced with a menu containing a very large number of items, but would seem to be overkill in instances where the menu is exceeding the size of the screen by only a few lines, particularly in examples where the menu fits on a regular screen, but is obscured on smaller mobile devices. Wouldn't a better solution be to allow for the menu to scroll? As noted by @Rarst, this issue rears its head not only in the My Sites menu, but also in other menus like the Profile on the right, in instances where plugins like BuddyPress add additional items that can exceed the size of the screen: a space where a search window wouldn't remedy the UI issue (see video: http://www.screencast.com/t/siMIp5PJDDL).

I don't think limiting the number of items displayed is necessarily the route that would remedy all of the varied instances in which this issue might occur. On smaller screens (smartphones particularly), the dashboard content is completely obscured by the resulting dropdown menu, making the scrolling of that dashboard content -- hidden behind the menu -- of little use. From a UI perspective, if I am attempting to scroll when on top of the menu, one can assume I am trying to scroll the menu content, and not the content beneath the menu.

comment:22 @ircbot11 months ago

This ticket was mentioned in IRC in #wordpress-dev by ericandrewlewis. View the logs.

@magnus784 months ago

css fix

comment:23 @magnus784 months ago

The css patch seems to work for me. In IE there's a slight glitch, but even there I think it's a vast improvement.

The fix in the form of a plugin:

/**
 * Make the My Sites list scroll if too many blogs
 */
function custom_my_sites() {
  $user_id = get_current_user_id();
  $user_blogs = get_blogs_of_user( $user_id );
  if (count($user_blogs) > 12) {
     echo '<style type="text/css">
      #wp-admin-bar-my-sites-list {
        max-height: 90vh;
        overflow-y: auto;
        overflow-x: visible;
      }
      #wpadminbar .menupop li.hover {
        position: relative;
      }
      #wpadminbar .menupop li.hover > .ab-sub-wrapper {
        margin-left: 337px;
        margin-top: -32px;
        position: fixed;
      }
     </style>';
  }
}
add_action('admin_head', 'custom_my_sites');

comment:24 @morganestes3 weeks ago

  • Focuses ui added
  • Keywords needs-patch ux-feedback added; has-patch removed

I tested wp15317.patch on 4.3 trunk; I can scroll through the list of sites, but there are a couple of issues that need addressed:

  1. The last site in the list gets cut off slightly. I'd like to see some extra padding at the bottom of the list so that doesn't happen.
  2. Hovering over a site in the list brings up the flyout menu but it floats to the right, separated from the site list.

As @Rarst mentioned, this potentially affects more than just the multisite site list, but since that's something that is clearly a bug in core I'd like to address it first, then see what else we can apply the fix to.

Last item cut off
Flyout detatched

comment:25 @slackbot2 weeks ago

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

comment:26 @slackbot7 days ago

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

comment:27 @morganestes7 days ago

  • Owner set to morganestes
  • Status changed from new to assigned

comment:28 @jeremyfelt5 days ago

I haven't been able to imagine one yet, but it would be really cool if we could find the right way to ditch most of the drop down interface completely in favor of some sort of smarter site switcher. The HTML generated for each site in the list is so unnecessarily heavy.

If any updated interface could account for multiple networks... Happy.

@austinginder4 days ago

comment:29 @austinginder4 days ago

I use a wide range of multisite networks and really like @trepmal search filter solution. It works well on large and small networks. I took a very slimmed down version of her plugin and submitted a patch. I'd love to see this or something like this in core.

comment:30 @SergeyBiryukov4 days ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 4.4

comment:31 @BrashRebel3 days ago

@jeremyfelt is absolutely right that the current My Sites menu impacts performance. When there's a large number of sites in the menu, especially with lots of mapped domains, I've had experiences with things slowing down big time. Have you considered getting the menu on demand with AJAX instead of loading the entire thing no matter what?

I've also played with UI solutions for this on and off for a couple years now. I've considered things like this https://css-tricks.com/long-dropdowns-solution/ which could make the list useable regardless of the number of sites. A search tool could work well also.

Note: See TracTickets for help on using tickets.