Version contexts frontend
Created by: attfarhan
Fixes https://github.com/sourcegraph/sourcegraph/issues/10196.
Adds UI for updating version contexts. A new dropdown on the left of the query input will read the version contexts from the site config and allow users to switch between them. When a version context is active, searches will only include results from the repos@revisions defined in the context.
Search results pages now have a c=
parameter specifying the context. If the param is c=default
or there is no c=
parameter, the default context is used.
The last selected context is stored in localStorage, so users' preferred context is stored across browser sessions. If a user visits a URL with a different c=
param, the localStorage value gets updated.
This does not solve the use case for basic code intel yet, that will be in another PR.