Skip to content

✨ feat: add maxVisibleItems to Breadcrumb - #726

Open
futjesus wants to merge 1 commit into
mainfrom
feat/breadcrumb-max-visible
Open

futjesus wants to merge 1 commit into
mainfrom
feat/breadcrumb-max-visible

Conversation

@futjesus

@futjesus futjesus commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Long paths (object storage folders, nested resources) overflow the breadcrumb. Objectstore's FolderBreadcrumb reproduced a collapsed breadcrumb with a CSS hover-only menu that keyboard users cannot reach.

  • maxVisibleItems: when there are more steps than this, the first and the last ones stay visible and the middle steps collapse into an ellipsis menu (Radix DropdownMenu, keyboard navigable). Hidden steps keep their to, target and component, and respect react-router when present.
  • collapsedLabel: accessible name of the ellipsis button (default "Show hidden steps").

Without maxVisibleItems nothing changes.

Test plan

  • New tests: collapse keeps first/last and lists hidden steps as menu links, no collapse when steps fit, custom label, axe
  • npx vitest run lib/components/Breadcrumb (14), lint, types, prettier
  • Storybook: Breadcrumb/Light and DarkCollapsed

Long paths (object storage folders, nested resources) overflow the
breadcrumb. `maxVisibleItems` keeps the first and the last steps visible
and collapses the middle ones into an ellipsis menu built on Radix
DropdownMenu, so the hidden steps stay reachable by keyboard and screen
readers; objectstore's FolderBreadcrumb reproduced this with a CSS
hover-only menu. `collapsedLabel` names the ellipsis button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant