-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
feat(Html2Pdf): add disable web security config #4957
Conversation
Co-Authored-By: 王雪飞 <909149916@qq.com>
# Conflicts: # src/BootstrapBlazor/BootstrapBlazor.csproj Co-Authored-By: 王雪飞 <909149916@qq.com>
Reviewer's Guide by SourceryThis PR adds a configuration option to disable web security in the Html2Pdf component, addressing issue #4956. This is achieved by adding a new parameter to the Html2Pdf component and updating the underlying implementation to use the new parameter. The change also includes updates to the project files and CSS stylesheets. Sequence diagram for ExportPdfButton click handling with updated stylessequenceDiagram
participant User as User
participant Button as ExportPdfButton
participant Nav as NavigationManager
participant Pdf as Html2PdfConverter
User->>Button: Click Export
activate Button
Button->>Nav: Get BaseUri
Nav-->>Button: Return BaseUri
Button->>Button: Build style list
Note over Button: Add FontAwesome CSS
Note over Button: Add Bootstrap Blazor CSS
Button->>Button: Add custom StyleTags
Button->>Pdf: Convert with styles
Pdf-->>Button: Return PDF
Button-->>User: Download PDF
deactivate Button
Class diagram for ExportPdfButton changesclassDiagram
class ExportPdfButton {
-List~string~ styles
+StyleTags: List~string~
#Task HandlerClick()
}
note for ExportPdfButton "Added FontAwesome CSS to default styles"
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.
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:
- Please update the PR title and description to reflect the actual changes (adding FontAwesome CSS support for PDF exports) rather than referring to web security configuration.
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 #4957 +/- ##
==========================================
Coverage 99.99% 100.00%
==========================================
Files 584 629 +45
Lines 25289 28096 +2807
Branches 3678 4035 +357
==========================================
+ Hits 25288 28096 +2808
+ Partials 1 0 -1 ☔ View full report in Codecov by Sentry. |
add disable web security config
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #4956
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add support for disabling web security in the HTML to PDF conversion feature.
Bug Fixes:
Enhancements: