mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
This adds two new components for the common situation of needing to display a styled path. - `DisplayPath` handles splitting, coloring, spacing, slotting in a file icon, adding a copy button, and ensuring that no spaces get introduced when copying the path manually - `ShrinkablePath` is built on top of `DisplayPath` and adds the ability to collapse path elements into a dropdown menu These are used in three places: - The file header. There should be no change in behavior except maybe a simplified DOM. This makes use of the "Shrinkable" version of the component. - The file search result header. This required carefully ensuring that the text content of the node is exactly equal to the path so that the character offsets are correct. - The file popover, where it is used for both the repo name (unlinkified version) and the file name (linkified version). Fixes SRCH-718 Fixes SRCH-690 |
||
|---|---|---|
| .. | ||
| src | ||
| .eslintignore | ||
| BUILD.bazel | ||
| OWNERS | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Common utilities
Generic utilities without any specific domain. This package should not depend on any other Sourcegraph monorepo package.