Skip to content

Remove search autocomplete in nav bar

Dylan Griffith requested to merge 213699-remove-search-results-autocomplete into master

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

Screen_Shot_2020-06-02_at_1.58.29_pm

After

Screen_Shot_2020-06-02_at_1.59.04_pm

When search input is empty

Screen_Shot_2020-05-06_at_3.59.40_pm

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

#213699 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports