feat(PdfReader): support Watermark component#405
Merged
Conversation
|
Thanks for your PR, @densen2014. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Reviewer's Guide by SourceryThis pull request introduces a new feature to the PDF reader component that allows the watermark to be displayed only when the PDF is in fullscreen presentation mode. This is achieved by adding a new Sequence diagram for Watermark display in fullscreen modesequenceDiagram
participant User
participant PdfReader.razor.cs
participant limit.js
participant Browser
User->>PdfReader.razor.cs: Sets WatermarkDemoModeOnly to true and Watermark
PdfReader.razor.cs->>PdfReader.razor.cs: GenUrl()
PdfReader.razor.cs-->>Browser: Generates URL with wmonlydemo=true and wm=Watermark
Browser->>limit.js: Loads limit.js with URL parameters
limit.js->>Browser: Adds 'fullscreenchange' event listener
Browser->>User: User enters fullscreen mode
Browser->>limit.js: 'fullscreenchange' event triggered
limit.js->>limit.js: Checks if viewerContainer is in fullscreen
alt viewerContainer is in fullscreen
limit.js->>Browser: Sets watermark value
else viewerContainer is not in fullscreen
limit.js->>Browser: Clears watermark value
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @densen2014 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider debouncing the fullscreen event listener to avoid excessive updates to the watermark.
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.
ArgoZhang
approved these changes
Apr 19, 2025
ArgoZhang
approved these changes
Apr 29, 2025
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.
Link issues
fixes #418
Summary By Copilot
feat(PdfReader ): 全局水印(Watermark IsPage="true")未应用到演示模式中
dotnetcore/BootstrapBlazor#5811 (comment)
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhance PDF reader watermark functionality to support displaying watermark only during full-screen presentation mode
New Features:
Enhancements: