Skip to content

fix: ActionBar overflow menu not closing on select#7535

Merged
francinelucca merged 5 commits intomainfrom
fix/action-bar-overflow-menu-not-closing
Feb 12, 2026
Merged

fix: ActionBar overflow menu not closing on select#7535
francinelucca merged 5 commits intomainfrom
fix/action-bar-overflow-menu-not-closing

Conversation

@francinelucca
Copy link
Copy Markdown
Member

@francinelucca francinelucca commented Feb 12, 2026

Closes https://github.com/github/primer/issues/6382

Storybook improvements:

  • Modified the Task List icon button in ActionBar.stories.tsx to include an onClick handler that triggers an alert, making the story interactive and easier to test.

Changelog

Changed

  • Use onSelect for ActionBar's ActionMenu items instead of onClick so that the correct events bubble up and hide the menu upon selection.

Removed

  • Various lines of code that weren't doing anything // were unnecessary like useOnClickOutside and useOnEscapePress

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@francinelucca francinelucca requested a review from a team as a code owner February 12, 2026 19:41
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: 328274e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Feb 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the ActionBar's overflow menu (the "More items" kebab menu) does not close when an item is selected. The fix changes from using onClick to onSelect for ActionList.Item components within the overflow menu, which ensures proper event bubbling that triggers the menu's close behavior.

Changes:

  • Changed ActionList.Item event handler from onClick to onSelect in overflow menu items
  • Removed the eslint-disable comment for primer-react/prefer-action-list-item-onselect rule
  • Added an onClick handler demo in the Default story to verify onClick functionality still works

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/react/src/ActionBar/ActionBar.tsx Changed ActionList.Item to use onSelect instead of onClick for overflow menu items to fix menu closing behavior
packages/react/src/ActionBar/ActionBar.stories.tsx Added onClick handler example to demonstrate the functionality still works
package-lock.json Updated internal workspace version references from 38.10.0 to 38.11.0

@github-actions github-actions bot requested a deployment to storybook-preview-7535 February 12, 2026 20:34 Abandoned
@primer-integration
Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/13480

@primer-integration
Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@francinelucca francinelucca added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit d86c970 Feb 12, 2026
52 checks passed
@francinelucca francinelucca deleted the fix/action-bar-overflow-menu-not-closing branch February 12, 2026 21:27
@primer primer bot mentioned this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants