Skip to content

Global Search - Fix Branch Ref Based Searches

Zack Cuddy requested to merge cuddyz-support-tree-ref into master

Why Draft?

What does this MR do and why?

Closes #353026 (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 are quite a few parameters that go into this and the code_search and ref was missed. These properties are what is used to pass along a branch to a code search from pages like the branch tree view.

Screenshots or screen recordings

Before After
Branch_-_Broken_w__FF Branch_Fixed

How to set up and validate locally

  1. Fetch and checkout this branch.
  2. Activate the Feature Flag (:new_header_search).
  3. Go to a branch's project tree (ex. http://127.0.0.1:3000/flightjs/Flight/-/tree/BRANCH_NAME)
  4. Conduct a search in the header search from here
  5. Ensure the repository_ref and search_code query parameters are filled in and the search app handles 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