-
Notifications
You must be signed in to change notification settings - Fork 545
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
ActionBar: Ensure overflow menu only exists if there is no space #5476
Conversation
🦋 Changeset detectedLatest commit: ea548fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 📦
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/356310 |
🔴 golden-jobs completed with status |
ca815b8
to
7600df6
Compare
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.
🚀
@@ -160,6 +161,9 @@ const overflowEffect = ( | |||
} | |||
|
|||
updateListAndMenu({items, menuItems}) | |||
} else if (numberOfItemsPossible >= childArray.length && hasActiveMenu) { |
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.
nit: the '=' part of this condition(I think) never happens because of the equality check on L139
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.
Thank you! the less code the better 😂
Closes https://github.com/github/primer/issues/4584
Ensures that the "overflow" menu in ActionBar only appears when there is no space for all items. Also ensures that the overflow menu is present if there is no space for all items on initial render.
Fixed behavior:
Screen.Recording.2024-12-23.at.7.36.19.PM.mov
Video description
Video showing ActionBar at different resize points. When the small screen size is shown, the overflow menu in ActionBar appears. When at a medium screen size, the overflow menu is hidden and all menu items are present.
Changelog
Changed
Rollout strategy
Testing & Reviewing
Merge checklist