[WEB-8151] feat(breadcrumb): finalize Breadcrumb for design system — typed label/icon API, menu-crumb caret, a11y + RTL coverage#227
Open
codingwolf-at wants to merge 3 commits into
Conversation
- Added `BreadcrumbLink` for navigable crumbs with an optional leading icon and label. - Introduced `BreadcrumbPage` for the current page crumb, also supporting an optional leading icon. - Updated `BreadcrumbMenuTrigger` to use `BreadcrumbTriggerIndicator` for improved visual consistency. - Refactored existing breadcrumb components and stories to accommodate new structures and enhance usability. - Adjusted styles and variants to ensure consistent appearance across breadcrumb elements.
|
📚 Storybook preview: https://pr-227-propel-storybook.vamsi-906.workers.dev |
…nents - Modified `BreadcrumbEllipsisTriggerProps` and `BreadcrumbMenuTriggerProps` to include "render" in the omitted props for better flexibility. - Updated the rendering order in `BreadcrumbEllipsisTrigger` and `BreadcrumbMenuTrigger` for improved clarity. - Enhanced documentation for props to clarify usage and requirements. - Added a new `RTLCanary` story to test and demonstrate RTL support in breadcrumb components, ensuring proper visual behavior in both LTR and RTL layouts.
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
…nents - Replaced the `swallow` function with inline event handling in `BreadcrumbLink` components to prevent default link behavior. - Cleaned up the code by removing unnecessary comments related to the previous event handling approach. - Ensured consistent behavior across all breadcrumb stories by updating the click event handling for navigable crumbs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Finalizes the Breadcrumb component for design-system lock. Moves the component-tier crumbs from a children-based API to typed props, adds first-class icon slots, introduces a dedicated disclosure caret with an active state, and closes the API/a11y gaps found in a production-readiness audit.
API
BreadcrumbLink/BreadcrumbPage(components tier) now take a requiredlabel: stringand an optional leadingicon— typed and predictable — instead of freeform children. (Elements tier keeps the low-level children slots.)--node-sizeand tintsecondary— consumers pass<Icon icon={…} tint="secondary" />with nomagnitude, matching theMenuItemconvention.BreadcrumbMenuTrigger/BreadcrumbEllipsisTrigger:renderis no longer exposed, so a consumer can't accidentally override the fixed styled-crumb graft;labelis now required on the menu trigger so it always has an accessible name.New part
BreadcrumbTriggerIndicator— the menu-crumb disclosure caret, replacing the sharedDisclosureIndicator. It carries a breadcrumb-specific active state:icon-secondaryat rest, shifting toicon-primary(and rotating down) when that crumb's menu is open.Styling
whitespace-nowrapso long labels stay on a single line instead of wrapping and breaking the row.Stories / docs
WithLongLabel,WithIcon, and an RTL CSS canary (asserts the separator chevron mirror + caret rotation underdir="rtl").Type of Change
Test Scenarios
References
WEB-8151