-
Notifications
You must be signed in to change notification settings - Fork 626
Breadcrumbs : Add overflow menu for responsive behavior #6664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2854259 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
…m/primer/react into pk/breadcrumbs-with-overflow-menu
…m/primer/react into pk/breadcrumbs-with-overflow-menu
…m/primer/react into pk/breadcrumbs-with-overflow-menu
Summary of changes since last review
Advice needed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is purely a CSS review! Will take a closer look at behavior next.
} | ||
|
||
.MenuOverlay { | ||
position: absolute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have an offset between the trigger and the menu, but I'm not sure how you want to implement that with this custom overlay. The variable for this is var(--overlay-offset)
which is 4px, so you might need to use a calc
to achieve that.
<BoxWithFallback as="nav" className={clsx(className, classes.BreadcrumbsBase)} aria-label="Breadcrumbs" sx={sxProp}> | ||
<BreadcrumbsList>{wrappedChildren}</BreadcrumbsList> | ||
</BoxWithFallback> | ||
) | ||
} | ||
|
||
const ItemSeparator = () => { | ||
return ( | ||
<span className={classes.ItemSeparator}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need some labeling on this for a11y support (just a hunch, would look it up)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not focusable. I'm not sure if the label is required. What would you expect in the label?
cc - @janmaarten-a11y
Closes #https://github.com/github/primer/issues/5122
Changelog
Breadcrumbs now show an overflow menu with the following features
overflow==="menu-with-root"
show the root item.https://www.loom.com/share/8902798416b741c9959fc7bb501185a5
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist