-
Notifications
You must be signed in to change notification settings - Fork 661
fix(Breadcrumbs): Do not show overflow menu when breadcrumb has only two items #7797
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@primer/react': patch | ||
| --- | ||
|
|
||
| Breadcrumbs overflow menu no longer appears when there are only two crumb items. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,3 +76,21 @@ export const SpaciousVariantWithOverflowWrap = () => ( | |
| </Breadcrumbs.Item> | ||
| </Breadcrumbs> | ||
| ) | ||
|
|
||
| export const TwoItemsWithOverflowMenu = () => ( | ||
| <Breadcrumbs overflow="menu"> | ||
| <Breadcrumbs.Item href="#">Home</Breadcrumbs.Item> | ||
| <Breadcrumbs.Item href="#" selected> | ||
| Current Page | ||
| </Breadcrumbs.Item> | ||
| </Breadcrumbs> | ||
| ) | ||
|
|
||
| export const TwoItemsWithOverflowMenuWithRoot = () => ( | ||
| <Breadcrumbs overflow="menu-with-root"> | ||
| <Breadcrumbs.Item href="#">Home</Breadcrumbs.Item> | ||
| <Breadcrumbs.Item href="#" selected> | ||
| Current Page | ||
| </Breadcrumbs.Item> | ||
| </Breadcrumbs> | ||
| ) | ||
|
Comment on lines
+80
to
+96
|
||
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.
Test/screenshot naming here suggests an overflow menu should be present ("Two Items With Overflow Menu" / "TwoItemsOverflowMenu"), but the intended behavior is that no overflow menu renders for two items. Renaming the describe block and screenshot baselines to match the expected UI would make the VRT coverage easier to understand and maintain.