feat(dialog): Alert, Prompt, Custom Component dialogs via DialogService#207
Open
mathewtaylor wants to merge 18 commits intodevelopfrom
Open
feat(dialog): Alert, Prompt, Custom Component dialogs via DialogService#207mathewtaylor wants to merge 18 commits intodevelopfrom
mathewtaylor wants to merge 18 commits intodevelopfrom
Conversation
Introduced a typed and flexible dialog infrastructure: * Added new base classes (`DialogData`, `DialogData<TResult>`) to support asynchronous and strongly-typed dialog results. * Implemented Alert, Prompt, and custom Component dialogs, including their respective option classes and dedicated Razor components. * Updated `DialogService` to manage a generic dialog collection and expose new methods for alert, prompt, and custom dialogs. * Refactored dialog resolution to a generic `Resolve<TResult>` pattern with centralized closing logic and improved backdrop handling. * Introduced `DialogOptions`, `DialogOpenOptions`, the `DialogSize` enum, and the `DialogResult` type. * Added a reusable `DialogHeader` component for standardized dialog headers. * Improved overall extensibility and reusability of the dialog system.
… 'Async' suffix on tasks
…ing to 'IDialogReference'
…er angry on this docs
…, and fix review issues
- BbDialogProvider: reuse Primitives escape-keydown.js stack for proper
Escape handling (respects PreventClose, blocks AlertDialog dismiss)
- BbDialogProvider: add focus trap via IFocusManager and scroll lock via
portal.js lockBodyScroll when dialogs are active
- BbDialogProvider: wire up DialogSize from ComponentDialogData.Options
to dynamic container classes (was dead code in ComponentDialog)
- BbDialogProvider: implement IAsyncDisposable, properly dispose JS
module references (portalModule, escapeModule)
- BbDialogProvider: use correct ARIA role (alertdialog for Alert/Confirm,
dialog for Prompt/Component)
- ComponentDialog: remove dead GetWidth() method
- DialogService: fix XML docs on obsolete Confirm() method
- DialogOptions: fix ConfirmText XML doc default value ("OK" not "Continue")
- DialogDemo: add View Code sections for Form, Nested, Non-Dismissible demos
- DialogDemo: add selected-value labels to nested dropdown controls demo
- DialogDemo: add comprehensive API reference for all dialog sub-components,
DialogService methods, option types, and IDialogReference
- Update API surface snapshot
10 tasks
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.
Summary
DialogService.AlertAsync(),PromptAsync(), andOpenAsync<TComponent>()alongside the existingConfirmAsync()BbDialogProvidernow supports escape key handling (via Primitivesescape-keydown.jsstack), focus trap, scroll lock, and dynamic sizing for component dialogsIAsyncDisposablecleanup of all JS interop referencesalertdialogfor Alert/Confirm,dialogfor Prompt/Component)DialogSizeenum wired up to container classes (was dead code)Confirm()andDialogOptions.ConfirmTextDialogServicemethods, option types, andIDialogReferenceBased on PR #184 by @Denny09310 with review fixes applied.
Test plan