-
-
Notifications
You must be signed in to change notification settings - Fork 362
feat(CheckboxList): add outline style #6538
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 GuideIntroduce an outline variant for CheckboxList buttons by updating SCSS styles, refactoring CSS class generation, adjusting component markup, and enhancing the sample to demonstrate the new style. 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:
- There’s a stray BOM/non-printable character at the top of CheckboxList.razor.scss—remove it to avoid encoding/build issues.
- Currently the SCSS only defines
.btn-outline-info; consider generating the outline style for allbtn-outline-{color}variants (e.g. via Bootstrap mixins) instead of hard-coding info. - The sample update adds ShowLabel/DisplayText props but this PR doesn’t include their implementation in CheckboxList—either implement support for those props or remove them from the sample.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There’s a stray BOM/non-printable character at the top of CheckboxList.razor.scss—remove it to avoid encoding/build issues.
- Currently the SCSS only defines `.btn-outline-info`; consider generating the outline style for all `btn-outline-{color}` variants (e.g. via Bootstrap mixins) instead of hard-coding info.
- The sample update adds ShowLabel/DisplayText props but this PR doesn’t include their implementation in CheckboxList—either implement support for those props or remove them from the sample.
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.scss:66` </location>
<code_context>
}
}
+
+ .btn-outline-info {
+ --bs-btn-active-color: #fff;
+ }
}
</code_context>
<issue_to_address>
Hardcoding active color for .btn-outline-info may reduce theme flexibility.
Consider parameterizing --bs-btn-active-color or using a more generic approach to maintain compatibility with different themes and future color variants.
Suggested implementation:
```
.btn-outline-info {
--bs-btn-active-color: var(--bs-btn-info-active-color, #fff);
}
```
To fully support this, you should define `--bs-btn-info-active-color` in your global theme or root CSS, so it can be easily customized for different themes. For example, in your root CSS or theme file:
:root {
--bs-btn-info-active-color: #fff; // or your preferred default
}
This allows you to change the active color for `.btn-outline-info` in one place, maintaining theme flexibility.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6538 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 714 714
Lines 31395 31396 +1
Branches 4432 4432
=========================================
+ Hits 31395 31396 +1
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 #6537
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Apply outline style to CheckboxList items by using btn-outline-{color} classes and adjust CSS variables for disabled and info outline variants; update sample to demonstrate label and display text
New Features:
Enhancements: