Skip to content

non-code scope search should always show syntax options link

Summary

In some circumstance, the Syntax options link may disappear on non-code search result pages. The correct behavior is that the link should always show on scopes except code.

Steps to reproduce

  1. Search in the code scope, for example https://gitlab.com/search?group_id=9970&project_id=278964&scope=blobs&search=%22syntax+options%22
  2. Change to a non-default branch, for example https://gitlab.com/search?group_id=9970&project_id=278964&scope=blobs&search=%22syntax+options%22&repository_ref=v16.9.1-ee. The Syntax options link disappears now which is expected.
  3. Change the scope to Issues, for example https://gitlab.com/search?group_id=9970&project_id=278964&repository_ref=v16.9.1-ee&scope=issues&search=%22syntax+options%22

What is the current bug behavior?

After step 3 above, I expect the Syntax options to be shown as it's not in the code scope any longer.

What is the expected correct behavior?

Syntax options link does not show up.

Relevant logs and/or screenshots

It's possible that the URL still contains the parameter repository_ref pointing to a non-default branch. And that parameter is used to determine whether the link will be rendered or not.

Possible fixes

Always show Syntax options if it's not for code scope.

OSZAR »