Skip to content

Conversation

@pwelter34
Copy link
Member

No description provided.

@pwelter34 pwelter34 requested a review from Copilot October 14, 2025 17:54
Copy link

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 PR introduces a comprehensive modal dialog system for Blazor applications using native HTML <dialog> elements with JavaScript interop. The implementation provides a service-based approach for displaying common modal types (alert, confirm, prompt) with customizable styling variants.

  • Adds a complete modal dialog framework with JavaScript interop for HTML <dialog> management
  • Implements service layer with extension methods for common modal patterns (Alert, Confirm, Prompt)
  • Provides comprehensive CSS styling with multiple visual variants (Primary, Information, Success, Warning, Danger)

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dialog.js JavaScript module for managing HTMLDialogElement interactions
modal-dialog.css Complete CSS styling system with variants and animations
BlazorControls.css Imports the new modal dialog CSS
ServiceCollectionExtensions.cs Adds modal service registration
ModalVariant.cs Enum defining visual variants for modals
ModalServiceExtensions.cs Extension methods for common modal operations
ModalService.cs Core service for displaying modal dialogs
ModalResult.cs Result structure for modal operations
ModalReference.cs Reference class managing modal lifecycle
ModalDialog.razor/.cs Component rendering individual modal dialogs
ModalContainer.razor/.cs Container component managing active modals
ModalComponentBase.cs Base class for modal components
Message classes Records for modal show/close messaging
IModalReference.cs Interface for modal references
Common modal components Alert, Confirm, and Prompt modal implementations
Sample files Demo page and navigation updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +34 to +35
if (value === '--closed--')
return;
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

The magic string '--closed--' should be defined as a constant to improve maintainability and reduce the risk of typos.

Copilot uses AI. Check for mistakes.
Comment on lines 276 to 279

&[open] {
animation: dialog-open 300ms forwards;
}
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

The CSS nesting syntax using '&' may not be supported in all browsers. Consider using standard CSS selectors for better compatibility.

Suggested change
&[open] {
animation: dialog-open 300ms forwards;
}
}
dialog[open] {
animation: dialog-open 300ms forwards;

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,9 @@

Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove the empty line at the beginning of the file for consistency with other files in the codebase.

Suggested change

Copilot uses AI. Check for mistakes.
@pwelter34 pwelter34 merged commit f59ebd4 into master Oct 15, 2025
5 checks passed
@pwelter34 pwelter34 deleted the feature/modal branch October 15, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants