Skip to content

Draft: Global Search - Refactor Header Search

Zack Cuddy requested to merge 297396_01-gldropdown-topbar-search into master

What does this MR do?

This change is WIP and not yet finished being implemented

Closes #297396 (closed)

This change is behind a feature flag (:new_header_search)

This change will most likely be broken down into smaller chunks depending on the size it ends up achieving.

This goal here is to replace the large deprecated jquery component used for the Header Search: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/search_autocomplete.js

Replacing it with GitLab UI will allow us to add features more effectively as well as true up the styles permanently by using the GitLab UI component.

There are quite a few features in this combo search/dropdown field that will need to be verified before we remove the Feature Flag.

Here is a full roadmap for when the missing features will be added: #297396 (comment 665578315)

Screenshots or Screencasts (strongly suggested)

Default Options (No Search)

Collapsed Expanded (No Search)
Color Theme (Basic) Screen_Shot_2021-07-15_at_2.09.10_PM Screen_Shot_2021-07-15_at_2.09.04_PM
Light Theme Screen_Shot_2021-07-15_at_2.09.16_PM Screen_Shot_2021-07-15_at_2.09.21_PM
Dark Mode Screen_Shot_2021-07-15_at_2.09.40_PM Screen_Shot_2021-07-15_at_2.09.44_PM

Autocomplete Options (w/ Search)

Dashboard From Project
Screen_Shot_2021-08-09_at_4.19.10_PM Screen_Shot_2021-08-09_at_4.19.22_PM

How to test?

  1. Fetch and checkout this branch
  2. From your GDK terminal, access the rails console by typing rails c
  3. Enable the feature flag by typing Feature.enable(:new_header_search)
  4. Test the new Top Nav Search UI, checking that all existing functionality remains
  5. To disable the feature flag follow steps 2 and 3 but rather type Feature.disable(:new_header_search)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] 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
Edited by Zack Cuddy

Merge request reports