Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

Perspective: Improve rendering of very long names #277

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

hojberg
Copy link
Member

@hojberg hojberg commented Nov 23, 2021

Overview

Now, with a very long namespace perspective, always ensure that the visual slug is visible and clip the namespace on the left side, favoring the tail end of the namespace: base.List.NonEmpty might become ...List.NonEmpty rather than base.List.NonE....

CleanShot 2021-11-23 at 16 26 33@2x

Fixes #264

Implementation notes

This uses a bit of a hackish way to determine overflow to add a css class, but the low effort compared to alternatives seemed worth it.

Caveats

I also removed the "up" icon for going from a perspective to the root. The user can always just click the top left area (where it says "Unison Share"). I might put the up icon there later on to better indicate this behavior.

@hojberg hojberg requested a review from pchiusano November 23, 2021 21:33
Now, with a very long namespace perspective, always ensure that the
visual slug is visible and clip the namespace on the left side, favoring
the tail end of the namespace: `base.List.NonEmpty` might become
`...List.NonEmpty` rather than `base.List.NonE...`.
@hojberg hojberg force-pushed the fix-namespace-perspective-overflow branch from d820bb8 to 0a43ca5 Compare November 23, 2021 21:35
@hojberg hojberg merged commit 53c0489 into main Nov 24, 2021
@hojberg hojberg deleted the fix-namespace-perspective-overflow branch November 24, 2021 16:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad crop of perspective visual slug
1 participant