-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(ShieldBadge): add ShieldBadge component #5804
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 the new No diagrams generated as the changes look simple and do not need a visual representation. 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.
Copilot reviewed 7 out of 13 changed files in this pull request and generated no comments.
Files not reviewed (6)
- src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.css: Language not supported
- src/BootstrapBlazor.Server/Locales/en-US.json: Language not supported
- src/BootstrapBlazor.Server/Locales/zh-CN.json: Language not supported
- src/BootstrapBlazor.Server/docs.json: Language not supported
- src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.scss: Language not supported
- src/BootstrapBlazor/wwwroot/scss/components.scss: Language not supported
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 default Icon value to the ShieldBadge component to improve its usability out-of-the-box.
- The ShieldBadge component's SCSS file should include comments to explain the purpose of each style.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 2 issues found
- 🟢 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 #5804 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 658 660 +2
Lines 30079 30111 +32
Branches 4247 4250 +3
=========================================
+ Hits 30079 30111 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #5803
Summary By Copilot
This pull request introduces the new
ShieldBadgecomponent, updates related documentation and localization files, and includes new unit tests. The most important changes are summarized below.New Component Addition:
src/BootstrapBlazor/Components/Badge/ShieldBadge.razor: Added the newShieldBadgecomponent.src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs: Implemented theShieldBadgecomponent with various parameters such asIcon,Label,Text,Radius, and their respective color properties.src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.scss: Added styling for theShieldBadgecomponent.Documentation and Localization Updates:
src/BootstrapBlazor.Server/Components/Samples/ShieldBadges.razor: Added a sample page for theShieldBadgecomponent.src/BootstrapBlazor.Server/Components/Samples/ShieldBadges.razor.cs: Added the code-behind for theShieldBadgessample page.src/BootstrapBlazor.Server/Locales/en-US.json: Added English localization entries for theShieldBadgecomponent. [1] [2]src/BootstrapBlazor.Server/Locales/zh-CN.json: Added Chinese localization entries for theShieldBadgecomponent. [1] [2]src/BootstrapBlazor.Server/docs.json: Updated documentation index to include theShieldBadgecomponent.Unit Tests:
test/UnitTest/Components/ShieldBadgeTest.cs: Added unit tests for theShieldBadgecomponent to verify its functionality and parameter handling.Minor Changes:
src/BootstrapBlazor.Server/Components/Components/DemoBlock.razor.css: Adjusted the width of the.pre-codeclass in the.card-footer-codesection.src/BootstrapBlazor/Components/Badge/Badge.razor.cs: Updated theBadgecomponent to improve code readability and documentation comments.src/BootstrapBlazor/wwwroot/scss/components.scss: Included theShieldBadgeSCSS file in the main components SCSS file. [1] [2]src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs: Added a menu item for theShieldBadgesample page.Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a new ShieldBadge component to the BootstrapBlazor library, providing a flexible and customizable badge with icon, label, and text sections
New Features:
Enhancements:
Documentation:
Tests:
Chores: