Skip to content

Skip groups query in @ autocomplete if not needed

What does this MR do and why?

When we already have enough user results, we do not need to query groups since they won't be displayed on the frontend anyway

For context:

We have 2 types of autocomplete right now. In the plain-text editor, we do backend filtering (params[:search] is given) while in the rich text editor, we return all results from the backend and then filter on the frontend. There is an issue to use the same filtering for the rich text editor. This MR focuses on the former case where we do backend filtering.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. In an issue / MR Markdown field, type @
  2. There should be no change in behavior and you should be able to search for groups if your search term does not return >10 user results
Edited by Heinrich Lee Yu

Merge request reports