fix(RadioListGeneric): parameter ShowBorder not work#7743
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the border handling for list-style form controls so that the no-border behavior is applied via a shared .form-control.no-border style instead of being implemented specifically on CheckboxList, fixing RadioListGeneric’s ShowBorder parameter behavior. Flow diagram for ShowBorder parameter affecting border renderingflowchart LR
ShowBorder_param["Component parameter ShowBorder"] --> Decision_ShowBorder{ShowBorder is true?}
Decision_ShowBorder -- Yes --> ApplyBorderClass["Render with class form-control (no no-border)"]
Decision_ShowBorder -- No --> ApplyNoBorderClass["Render with classes form-control no-border"]
ApplyBorderClass --> CSS_FormControl["CSS .form-control default border styling"]
ApplyNoBorderClass --> CSS_FormControlNoBorder["CSS .form-control.no-border:not(.is-valid):not(.is-invalid)"]
CSS_FormControl --> RenderedBorder["Border is visible"]
CSS_FormControlNoBorder --> RenderedNoBorder["Border is transparent when not valid/invalid"]
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.
Hey - I've left some high level feedback:
- Moving the
.form-control.no-borderrule fromCheckboxListto the sharedBootstrapInputstylesheet now affects allform-control.no-borderelements globally; please double-check that this broader scope is intentional and won’t regress other components that relied on default borders.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Moving the `.form-control.no-border` rule from `CheckboxList` to the shared `BootstrapInput` stylesheet now affects all `form-control.no-border` elements globally; please double-check that this broader scope is intentional and won’t regress other components that relied on default borders.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 #7743 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 750 750
Lines 33269 33269
Branches 4612 4612
=========================================
Hits 33269 33269
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:
|
There was a problem hiding this comment.
Pull request overview
This PR targets issue #7742 where RadioListGeneric’s ShowBorder parameter had no effect (the component always showed a border), by introducing a shared CSS rule to make .form-control.no-border borderless.
Changes:
- Add a global
.form-control.no-borderstyle to make borders transparent whenno-borderis applied. - Remove the now-redundant
no-borderborder override fromCheckboxList.razor.scss. - Bump
BootstrapBlazorpackage version from10.4.0-beta02to10.4.0.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BootstrapBlazor/Components/Input/BootstrapInput.razor.scss | Adds shared .form-control.no-border rule used by Radio/Checkbox list components. |
| src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.scss | Removes component-specific no-border styling in favor of the new shared rule. |
| src/BootstrapBlazor/BootstrapBlazor.csproj | Updates package version (beta → stable). |
Comments suppressed due to low confidence (4)
src/BootstrapBlazor/BootstrapBlazor.csproj:5
BootstrapBlazor.csprojbumps the package version from10.4.0-beta02to10.4.0. This looks like a release/versioning change that’s unrelated to fixingRadioListGeneric.ShowBorderand could unintentionally trigger a stable publish. Consider reverting this here (or moving the version bump to a dedicated release PR that follows the repo’s release process).
<PropertyGroup>
<Version>10.4.0</Version>
</PropertyGroup>
src/BootstrapBlazor/Components/Input/BootstrapInput.razor.scss:2
- This SCSS file (and most other
*.razor.scssfiles) appears to use UTF-8 BOM at the start of the file, but this change removes it. Please keep file encodings consistent across the stylesheet sources to avoid noisy diffs and tooling inconsistencies.
.bb-clearable-input {
display: inline-flex;
src/BootstrapBlazor/Components/Input/BootstrapInput.razor.scss:35
- The new
.form-control.no-borderrule is a global form-control behavior used by multiple components (RadioList/CheckboxList), but it’s being introduced insideBootstrapInput.razor.scss(an Input-specific stylesheet). For maintainability/discoverability, consider moving this rule to a shared form-control stylesheet (e.g.,ValidateForm.razor.scssor another common SCSS module) so it’s easier to find and reason about.
.form-control {
&.no-border:not(.is-valid):not(.is-invalid) {
border-color: transparent;
}
}
src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.scss:3
- This SCSS file’s UTF-8 BOM was removed in the change to the first line. Many other component
*.razor.scssfiles in the repo still include a BOM (e.g.,Components/Checkbox/Checkbox.razor.scss,Components/Radio/RadioList.razor.scss), so it would be good to keep the encoding consistent to avoid churn.
@use "../../wwwroot/scss/variables" as *;
.checkbox-list {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7742
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhancements: