Skip to content

Conversation

langermank
Copy link
Contributor

@langermank langermank commented Aug 12, 2025

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

Changelog

New

Passes loading functionality to ConfirmationDialog, and also adds a story showing how to do this in Dialog. Plus some tests 😄

Changed

Removed

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

Copy link

changeset-bot bot commented Aug 12, 2025

🦋 Changeset detected

Latest commit: 5bc1285

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@primer/react Patch
@primer/mcp Patch
@primer/styled-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

Copy link
Contributor

👋 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 Aug 12, 2025
Copy link
Contributor

github-actions bot commented Aug 12, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.28 KB (+0.1% 🔺)
packages/react/dist/browser.umd.js 90.45 KB (-0.01% 🔽)

@github-actions github-actions bot requested a deployment to storybook-preview-6592 August 12, 2025 23:04 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6592 August 12, 2025 23:14 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6592 August 14, 2025 00:11 Inactive
@langermank langermank marked this pull request as ready for review August 15, 2025 00:31
@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 00:31
@langermank langermank requested a review from a team as a code owner August 15, 2025 00:31
@langermank langermank requested a review from jonrohan August 15, 2025 00:31
Copy link
Contributor

@Copilot 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 pull request adds support for loading states to footer buttons in the ConfirmationDialog component. The enhancement allows developers to display loading spinners and disable button interactions during asynchronous operations.

Key changes:

  • Added cancelButtonLoading and confirmButtonLoading props to ConfirmationDialog
  • Enhanced Dialog component to properly handle loading states in footer buttons
  • Added comprehensive test coverage for loading state behaviors

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/react/src/ConfirmationDialog/ConfirmationDialog.tsx Added loading props and passed them to footer button configurations
packages/react/src/ConfirmationDialog/ConfirmationDialog.test.tsx Added comprehensive test suite for loading state behaviors
packages/react/src/ConfirmationDialog/ConfirmationDialog.features.stories.tsx Added interactive story demonstrating loading states
packages/react/src/Dialog/Dialog.test.tsx Added test coverage for loading functionality in Dialog footer buttons
packages/react/src/Dialog/Dialog.features.stories.tsx Added stories showcasing loading states in Dialog components
.changeset/big-oranges-marry.md Added changeset entry for patch release

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment on lines +44 to +53
/**
* Whether the cancel button is in a loading state. Default: false.
*/
cancelButtonLoading?: boolean

/**
* Whether the confirm button is in a loading state. Default: false.
*/
confirmButtonLoading?: boolean

Copy link
Contributor

@hectahertz hectahertz Aug 15, 2025

Choose a reason for hiding this comment

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

We should group these props in an object for each button, let's merge this for now!

Merged via the queue into main with commit bdac258 Aug 15, 2025
62 of 64 checks passed
@hectahertz hectahertz deleted the dialog-footer-button-loading branch August 15, 2025 15:18
@primer primer bot mentioned this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants