Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f75cb4d
Replace `ActionBar` overflow calculations with CSS wrapping approach
iansan5653 Mar 11, 2026
dda90da
Add CSS-based menu visibility
iansan5653 Mar 11, 2026
8f1f205
Add changeset
iansan5653 Mar 11, 2026
83b23e4
Merge branch 'main' into actionbar-css
francinelucca Mar 11, 2026
c0060f3
Set visibility:hidden on overflowing items
iansan5653 Mar 12, 2026
88c6e77
Merge branch 'actionbar-css' of https://github.com/primer/react into …
iansan5653 Mar 12, 2026
ef6c5ec
Add comment re overflow detection
iansan5653 Mar 12, 2026
f3ff80f
Change to use attribute presence instead of str value
iansan5653 Mar 12, 2026
fe98650
Fix items being hidden due to incorrect CSS selector
iansan5653 Mar 13, 2026
46269af
Fix last group overflowing
iansan5653 Mar 13, 2026
6c839cd
Don't show menu button if no valid items registered
iansan5653 Mar 13, 2026
357276a
Format
iansan5653 Mar 13, 2026
1dfff5b
Fix snapshot test
iansan5653 Mar 13, 2026
9b6aeca
Update another test
iansan5653 Mar 13, 2026
7127891
Fix focus zone configuration
iansan5653 Apr 2, 2026
23e7d5f
Use CSS instead of filtering
iansan5653 Apr 2, 2026
81446b2
Merge branch 'main' into actionbar-css
iansan5653 Apr 2, 2026
4c3ff6b
chore: auto-fix lint and formatting issues
iansan5653 Apr 2, 2026
3206cee
Fix selecting overflow button when no items are overflowing
iansan5653 Apr 2, 2026
9b350c1
Merge branch 'actionbar-css' of https://github.com/primer/react into …
iansan5653 Apr 2, 2026
a760177
Remove ocnsole log
iansan5653 Apr 2, 2026
88b089b
Actually fix the issue
iansan5653 Apr 2, 2026
5bc40ac
Fix overflow menu anchor size
iansan5653 Apr 3, 2026
c486d19
Fix focus issue
iansan5653 Apr 3, 2026
d533eb5
Remove text labels story
iansan5653 Apr 3, 2026
c06312d
Fix small size alignment issues
iansan5653 Apr 7, 2026
019bd12
Fix bug with returning focus to an overflowed item
iansan5653 Apr 7, 2026
73c6db3
Make focus zone strict: true
iansan5653 Apr 8, 2026
3811f44
Use `focusableElementFilter` with `overflowItems` as a dependency
iansan5653 Apr 21, 2026
ad6ddff
Merge branch 'main' into actionbar-css
iansan5653 Apr 21, 2026
30ea75a
Merge branch 'main' into actionbar-css
francinelucca Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/many-suns-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

Replace `ActionBar` overflow calculations with CSS wrapping approach to improve performance and stability
42 changes: 41 additions & 1 deletion packages/react/src/ActionBar/ActionBar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,28 @@
margin-bottom: -1px;
white-space: nowrap;
list-style: none;
align-items: center;
align-items: flex-start;
gap: var(--actionbar-gap, var(--stack-gap-condensed));
overflow: hidden;
height: var(--actionbar-height);
animation: detect-overflow linear;
animation-timeline: scroll(self block);
Comment thread
francinelucca marked this conversation as resolved.
Outdated

--actionbar-height: var(--control-small-size);
--morebutton-display: none;

&[data-has-overflow='true'] {
/* Progressive enhancement: show overflow button on browsers that don't support scroll-driven animations */
--morebutton-display: block;
}

&[data-size='medium'] {
--actionbar-height: var(--control-medium-size);
}

&[data-size='large'] {
--actionbar-height: var(--control-large-size);
}

/* Gap scale (mirrors Stack) */
&:where([data-gap='none']) {
Expand All @@ -25,6 +45,13 @@
}
}

@keyframes detect-overflow {
0%,
100% {
--morebutton-display: block;
}
}

.Nav {
display: flex;
padding-inline: var(--base-size-16);
Expand All @@ -44,10 +71,23 @@
content: '';
/* stylelint-disable-next-line primer/colors */
background: var(--borderColor-muted);
/* stylelint-disable-next-line primer/spacing */
margin-top: calc((var(--actionbar-height) - var(--base-size-20)) / 2);
}
}

.Group {
display: flex;
gap: inherit;
}

.OverflowContainer {
display: flex;
flex-wrap: wrap;
gap: inherit;
justify-content: flex-end;
}

.MoreButton {
display: var(--morebutton-display);
}
Loading
Loading