feat(Watermark): remove EditorRequired attribute#7776
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideWatermark component ChildContent parameter no longer enforces the EditorRequired attribute, making the slot optional at compile-time while keeping runtime behavior unchanged. Class diagram for updated Watermark component parameter requirementsclassDiagram
namespace BootstrapBlazor.Components {
class Watermark {
<<partial>>
+RenderFragment ChildContent
}
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Now that
ChildContentis no longerEditorRequired, consider whether the component should handle anullChildContentexplicitly (e.g., default content or a guard) to avoid unexpected runtime behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `ChildContent` is no longer `EditorRequired`, consider whether the component should handle a `null` `ChildContent` explicitly (e.g., default content or a guard) to avoid unexpected runtime behavior.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
Removes the [EditorRequired] constraint from the Watermark component’s ChildContent parameter, aligning the API with the component’s existing runtime behavior (e.g., IsPage forbids ChildContent).
Changes:
- Removed
[EditorRequired]fromWatermark.ChildContent. - Normalized the
Watermark.razorfile header line (removes BOM/leading whitespace on@namespace).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs | Drops [EditorRequired] from ChildContent to avoid forcing content where it may be invalid (IsPage). |
| src/BootstrapBlazor/Components/Watermark/Watermark.razor | Normalizes the @namespace line formatting/encoding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7776 +/- ##
=======================================
Coverage 99.99% 99.99%
=======================================
Files 764 764
Lines 33953 33953
Branches 4673 4673
=======================================
Hits 33951 33951
Misses 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #7775
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhancements: