Skip to content

Add Modal variant with declarative buttons to PRC SelectPanel #5883

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

Merged
merged 27 commits into from
Apr 16, 2025

Conversation

hectahertz
Copy link
Contributor

@hectahertz hectahertz commented Apr 5, 2025

Note

This is a remake of #5817 to expedite merging to main.

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

Changelog

New

Adds the modal variant to SelectPanel, complete with Radio icons.

Single select modal

Screen.Recording.2025-04-06.at.18.21.19.mov

Multi select modal

Screen.Recording.2025-04-06.at.18.23.07.mov

See #5817 for all the context.

Shortcut

We are still using AnchoredOverlay underneath. But, for variant=modal, we override its position by directly passing top, left, etc. to overlayProps going down to the Overlay

The ideal super clean solution would have been to refactor SelectPanel and conditionally use useAnchoredPosition instead of AnchoredOverlay for variant=anchored. Something @siddharthkp attempted in #5230 earlier but had to revert.

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

@hectahertz hectahertz requested a review from a team as a code owner April 5, 2025 17:07
@hectahertz hectahertz requested a review from TylerJDev April 5, 2025 17:07
Copy link

changeset-bot bot commented Apr 5, 2025

🦋 Changeset detected

Latest commit: 738cb3c

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

@hectahertz hectahertz mentioned this pull request Apr 5, 2025
13 tasks
Copy link
Contributor

github-actions bot commented Apr 5, 2025

👋 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!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Apr 5, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 5, 2025 17:16 Abandoned
@hectahertz hectahertz force-pushed the hectahertz/selectpanel-modal branch from 500510a to 94ed190 Compare April 5, 2025 17:16
@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 5, 2025 17:19 Abandoned
@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 5, 2025 17:25 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 5, 2025 17:39 Inactive
@hectahertz
Copy link
Contributor Author

hectahertz commented Apr 6, 2025

@francinelucca All comments from #5817 have been addressed here, can I please have a review?

@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 6, 2025 15:15 Abandoned
@primer primer bot requested a review from a team as a code owner April 6, 2025 15:24
@primer primer bot requested a review from tbenning April 6, 2025 15:24
@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 6, 2025 15:28 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 6, 2025 15:37 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 6, 2025 15:51 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 6, 2025 16:26 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 6, 2025 16:40 Inactive
@francinelucca francinelucca requested a review from emilybrick April 7, 2025 16:33
@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 7, 2025 16:46 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 16, 2025 21:06 Abandoned
@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Apr 16, 2025
@primer-integration
Copy link

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

@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed update snapshots labels Apr 16, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 16, 2025 21:20 Inactive
@primer-integration
Copy link

🟢 golden-jobs completed with status success.

@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Apr 16, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-5883 April 16, 2025 21:34 Inactive
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Apr 16, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Apr 16, 2025
Copy link
Contributor

👋 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!

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

@github-actions github-actions bot requested a deployment to storybook-preview-5883 April 16, 2025 21:48 Abandoned
@francinelucca francinelucca added this pull request to the merge queue Apr 16, 2025
Merged via the queue into main with commit 703b69d Apr 16, 2025
44 checks passed
@francinelucca francinelucca deleted the hectahertz/selectpanel-modal branch April 16, 2025 22:20
@primer primer bot mentioned this pull request Apr 16, 2025
hectahertz added a commit that referenced this pull request May 20, 2025
Co-authored-by: Marie Lucca <francinelucca@github.com>
Co-authored-by: Marie Lucca <40550942+francinelucca@users.noreply.github.com>
Co-authored-by: hectahertz <24622853+hectahertz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants