-
-
Notifications
You must be signed in to change notification settings - Fork 331
feat(Watermark): add IsPage parameter #5793
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
Reviewer's Guide by SourceryThis pull request introduces a new Sequence diagram for creating a Watermark with IsPage=truesequenceDiagram
participant RazorComponent as Watermark Component
participant JavaScript as Watermark.razor.js
participant DOM as Document
RazorComponent->>JavaScript: Invoke createWatermark(options)
JavaScript->>JavaScript: Apply default options
JavaScript->>JavaScript: Create watermark div
alt IsPage is true
JavaScript->>DOM: document.body.appendChild(div)
else IsPage is false
JavaScript->>DOM: el.appendChild(div)
end
JavaScript->>JavaScript: requestAnimationFrame(monitor)
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a sample to the demo to showcase the new
IsPage
parameter. - The exception message in
Watermark.razor.cs
could be more user-friendly, perhaps suggesting an alternative approach whenIsPage
is true.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5793 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 658 658
Lines 30056 30062 +6
Branches 4243 4244 +1
=========================================
+ Hits 30056 30062 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #5792
Summary By Copilot
This pull request introduces several enhancements and bug fixes to the
Watermark
component in theBootstrapBlazor
project. The main changes include adding support for a full-page watermark, updating localization files, and refining the JavaScript and CSS for better handling of watermark properties.Enhancements to the
Watermark
component:IsPage
parameter to theWatermark
component to support full-page watermarks. This includes updates to theOnParametersSet
andOnAfterRenderAsync
methods to handle the new parameter. [1] [2] [3]Watermark.razor.cs
file to throw anInvalidOperationException
ifIsPage
is true andChildContent
is set.Localization updates:
WatermarkDescription
to bothen-US.json
andzh-CN.json
files to describe how to add a watermark globally. [1] [2]JavaScript and CSS refinements:
createWatermark
function inWatermark.razor.js
to handle thezIndex
property and support full-page watermarks. [1] [2] [3] [4]Watermark.razor.scss
file to add styles for theis-page
class, ensuring full-page watermarks are positioned correctly.Testing improvements:
WatermarkTest.cs
file to include tests for the newIsPage
parameter, ensuring proper exception handling and rendering behavior.Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add support for full-page watermarks in the Watermark component by introducing an IsPage parameter and updating related JavaScript, CSS, and component logic.
New Features:
Enhancements:
Documentation:
Tests: