Skip to content

Conversation

@llastflowers
Copy link
Contributor

@llastflowers llastflowers commented Dec 18, 2025

Update SelectPanel Multi Select Modal story to not update labels unless user saves changes in modal

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

Changelog

Changed

Changes made in SelectPanel Multi Select Modal variant are now no longer reflected in the background via labels until user saves changes in the modal. Canceling or clicking outside the modal will also discard any unsaved changes.

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

Copilot AI review requested due to automatic review settings December 18, 2025 19:34
@llastflowers llastflowers requested a review from a team as a code owner December 18, 2025 19:34
@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: e5f2b35

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 requested a deployment to storybook-preview-7354 December 18, 2025 19:38 Abandoned
Copy link
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 updates the MultiSelectModal story to implement deferred save behavior, where changes made within the modal are not reflected in the button label until the user explicitly clicks the Save button. Canceling or clicking outside the modal discards any unsaved changes.

Key Changes

  • Added savedSelection state to track the committed/saved selection separately from the working selected state
  • Updated button text to display savedSelection instead of the current selected items, preventing real-time updates while the modal is open
  • Enhanced onOpenChange handler to only update savedSelection when the modal closes with gesture type 'selection' (Save button clicked)

@llastflowers llastflowers added the integration-tests: skipped manually Changes in this PR do not require an integration test label Dec 18, 2025
@llastflowers
Copy link
Contributor Author

Integration tests skipped; Storybook-only changes in this PR

Copy link
Contributor

@liuliu-dev liuliu-dev left a comment

Choose a reason for hiding this comment

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

❤️

@llastflowers llastflowers added this pull request to the merge queue Dec 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 23, 2025
@llastflowers llastflowers added this pull request to the merge queue Dec 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 23, 2025
@llastflowers llastflowers added this pull request to the merge queue Dec 23, 2025
Merged via the queue into main with commit efbebdf Dec 23, 2025
56 checks passed
@llastflowers llastflowers deleted the llastflowers/6131/selectpanel-story-update branch December 23, 2025 18:42
@primer primer bot mentioned this pull request Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants