Skip to:
Content

BuddyPress.org

Opened 11 months ago

Closed 11 months ago

Last modified 9 months ago

#7980 closed defect (bug) (fixed)

Group member admin autocomplete does not fail gracefully on "large network"

Reported by: boonebgorges Owned by: boonebgorges
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch needs-testing 2nd-opinion
Cc:

Description

The Dashboard group admin panel includes an interface for adding users to groups. This interface is a text entry field that expects a comma-separated list of user_logins. The field has autocomplete support; the server-side handler is https://buddypress.trac.wordpress.org/browser/tags/3.2.0/src/bp-groups/bp-groups-admin.php#L1236

If you are running a large multisite network, the UI behavior is poor:

  • When you start typing, a spinner gif appears, and an AJAX request is sent. But the AJAX request fails with -1 https://buddypress.trac.wordpress.org/browser/tags/3.2.0/src/bp-groups/bp-groups-admin.php?marks=1244-1246#L1236. So you don't get any autocomplete results, and the spinner never stops.
  • Since you can't select autocomplete results, you've got to enter a user_login (or comma-separated list of user_logins). But there's no way to know this by looking at the interface - I only knew because I wrote this interface originally, and even I had to open the codebase to figure it out :)

I'll post a patch for what is, I think, a minimal fix.

Attachments (3)

Screenshot_2018-10-02_14-47-24.png (7.0 KB) - added by boonebgorges 11 months ago.
wp_is_large_network( 'users' ) === true
Screenshot_2018-10-02_14-48-09.png (6.3 KB) - added by boonebgorges 11 months ago.
wp_is_large_network( 'users' ) === false
7980.diff (1.8 KB) - added by boonebgorges 11 months ago.

Download all attachments as: .zip

Change History (8)

@boonebgorges
11 months ago

wp_is_large_network( 'users' ) === true

@boonebgorges
11 months ago

wp_is_large_network( 'users' ) === false

@boonebgorges
11 months ago

#1 @boonebgorges
11 months ago

  • Keywords has-patch needs-testing 2nd-opinion added

7980.diff does the following when wp_is_large_network( 'users' ):

  • Removes the placeholder text
  • Adds a gloss (instead of a placeholder) describing what kind of input is expected
  • Removes the autocomplete functionality

See screenshots.

I'd welcome a second set of eyes on the patch, as well as a second opinion on the UX change.

#2 @johnjamesjacoby
11 months ago

Seems fine enough to me. Thanks for noticing & patching this.

#3 @boonebgorges
11 months ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 12241:

Groups: Improve Dashboard add-user interface for networks with many users.

When wp_is_large_network( 'users' ), the JS-driven autocomplete functionality
for the new member field should degrade gracefully.

Fixes #7980.

#4 @boonebgorges
9 months ago

In 12303:

Introduce bp_is_large_install() and use throughout BuddyPress.

This checks provides a fallback that is not dependent on Multisite, and
helps prevent a fatal error introduced in [12241]. See #7980.

Props shanebp, dcavins, johnjamesjacoby.
Fixes #8012.

#5 @boonebgorges
9 months ago

In 12304:

Introduce bp_is_large_install() and use throughout BuddyPress.

This checks provides a fallback that is not dependent on Multisite, and
helps prevent a fatal error introduced in [12241]. See #7980.

Merges [12303] to the 4.0 branch.

Props shanebp, dcavins, johnjamesjacoby.
Fixes #8012.

Note: See TracTickets for help on using tickets.