Remove search autocomplete in nav bar
What does this MR do?
When you type in the search bar in the top nav at present it will perform an autocomplete request to load projects and groups that match these search results as well as some miscellaneous other suggestions. This has limited value since it's not offering pagination and only shows 5 results and it also needlessly slows the user experience. As such we've decided to remove this behaviour.
We did recognise there may be some value in some of this autocomplete behaviour but when we have basically no reason to think this is being used much and given it is impacting the performance of the more common search workflow we decided to remove it. If we do get some requests for these features in future we can always consider reverting this MR. For now though after careful discussion we've decided to just remove it all.
Though we don't need Javascript anymore for ajax requests loading data dynamically we keep it due to the remaining dynamic behaviour which shows navigation options to "issues assigned to me" etc. when the search bar is empty as well as allowing the user to perform searches against the group or project or globally depending on the current context which may be trickier to implement server side. The component was renamed to convey that it is no longer autocompleting anything but none of the logic is changed except for all the autocompletion being removed.
This MR does attempt to strip out as much code as possible though. Interestingly the frontend had no Javascript tests for the data request behaviour that was removed even though it had tests for the remaining behaviour so required no unit test changes.
Screenshots
Before
After
When search input is empty
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team