Make WordPress Core

Opened 14 years ago

Last modified 7 months ago

#15317 assigned enhancement

My Sites limited to 23 sites on Admin Bar

Reported by: ronbme's profile ronbme Owned by: morganestes's profile morganestes
Milestone: Future Release Priority: normal
Severity: normal Version: 3.1
Component: Toolbar Keywords: make-flow needs-patch needs-design-feedback needs-refresh needs-screenshots
Focuses: ui, multisite, rest-api 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 (13)

15317.patch (2.4 KB) - added by ocean90 14 years ago.
15317.2.patch (1.3 KB) - added by SergeyBiryukov 13 years ago.
wp15317.patch (595 bytes) - added by magnus78 10 years ago.
css fix
screencapture-at-wed-aug-12-21-04-52-cdt-2015.png (43.2 KB) - added by morganestes 9 years ago.
Last item cut off
screencapture-at-wed-aug-12-21-02-27-cdt-2015.png (194.9 KB) - added by morganestes 9 years ago.
Flyout detatched
15317-search.patch (1.9 KB) - added by austinginder 9 years ago.
15317-search-v2.patch (1.9 KB) - added by austinginder 9 years ago.
Screen Shot 2020-11-20 at 14.48.30.png (122.4 KB) - added by paaljoachim 4 years ago.
Screenshot of the readme from the Github repo for: My Sites Search plugin
15137.filter-jquery.patch (2.3 KB) - added by sabernhardt 3 years ago.
refreshing the filter option (with jQuery for now)
Search-sites.jpg (214.6 KB) - added by paaljoachim 3 years ago.
Suggestion 1. Inspired by Per's plugin: https://github.com/soderlind/super-admin-all-sites-menu
Search-sites-ver2.jpg (216.2 KB) - added by paaljoachim 3 years ago.
Suggestion 2.
Search-Sites-ver3.jpg (215.8 KB) - added by paaljoachim 3 years ago.
Suggestion 3.
Super-Admin-All-Sites-menu.gif (321.6 KB) - added by paaljoachim 3 years ago.
Super Admin plugin by Per - All Sites menu

Download all attachments as: .zip

Change History (88)

@ocean90
14 years ago

#1 @ocean90
14 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

#2 @westi
14 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.

#3 @ocean90
14 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().

#4 @Denis-de-Bernardy
14 years ago

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

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

#5 follow-up: @nacin
13 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.

#6 in reply to: ↑ 5 @azaozz
13 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).

#7 @ocean90
13 years ago

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

could work, but the submenus are hidden.

#8 @rekall
13 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 13 years ago by rekall (previous) (diff)

#9 @ryan
13 years ago

  • Component changed from Administration to Admin Bar

#10 @ryan
13 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

#11 @SergeyBiryukov
13 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.

#12 @Rarst
12 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.

#13 @jeremyfelt
12 years ago

  • Cc jeremy.felt@… added

#14 @ivnus
12 years ago

  • Cc ivnus added

#15 @ryanduff
11 years ago

  • Cc ryan@… added

#16 @austinginder
11 years ago

  • Cc austinginder added

#17 @SergeyBiryukov
11 years ago

#26416 was marked as a duplicate.

#18 @helen
10 years ago

#29295 was marked as a duplicate.

#19 follow-up: @trepmal
10 years 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

#20 in reply to: ↑ 19 @SergeyBiryukov
10 years 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).

#21 @mrjarbenne
10 years 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.

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


10 years ago

@magnus78
10 years ago

css fix

#23 @magnus78
10 years 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');

#24 @morganestes
9 years 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

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


9 years ago

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


9 years ago

#27 @morganestes
9 years ago

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

#28 @jeremyfelt
9 years 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.

#29 @austinginder
9 years 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.

#30 @SergeyBiryukov
9 years ago

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

#31 @BrashRebel
9 years 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.

#32 @austinginder
9 years ago

As recommended by @georgestephanis I've revised my search patch with a minor JS improvement. The code .find(‘>a’) has been replaced with .children(‘a’) .

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


9 years ago

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


9 years ago

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


9 years ago

#36 @ryan
9 years ago

  • Keywords make-flow added

#37 @morganestes
9 years ago

Based on discussion in #docs (see https://wordpress.slack.com/archives/design/p1440695616000216), here's the plan for this ticket:

  1. If a multisite install has over 10 sites, only show the "top" (however that's defined) 6-10 in the menu, with a search box at the top to find or filter the rest.
  2. Don't just load all the sites into the DOM and hide them, as that's a performance issue. That leaves us with AJAX for now, with the potential for REST in a future version.
  3. (maybe) add a filter for the "top sites" to allow the list to be defined via plugin.

Things to consider:

  • Performance of loading and searching through hundreds or thousands of sites if they're all in the DOM.
  • Is infinite scroll an option?
  • No JS? Add a "more..." link that takes you to the sites list in Admin.
  • Can we use a site icon in the menu if one is set for the site?

I'm looking at the recent patch by @austinginder and the plugin by @trepmal as starting points for this one, and would like to see efforts progress along these lines if possible.

Ticket #33574 has been created for the general long-menu UI we find in other places in the toolbar.

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


9 years ago

#39 @SergeyBiryukov
9 years ago

  • Keywords needs-patch added; has-patch removed

#40 @jeremyfelt
9 years ago

  • Milestone changed from 4.4 to Future Release
  • Priority changed from low to normal

Bumping this for the 4.4 cycle as any solution will need to be heavily tested, but happy to see continued work for 4.5.

#41 @morganestes
9 years ago

  • Milestone changed from Future Release to 4.5

#42 @jeremyfelt
9 years ago

Thoughts (as a follow-up to my earlier comment):

  • No more HTML. Provide an object with required data and/or use AJAX on demand. It may make sense to start thinking about endpoint requirements for the REST API here.
  • What if we just remove the list of sites and offered an easy way to start searching? The WP.com site switcher interface seems like a step in the right direction. Could that be done even better?
  • We should be able to rely on the full My Sites page as a useable backup. That needs an overhaul. This would also be the no-JS fallback.
  • If we did keep the existing format and chop the menu to a specific # of sites, it would make sense to offer some for the user to mark those sites.

In general, I'd be a big fan if we started this menu from scratch rather than working with the existing implementation. Feature plugin?

#43 @djinajlu
9 years ago

This is actually related to the https://core.trac.wordpress.org/ticket/32678#comment:89 I don't see why we have two places to handle it.

#44 @jeremyfelt
9 years ago

  • Milestone changed from 4.5 to Future Release

We need to give this more attention earlier in a release. I think the solution will treat this more as an enhancement than a bug and will involve quite a bit of testing.

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


9 years ago

#46 @swissspidy
8 years ago

  • Focuses rest-api added

#47 @SergeyBiryukov
7 years ago

#41276 was marked as a duplicate.

#48 @johnbillion
7 years ago

#42068 was marked as a duplicate.

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


6 years ago

#50 @swissspidy
6 years ago

#45071 was marked as a duplicate.

#51 @behzadg
6 years ago

Any update on this?

#52 @SergeyBiryukov
5 years ago

#49074 was marked as a duplicate.

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


5 years ago

#54 @createscape
4 years ago

I would like to see this fixed. This ticket is 10 years old but it is still a problem.

#55 @desrosj
4 years ago

  • Keywords needs-design-feedback added; ux-feedback removed

@behzadg @createscape This one is still waiting for someone with the time and desire to work on this, but it falls outside of the project's current priorities so is lower priority.

I am adding needs-design-feedback as this keyword replaced ux-feedback. When a member of the design team has a chance, they can provide some guidance here to hopefully give someone the information they need to work on this.

#56 follow-up: @zephyr7501
4 years ago

I've solved it with CSS and JavaScript. Give it a try if you want.

https://qiita.com/zephyr7501/items/dd0967fddabd888b28c4
(Sorry, it's only in Japanese. I'll add an explanation in English later.)

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


4 years ago

#58 @estelaris
4 years ago

  • Keywords needs-refresh needs-screenshots added

We need recent screenshots for design to reivew the issue.

#59 @neilticktin
4 years ago

Hoping this can be shared, reviewed, and integrated into core -- it's a pain to have this limit on our WP sever with a bunch of small sites.

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


4 years ago

#61 follow-up: @paaljoachim
4 years ago

Can we get a status update to where this ticket is at?

Thank you!

#62 in reply to: ↑ 61 @jeremyfelt
4 years ago

  • Type changed from defect (bug) to enhancement

Replying to paaljoachim:

Can we get a status update to where this ticket is at?

"Needs direction"/"needs reboot" is probably the best way to sum it up.

I think I still agree with what I wrote in an earlier comment, including:

In general, I'd be a big fan if we started this menu from scratch rather than working with the existing implementation. Feature plugin?

There is probably success to be had in the short term by creating a plugin or building off an existing one like https://github.com/trepmal/my-sites-search

I'm going to change the tag on this to match my guess that the solution to this is really an enhancement and not a bug fix. I would adjust the ticket title, but it's so familiar after 10 years. :)

#63 @paaljoachim
4 years ago

Thanks for the adjustments Jeremy!
I am including a screenshot of https://github.com/trepmal/my-sites-search plugin.

It is of course nice to get some movement on this ticket. Whomever is up for it..:)

@paaljoachim
4 years ago

Screenshot of the readme from the Github repo for: My Sites Search plugin

#64 in reply to: ↑ 56 @brasofilo
4 years ago

Replying to zephyr7501:

I've solved it with CSS and JavaScript. Give it a try if you want.

Thanks, zephyr7501, the scrolling works great.

Also, it's perfect if mixed with @paaljoachim plugin.

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

#65 follow-up: @PerS
3 years ago

I'm doing my take on the subsites menu. I lazy load the subsites, using IntersectionObserver and AJAX, loading only 80 subsites at a time. I've used @zephyr7501 CSS patch to make the subsites menu scrollable. My code is available at https://github.com/soderlind/super-admin-all-sites-menu

@sabernhardt
3 years ago

refreshing the filter option (with jQuery for now)

#66 @sabernhardt
3 years ago

I almost had the filter option patch ready to share 3 weeks ago, so I uploaded it here. If this method is desired, the jQuery needs to be converted to vanilla JS for use on the front end and the site number probably should be higher than 5.

On the other hand, a JS-populated menu may be preferable for performance reasons anyway (#53213).

#67 in reply to: ↑ 65 ; follow-up: @PerS
3 years ago

Replying to PerS:

I'm doing my take on the subsites menu. I lazy load the subsites, using IntersectionObserver and AJAX, loading only 80 subsites at a time. I've used @zephyr7501 CSS patch to make the subsites menu scrollable. My code is available at https://github.com/soderlind/super-admin-all-sites-menu

I've updated my plugin, storing subsite menu data in IndexedDB, and only updating IndexedDB when a site is added or deleted, making it very fast/lite. I've also added a search filter.

@paaljoachim
3 years ago

Suggestion 1. Inspired by Per's plugin: https://github.com/soderlind/super-admin-all-sites-menu

@paaljoachim
3 years ago

Suggestion 2.

@paaljoachim
3 years ago

Suggestion 3.

#68 @paaljoachim
3 years ago

We can also get inspiration from the plugin: Multisite Admin Bar Switcher.
https://wordpress.org/plugins/multisite-admin-bar-switcher/

The main inspiration as I see is how many links each site links to. Giving quicker access through the My Sites dropdown to each screen.

@paaljoachim
3 years ago

Super Admin plugin by Per - All Sites menu

#69 @paaljoachim
3 years ago

The above gif shows a nice improvement compared to the current My Sites drop down.

  • It offers a nice search field.
  • It also offers additional links the admin can easily directly enter.

I feel there is no need to have a search field visible when the number of sites is below a specific number (10-15?). This means when the minimum number of sites have been reached a search field would show up to give the opportunity for the admin to find the correct site.

I will go ahead and remove the needs-screenshots and needs-design-feedback labels. Please add these back if I am mistaken. I assume that when ready that Per's plugin code could be implemented as a patch for testing.

#70 in reply to: ↑ 67 @PerS
3 years ago

Replying to PerS:

Replying to PerS:

I'm doing my take on the subsites menu. I lazy load the subsites, using IntersectionObserver and AJAX, loading only 80 subsites at a time. I've used @zephyr7501 CSS patch to make the subsites menu scrollable. My code is available at https://github.com/soderlind/super-admin-all-sites-menu

I've updated my plugin, storing subsite menu data in IndexedDB, and only updating IndexedDB when a site is added or deleted, making it very fast/lite. I've also added a search filter.

FWIW: (as I mentioned earlier) I use the CSS from @zephyr7501. It had a small issue, if the number of sites didn't fill the window height you got a gray field below the last entry, all the way to the bottom of the page. In my plugin I adjust the menu height using an IntersectionObserver: https://github.com/soderlind/super-admin-all-sites-menu/blob/main/include/modules/observe.js#L33-L75

#71 @sabernhardt
3 years ago

#54107 was marked as a duplicate.

#72 @JeffPaul
3 years ago

@PerS's approach in https://github.com/soderlind/super-admin-all-sites-menu seems to handle things pretty well here. What significant concerns would folks have with that approach? Asked differently, if that happened to be a featured plugin approach what additional updates/fixes would folks ideally want to see there?

#73 @PerS
3 years ago

Fwiw, I've updated my plugin. It's loading sites using REST. It uses @wordpress/i18n, etc.

More at: https://github.com/soderlind/super-admin-all-sites-menu/blob/main/CHANGELOG.md

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


21 months ago

#75 @SergeyBiryukov
7 months ago

#61207 was marked as a duplicate.

Note: See TracTickets for help on using tickets.