Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable minimum characters before autocomplete user searches #30313

Closed
tomneedham opened this issue Jan 30, 2018 · 7 comments
Closed

Configurable minimum characters before autocomplete user searches #30313

tomneedham opened this issue Jan 30, 2018 · 7 comments
Assignees
Labels
feature:sharing p1-urgent Critical issue, need to consider hotfix with just that issue performance Type:Bug
Milestone

Comments

@tomneedham
Copy link
Contributor

Motivation:

For large user lists searching for the first two characters can be very slow to return.

@tomneedham tomneedham added this to the development milestone Jan 30, 2018
@tomneedham tomneedham self-assigned this Jan 30, 2018
@tomneedham tomneedham assigned PVince81 and unassigned tomneedham Feb 27, 2018
@tomneedham tomneedham added the p1-urgent Critical issue, need to consider hotfix with just that issue label Feb 27, 2018
@PVince81
Copy link
Contributor

custom groups also has such autocomplete...

Here's a possible approach:

  1. Create a new oc_appconfig setting that sets the minimum chars for any user or group related autocomplete
  2. Config value is exposed over capabilities API
  3. Add setting in UI somewhere or keep it internal but documented ?
  4. Frontend code must read capability value (accessing through OC.getCapabilities()) and adjust autocomplete threshold accordingly (needs change in sharing code and customgroups)
  5. Backend code UserManager and GroupManager refuse to work if the search pattern given to any find* and search* methods is shorter than the minimum. This saves us for modifying backend for any other endpoints.

One concern with 5 is that some code paths might call the search functions with empty string. Maybe we should still allow empty string. But then need to check that the autocomplete backend code doesn't allow for empty string either (it already shouldn't).

@tomneedham
Copy link
Contributor Author

call the search functions with empty string

Hmm why would they do that... to list all users. We have other methods for that.

@PVince81
Copy link
Contributor

I don't know... legacy stuff...

@PVince81
Copy link
Contributor

as discussed in chat, the approach above is what we want to do

@tomneedham tomneedham changed the title Only search for users in share autocomplete after 3 letters Configurable minimum characters before autocomplete user searches Feb 28, 2018
@VicDeo VicDeo assigned VicDeo and unassigned PVince81 Mar 1, 2018
@PVince81
Copy link
Contributor

PVince81 commented Mar 2, 2018

@VicDeo
Copy link
Member

VicDeo commented Apr 4, 2018

#30798 and #30994 were merged -> close.

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature:sharing p1-urgent Critical issue, need to consider hotfix with just that issue performance Type:Bug
Projects
None yet
Development

No branches or pull requests

4 participants