sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.12k stars 1.29k forks source link

Improve design path shortening #20458

Open rrhyne opened 3 years ago

rrhyne commented 3 years ago

Overview

We generally do not display the code host in repository paths throughout the site. This occurs in:

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:

Also, this slack thread https://sourcegraph.slack.com/archives/C07KZF47K/p1619461232085300

rrhyne commented 3 years ago

image

Figma:

https://www.figma.com/file/QqFYlk9Jez1d3DNpZXVf7l/Minimal-search-panel-19903?node-id=69%3A0

olafurpg commented 3 years ago

The line wrapping and logo looks great looks great! What does the "122" number stand for? Also, would it make sense to drop the leading / character?

rrhyne commented 3 years ago

Matches in that repo. We just dropped the / and the logo now is a more proper size. We also replaced repo: with r: and reduced the font size. More items now fit on one line.

umpox commented 3 years ago

@rrhyne Was this meant to be closed?

rrhyne commented 3 years ago

Actually, no... thank you.

This ticket addressed part of the issue, but we need to bring this back out at a later date: https://github.com/sourcegraph/sourcegraph/issues/20717