Add support for loading footer buttons in ConfirmationDialog#6592
Add support for loading footer buttons in ConfirmationDialog#6592hectahertz merged 6 commits intomainfrom
loading footer buttons in ConfirmationDialog#6592Conversation
🦋 Changeset detectedLatest commit: 5bc1285 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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.
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
cancelButtonLoadingandconfirmButtonLoadingprops 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.
| /** | ||
| * 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 | ||
|
|
There was a problem hiding this comment.
We should group these props in an object for each button, let's merge this for now!
Closes https://github.com/github/primer/issues/5632
Changelog
New
Passes
loadingfunctionality to ConfirmationDialog, and also adds a story showing how to do this inDialog. Plus some tests 😄Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist