sourcegraph/client/common
Camden Cheek 1218b49d41
Svelte: add more general shrinkable path (#63770)
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
2024-07-12 10:36:37 -06:00
..
src Svelte: add more general shrinkable path (#63770) 2024-07-12 10:36:37 -06:00
.eslintignore Extract util/errors.ts into a new common package (#29040) 2021-12-24 17:50:53 +07:00
BUILD.bazel Remove Wildcard's dependency on @sourcegraph/common (#61781) 2024-04-15 12:26:02 +02:00
OWNERS Update FPT code owners ping (#44545) 2022-11-17 07:21:49 -05:00
package.json reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145) 2023-11-07 12:00:18 +02:00
README.md Extract util/errors.ts into a new common package (#29040) 2021-12-24 17:50:53 +07:00
tsconfig.json simplify tsconfig.json files (#57913) 2023-10-26 03:03:11 -07:00
vitest.config.ts reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145) 2023-11-07 12:00:18 +02:00

Common utilities

Generic utilities without any specific domain. This package should not depend on any other Sourcegraph monorepo package.