[Spike] Improve accuracy of group selector in Branch Rules
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Context
We've recently changed filterKey
for group selector from name
to id
to make sure users can select multiple (different) groups with the same name. More context in Unable to select multiple groups with same name in MR approval rules drawer.
However, we've seen a report of returned groups not matching the search string. See the example of searching for gitlab-org
from all groups in Duo UI project:
Here's a little investigation I did inside GitLab repository. I started typing the same string gitlab-org
. I was given 3 results: returned group for still empty string, returned group for an incomplete string and returned groups for a complete string. The dropdown with results updated dynamically, and asynchronously from what I was typing (the last changed happened a moment after I stopped typing). Notice that different results where displayed in the dropdown, when the input already contained the complete string.
search string | respond | screenshot |
---|---|---|
|
empty-string-request.json ![]() |
![]() |
gitlab- |
gitlab-dash-request.json ![]() |
![]() |
gitlab-org |
gitlab-dash-org-request.json ![]() |
![]() |
Questions
We want to rethink the way the search works, so that it is not confusing and returns helpful information.
- When should we call the endpoint? Do we want to debounce?
- How dynamic should it be?
- Should we sort the results in some way?