-
Notifications
You must be signed in to change notification settings - Fork 614
chore(ActionMenu): Add fullscreen capabilities #6108
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8c24cf1 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 📦
|
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.
Pull Request Overview
This patch introduces a new fullscreen
variant for the ActionMenu
component and adds a sample Storybook story demonstrating fullscreen behavior in narrow viewports.
- Exposes the underlying
AnchoredOverlay
variant
prop onActionMenu.Overlay
with a default value - Defines a
FullScreen
example story showing how to toggle between anchored and fullscreen variants - Updates the changelog for a patch release
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/react/src/ActionMenu/ActionMenu.tsx | Added variant to MenuOverlayProps , set default variant |
packages/react/src/ActionMenu/ActionMenu.examples.stories.tsx | Added FullScreen story showcasing the new fullscreen variant |
.changeset/pink-trees-work.md | Bumped patch release and updated changelog entry |
Comments suppressed due to low confidence (2)
packages/react/src/ActionMenu/ActionMenu.examples.stories.tsx:111
- Consider adding automated tests (unit, snapshot, or visual regression) for the new fullscreen variant to ensure it renders correctly across viewports and prevent regressions.
export const FullScreen = () => {
packages/react/src/ActionMenu/ActionMenu.examples.stories.tsx:127
- [nitpick] Multiple list items share the label 'Option 2', which may confuse readers. Consider using unique labels (e.g., 'Option 3', 'Option 4') to clearly demonstrate multiple entries.
<ActionList.Item>Option 2</ActionList.Item>
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/379309 |
🟢 golden-jobs completed with status |
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.
These changes look good, but we should definitely add a "Close" button.
There are two ways we can do this:
- (preferred) when
variant
is'fullscreen'
, automatically render<IconButton icon={XIcon} onClick={onClose} aria-label="Close" />
at the top right of the<AnchoredOverlay>
we use in<ActionMenu.Overlay>
- Update the Storybook example to render
<IconButton icon={XIcon} onClick={onClose} aria-label="Close" />
as a child of<ActionMenu.Overlay>
…menu-full-screen-story
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Co-authored-by: Tyler Jones <[email protected]>
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
…primer/react into chore/add-action-menu-full-screen-story
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Closes https://github.com/github/primer/issues/5155
This pull request introduces a new fullscreen variant for the
ActionMenu
component, along with related updates to improve responsiveness and user experience. Key changes include adding a fullscreen sample story, introducing a responsive close button for narrow viewports, and modifying the behavior of theActionMenu
andAnchoredOverlay
components to support the fullscreen variant.Changelog
New
variant
prop available in ActionMenu.OverlaydisplayCloseButton
prop to show a close button in fullscreen mode in AnchoredOverlay, along with customizablecloseButtonProps
.displayCloseButton
functionality to handle cancel and close actions in fullscreen mode.Rollout strategy
Testing & Reviewing
Merge checklist