Skip to content
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

Add support for controlling which side ActionMenu renders on (via a side prop on ActionMenu.Overlay) #3714

Merged
merged 7 commits into from
Sep 11, 2023

Conversation

iansan5653
Copy link
Contributor

@iansan5653 iansan5653 commented Sep 6, 2023

Adds a side prop to ActionMenu.Overlay so the consumer can control which side of the anchor the ActionMenu renders on. This prop is forwarded verbatim to ` Also adds a story and updates docs.

Closes #3712

Screenshots

screenshot of action menu appearing on right-hand side of anchor button

Merge checklist

@iansan5653 iansan5653 self-assigned this Sep 6, 2023
@changeset-bot
Copy link

changeset-bot bot commented Sep 6, 2023

🦋 Changeset detected

Latest commit: 23f7889

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 Minor

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
Copy link
Contributor

github-actions bot commented Sep 6, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 100.69 KB (+0.01% 🔺)
dist/browser.umd.js 101.27 KB (+0.01% 🔺)

@iansan5653 iansan5653 temporarily deployed to github-pages September 6, 2023 14:40 — with GitHub Actions Inactive
@iansan5653 iansan5653 marked this pull request as ready for review September 6, 2023 14:40
@iansan5653 iansan5653 requested review from a team and josepmartins September 6, 2023 14:40
@github-actions github-actions bot temporarily deployed to storybook-preview-3714 September 6, 2023 14:40 Inactive
Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

Looks good! Perfect use case for the prop.

Not blocking: Can we also add a story with nested menus to keep in examples of the ideal use case?

@iansan5653
Copy link
Contributor Author

Can we also add a story with nested menus to keep in examples of the ideal use case?

Unfortunately the nested menu case requires a bit more wiring up than that because of keyboard navigation & roles. We are internally working on a NestedActionMenu component which I think we should probably eventually upstream to Primer.

@iansan5653 iansan5653 temporarily deployed to github-pages September 7, 2023 20:27 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3714 September 7, 2023 20:28 Inactive
Base automatically changed from cleanup-actionmenu to main September 7, 2023 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support controlling ActionMenu position (anchor side)
2 participants