Skip to content

update SelectPanel Multi Select Modal story - #7354

Merged
llastflowers merged 4 commits into
mainfrom
llastflowers/6131/selectpanel-story-update
Dec 23, 2025
Merged

update SelectPanel Multi Select Modal story#7354
llastflowers merged 4 commits into
mainfrom
llastflowers/6131/selectpanel-story-update

Conversation

@llastflowers

@llastflowersllastflowers commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

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

Closeshttps://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

CopilotAI review requested due to automatic review settings December 18, 2025 19:34
@llastflowers
llastflowers requested a review from a team as a code ownerDecember 18, 2025 19:34
@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactPatch

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-actionsBot requested a deployment to storybook-preview-7354 December 18, 2025 19:38 Abandoned

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@llastflowersllastflowers added the integration-tests: skipped manually Changes in this PR do not require an integration test label Dec 18, 2025
@llastflowers

Copy link
Copy Markdown
ContributorAuthor

Integration tests skipped; Storybook-only changes in this PR

@liuliu-devliuliu-dev left a comment

Copy link
Copy Markdown
Contributor

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 queueDec 23, 2025
@github-merge-queue
github-merge-queueBot 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 queueDec 23, 2025
@github-merge-queue
github-merge-queueBot 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 queueDec 23, 2025
Merged via the queue into main with commit efbebdfDec 23, 2025
56 checks passed
@llastflowers
llastflowers deleted the llastflowers/6131/selectpanel-story-update branch December 23, 2025 18:42
@primerprimerBot mentioned this pull request Dec 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@llastflowers@jonrohan@liuliu-dev