Support isBusy for Dialog and CommandDialog#21
Merged
Conversation
Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add isBusy support for Dialog component
Support isBusy for Dialog and CommandDialog
Mar 3, 2026
Contributor
|
@copilot Add Storybook stories for both components, the CommandDialog should then just have a Command that overrides the execute method and adds a delay - just to show how it works. Also update documentation and write specs for this functionality. |
Co-authored-by: einari <134365+einari@users.noreply.github.com>
Contributor
Author
Done in commit a0e0139. Here's what was added: Storybook stories:
Specs:
Documentation:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a busy state to
Dialogthat disables all buttons and shows a loading spinner on the primary action button.CommandDialogautomatically manages this state during command execution.Added
isBusy?: booleanprop onDialog— whentrue, disables all footer buttons and renders a loading spinner on the primary (Ok/Yes) button via PrimeReact'sButton.loadingisBusymanagement inCommandDialog: set totruebefore command execution, reset tofalsein afinallyblock to ensure cleanup even on errorIsBusyStorybook story forDialogdemonstrating a 3-second simulated save with spinner and disabled buttonsWithBusyStateStorybook story forCommandDialogusingDemoSlowUpdateUserCommand(overridesexecute()with a 2-second delay) to show the automatic busy state in actionfor_Dialog/when_rendered_with_is_busyverifying all buttons are disabled whenisBusy=truefor_CommandDialog/when_not_executingverifying the dialog is not in a busy state on initial renderisBusyprop inDocumentation/Dialogs/dialog.mdand a new Busy State section inDocumentation/CommandDialog/index.mdOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.