-
-
Couldn't load subscription status.
- Fork 362
doc(MaskOption): update ZIndex documentation #6675
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 (collapsed on small PRs)Reviewer's GuideThis PR fixes #6674 by enhancing the MaskOption sample with ZIndex documentation: it injects an ignored inline section to display localized MaskNormalDesc in the demo and updates the English and Chinese locale files with the corresponding translation entries. 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.
Pull Request Overview
This PR adds documentation for the MaskOption parameters (ZIndex, Opacity, BackgroundColor) to help users understand the available configuration options for mask components.
- Adds localized description text for
MaskOptionparameters in both English and Chinese - Updates the Masks demo component to display the new documentation text
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BootstrapBlazor.Server/Locales/zh-CN.json | Adds Chinese localization for MaskOption parameters description |
| src/BootstrapBlazor.Server/Locales/en-US.json | Adds English localization for MaskOption parameters description |
| src/BootstrapBlazor.Server/Components/Samples/Masks.razor | Displays the new documentation text in the demo section |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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 there - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- Directly rendering localized HTML via MarkupString may introduce XSS risks. (link)
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor.Server/Components/Samples/Masks.razor:10` </location>
<code_context>
<DemoBlock Title="@Localizer["MaskNormalTitle"]" Introduction="@Localizer["MaskNormalIntro"]" Name="Normal">
+ <section ignore>
+ <div>@((MarkupString)Localizer["MaskNormalDesc"].Value)</div>
+ </section>
<button class="btn btn-primary" @onclick="@ShowMask">@Localizer["ShowMaskButtonText"]</button>
</code_context>
<issue_to_address>
Directly rendering localized HTML via MarkupString may introduce XSS risks.
Sanitize or validate all localized content before rendering as raw HTML to prevent XSS vulnerabilities.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| <DemoBlock Title="@Localizer["MaskNormalTitle"]" Introduction="@Localizer["MaskNormalIntro"]" Name="Normal"> | ||
| <section ignore> | ||
| <div>@((MarkupString)Localizer["MaskNormalDesc"].Value)</div> |
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.
🚨 issue (security): Directly rendering localized HTML via MarkupString may introduce XSS risks.
Sanitize or validate all localized content before rendering as raw HTML to prevent XSS vulnerabilities.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6675 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 739 739
Lines 31698 31698
Branches 4462 4462
=========================================
Hits 31698 31698
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 #6674
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Update MaskOption documentation to incorporate ZIndex details by extending the Razor demo with a hidden description block and refreshing locale strings.
Enhancements:
Documentation: