Fix group path suggestion bug
What does this MR do and why?
Related to #356934 (closed)
When creating a new group if you type in the Group name
field it will send off requests to check if the Group URL
is available. Currently there is no debouncing or anything like that so a request is fired on every keystroke. This causes issues because sometimes one request resolves before the other and leads to confusing UX. Also there are performance issues with the /namespaces/:namespace/exists
that will be investigated in #361821 (closed).
This MR adds debouncing to the Group name
field and also cancels any inbound requests before firing a new one. This means that the user will only see the most recent suggestion.
This part of the codebase uses a lot of legacy jQuery and HAML and needs to be refactored to Vue. I started down this rabbit hole but quickly realized it is going to be fairly complicated. This MR is a MVC fix for this bug. I have created #361816 (closed) as a follow-up to move to Vue.
Screenshots or screen recordings
On GitLab.com
In GDK
Before | After |
---|---|
Screen_Recording_2022-05-09_at_2.58.20_PM | Screen_Recording_2022-05-09_at_2.59.01_PM |
How to set up and validate locally
- Navigate to
/groups/new#create-group-pane
- Type in the name of a group that already exists
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.