Repository navigation
Conversation
880e0a3 to
1ba7e19
Compare
sophstad
left a comment
There was a problem hiding this comment.
I wouldn't be surprised if we get feedback on the color change of the links 😅 looks nice though!!
| text: "spruce", | ||
| to: "/project/spruce/waterfall", | ||
| onClick: () => actions("Clicked first link"), | ||
| onClick: action("Clicked first link"), |
There was a problem hiding this comment.
[nit] I know it's not new, but does this actually do anything? I couldn't find it on the storybook page.
Also could be nice to flesh out the stories a bit to reflect patches/tasks/execution tasks but not a requirement since this isn't your wheelhouse!
There was a problem hiding this comment.
does this actually do anything?
Yes! It just logs an action (in this case, a click action) in the "Actions" tab of the Storybook bottom panel. In my experience, I've mostly seen it used as an alternative to a dummy callback that fires a console.log()
| align="center" | ||
| delay={0} | ||
| isDisabled={!shouldTrimMessage} | ||
| side="top" |
There was a problem hiding this comment.
Is this a new problem introduced by the Via Breadcrumbs? If not, I think we should handle in a separate ticket.
As for ideas, the breadcrumb text isn't intended to be for such a long string, and tooltip text is also intended to provide more concise, supplementary text. Given that, I can only think of a couple options:
- Is there another unique metadata param that can be used in place of task name that still fits the original requirement?
- Is it possible to create an abbreviated task name alongside the lengthier one when the task metadata object is created?
| <ViaBreadcrumb | ||
| key={`breadcrumb-${text}`} | ||
| data-testid={dataTestId} | ||
| href={to} |
There was a problem hiding this comment.
Nice, this change tipped me off to how navigation is now integrated with ViaProvider so we don't have to do all the manual as={Link} now. Wahoo!
minnakt
left a comment
There was a problem hiding this comment.
Sorry to be difficult but I want to push back on the breadcrumb color. Our manager also isn't too fond of this change. 😅 Could we style over the Via component to make the breadcrumb links blue?
Not difficult at all! Links are blue again: non-current crumbs use Via's link color and Link hover color, and the current page keeps Via's styling. |
Render Via Breadcrumbs/Breadcrumb instead of LeafyGreen Tooltip plus a hand-rolled chevron list. The Breadcrumb[] API stays the same, so the Task and Version page callers don't change. - The last crumb is always the current page in Spruce, so the trail sets includesCurrentPage. - Analytics onClick handlers fire through Breadcrumbs onAction, keyed by crumb index, because Via's Breadcrumb has no onClick. - Via truncates long labels with its own tooltip, so the 30-character middle trim and the breadcrumb-tooltip test id are gone. The e2e assertion that matched the trimmed text now matches the full message. - The story used the actions() factory, which never logged; it now uses action().
Via only lets the last crumb shrink, so a long commit message in the middle crumb overflowed the nav instead of truncating with a tooltip. Let every crumb shrink until UXE-1485 fixes it in Via. Click the link inside each crumb in e2e rather than the li centre, and cover that the current-page crumb never fires its onClick.
Use @via-ds/components/breadcrumbs rather than the package root, matching the other per-component imports in Spruce.
Labels over 30 characters are trimmed from the middle again, with the full text in a hover tooltip, as before the migration. The tooltip is a Via Tooltip inside the crumb; Via's own truncation tooltip never shows, because a trimmed label doesn't overflow. Trimmed labels can't overflow the nav, so the UXE-1485 flex-shrink workaround is gone, and the e2e assertion matches the trimmed message again. The tooltip test moves the pointer once before hovering: React Aria ignores the first pointer event in a document, which a real mouse always generates before reaching a crumb.
Via Breadcrumbs renders every crumb link in text-secondary gray. Reviewers want Spruce to keep the blue links it had with LeafyGreen, so non-current crumbs use Via's link color and Link hover color. The current page keeps Via's styling.
49de733 to
e339b02
Compare

UXE-1560
Description
Migrates Spruce's
Breadcrumbsfrom LeafyGreen to Via. TheBreadcrumb[]API is unchanged, so callers don't change.includesCurrentPage).onClicks fire through Via'sonAction.Tooltip./instead of a chevron.The Tabs half of UXE-1560 is in #2124.
Screenshots
Ancestor links stay blue (overriding Via's secondary text color). The other visible changes are Via defaults: the separator is
/instead of a chevron, and the current page is bold.