Improve design path shortening
Created by: rrhyne
Overview
We generally do not display the code host in repository paths throughout the site. This occurs in:
- Search results
- Search results left panel
- File page breadcrumbs
- Code intel results (left panel and individual result)
Displaying the code host is especially important on cloud where duplicate repository names could exist. For instance gilab.com/sourcegraph/sourcegraph and github.com/sourcegraph/sourcegraph.
Real estate issues:
Many of those locations have tight spacing requirements that would be negatively impacted by adding the host.
Enterprise / Perforce
Enterprise installations do not follow a specific code host naming convention. We may be able to retrieve their type and settings from the code host settings to understand how to shorten the path.
Task
Explore using code host icons to solve the clarity issue while respecting real estate requirements.
Consider the information about how these items are modified and what the code host can look like in enterprise environments:
- Perforce paths
- repositoryPathPattern modifications
Also, this slack thread https://sourcegraph.slack.com/archives/C07KZF47K/p1619461232085300