Global Search - Header Search Snippets
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
- Fetch and checkout this branch.
- Activate the Feature Flag (
:new_header_search
). - Go to the Snippets explore page
DOMAIN/explore/snippets
. - Enter a header search and press enter (or click the "Term" in All GitLab).
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tomas Bulva