Skip to content

Global Search - Header Search Snippets

Zack Cuddy requested to merge cuddyz-snippets-scope into master

What does this MR do and why?

Closes #353020 (closed)
This change is behind a feature flag (:new_header_search)

This is a fix to a minor regression with the New Header Search. The header search uses the search_context to properly "build" the search query that is passed when using the top nav search. There a quite a few parameters that go into this and the for_snippets was missed. This Boolean is true when you search from a snippets page like DOMAIN/explore/snippets.

Screenshots or screen recordings

Before After
Snippets_-_Broken_w__FF Snippets_Fix

How to set up and validate locally

  1. Fetch and checkout this branch.
  2. Activate the Feature Flag (:new_header_search).
  3. Go to the Snippets explore page DOMAIN/explore/snippets.
  4. Enter a header search and press enter (or click the "Term" in All GitLab).
  5. Ensure it adds the snippets=true to the URL and the search app takes care of the rest.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tomas Bulva

Merge request reports

Loading