-
Notifications
You must be signed in to change notification settings - Fork 626
Add support for loading
footer buttons in ConfirmationDialog
#6592
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
Conversation
🦋 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.
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
andconfirmButtonLoading
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.
/** | ||
* 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.
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!
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 inDialog
. Plus some tests 😄Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist