Skip to content

fix(RadioListGeneric): parameter ShowBorder not work#7743

Merged
ArgoZhang merged 2 commits intomainfrom
fix-radio-list
Mar 2, 2026
Merged

fix(RadioListGeneric): parameter ShowBorder not work#7743
ArgoZhang merged 2 commits intomainfrom
fix-radio-list

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Mar 2, 2026

Link issues

fixes #7742

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Enhancements:

  • Centralize no-border form-control styling in the shared BootstrapInput stylesheet instead of in CheckboxList-specific styles.

Copilot AI review requested due to automatic review settings March 2, 2026 09:14
@bb-auto bb-auto bot added the bug Something isn't working label Mar 2, 2026
@bb-auto bb-auto bot added this to the v10.3.0 milestone Mar 2, 2026
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 2, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors 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 rendering

flowchart 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"]
Loading

File-Level Changes

Change Details Files
Centralize no-border styling for form controls to ensure ShowBorder parameters work consistently (including RadioListGeneric).
  • Add a generic .form-control.no-border style that hides the border when the control is neither valid nor invalid.
  • Remove the CheckboxList-specific .form-control.no-border rule to rely on the new shared style.
  • Normalize SCSS file headers by removing stray BOM characters in the input and checkbox list styles.
src/BootstrapBlazor/Components/Input/BootstrapInput.razor.scss
src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.scss

Assessment against linked issues

Issue Objective Addressed Explanation
#7742 Make the RadioListGeneric component honor the ShowBorder parameter so that when ShowBorder == false, the border is not displayed.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit e039a8f into main Mar 2, 2026
6 checks passed
@ArgoZhang ArgoZhang deleted the fix-radio-list branch March 2, 2026 09:15
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2fbddbd) to head (098326e).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
BB 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a 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 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-border style to make borders transparent when no-border is applied.
  • Remove the now-redundant no-border border override from CheckboxList.razor.scss.
  • Bump BootstrapBlazor package version from 10.4.0-beta02 to 10.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.csproj bumps the package version from 10.4.0-beta02 to 10.4.0. This looks like a release/versioning change that’s unrelated to fixing RadioListGeneric.ShowBorder and 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.scss files) 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-border rule is a global form-control behavior used by multiple components (RadioList/CheckboxList), but it’s being introduced inside BootstrapInput.razor.scss (an Input-specific stylesheet). For maintainability/discoverability, consider moving this rule to a shared form-control stylesheet (e.g., ValidateForm.razor.scss or 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.scss files 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(RadioListGeneric): ShowBorder 属性好像不工作

2 participants