Indicate to users when global searches are being scoped to a specific content type

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Problem to solve

When users search within the Global Search field within the top navbar, we often times scope those searches to a specific content type (by defaulting to that content type tab on the result page) based on where they are performing the search from (example: defaulting to the "Issues" tab when searching from an issue or the issue list). This isn't always obvious to users both when they are performing the search and when they land on the results page, and they may not understand why they are defaulted to different tabs when performing searches from different locations across the product.

This is related to #284139 (closed) where we are working towards indicating the group/project scope when performing a search from the top navbar.

In addition, this came up as a experience improvement recommendation in both a competitive evaluation (https://gitlab.com/gitlab-org/competitor-evaluations/-/issues/5#insights-with-issue-links) as well as on a recent UX Scorecard (https://gitlab.com/gitlab-org/gitlab-design/-/issues/1679).

Proposal

Indicate to users when searches are being scoped to a specific content type. It may also be beneficial to allow the user to clear or change this selection at the time of search, though that could be an enhancement/future iteration if the level of effort is extensive.

Example of similar experience in Slack:

scope options scoped search
Screen_Shot_2021-10-01_at_2.25.01_PM Screen_Shot_2021-10-01_at_2.15.21_PM
Edited by 🤖 GitLab Bot 🤖