Skip to content

Apply BitButtonGroup improvements (#12699) - #12703

Merged
msynk merged 5 commits into
bitfoundation:developfrom
msynk:12699-blazorui-buttongroup-improvements
Jul 20, 2026
Merged

Apply BitButtonGroup improvements (#12699)#12703
msynk merged 5 commits into
bitfoundation:developfrom
msynk:12699-blazorui-buttongroup-improvements

Conversation

@msynk

@msynk msynk commented Jul 19, 2026

Copy link
Copy Markdown
Member

closes #12699

Summary by CodeRabbit

  • New Features

    • Added explicit selection modes (None/Single/Multiple) with toggle keys, limits, and fixed-toggle behavior.
    • Enhanced keyboard navigation and roving focus with improved ARIA semantics.
    • Added loading, badges, aria labels, and link support (href/target) for items and options.
    • Added new layout options (detached, rounded, gap, justified) and overflow handling (clip/wrap/scroll/scrollbar).
    • Expanded styling hooks for badge, selection indicator, and spinner.
  • Bug Fixes

    • Improved disabled and focus-visible behavior, loading click-blocking, and overflow/scroll styling.
  • Documentation

    • Updated Button Group demos and sample content extensively.
  • Tests

    • Added coverage for selection, keyboard, accessibility, loading, links, and layout.

@msynk
msynk requested review from mhrastegari and yasmoradi July 19, 2026 17:40
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@msynk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b518ea2c-2883-4340-ae8c-020ca39bc75d

📥 Commits

Reviewing files that changed from the base of the PR and between 5b05193 and fc3bdb8.

📒 Files selected for processing (25)
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.scss
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupClassStyles.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupItem.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupNameSelectors.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOption.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOverflow.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupSelectionMode.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor.scss
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/Operation.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.samples.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor.samples.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor.samples.cs
  • src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs

Walkthrough

BitButtonGroup now supports explicit selection modes, synchronized multi-selection, keyboard navigation, ARIA patterns, loading and link items, selection indicators, layout variants, expanded styling hooks, comprehensive demos, and focused behavioral tests.

Changes

BitButtonGroup improvements

Layer / File(s) Summary
Selection modes and keyboard navigation
src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor, src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor.cs
Adds None, Single, and Multiple selection behavior, toggle synchronization and constraints, roving tabindex navigation, focus registration, and selection-specific ARIA attributes.
Item contracts and rendering states
src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupItem.cs, src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOption.cs, src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupNameSelectors.cs, src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.*
Adds accessibility, badge, link, loading, target, selector, template, spinner, and selection-indicator support.
Layout and visual states
src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.scss, src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupClassStyles.cs
Adds detached, justified, rounded, wrapping, scrolling, focus, disabled, badge, spinner, and indicator styling with new class hooks.
Demo metadata and supporting models
src/BlazorUI/Demo/Client/.../Buttons/ButtonGroup/BitButtonGroupDemo.razor*, src/BlazorUI/Demo/Client/.../Buttons/ButtonGroup/Operation.cs, src/BlazorUI/Demo/Client/.../Buttons/ButtonGroup/BitButtonGroupDemo.razor.scss
Documents the expanded parameters, selectors, sub-enums, style hooks, demo model fields, and supporting demo styles.
Custom item demos and samples
src/BlazorUI/Demo/Client/.../Buttons/ButtonGroup/_BitButtonGroupCustomDemo.*
Demonstrates selection constraints, layouts, loading, links, templates, accessibility, icons, sizing, styling, and RTL behavior for custom item models.
Item and option demos
src/BlazorUI/Demo/Client/.../Buttons/ButtonGroup/_BitButtonGroupItemDemo.*, src/BlazorUI/Demo/Client/.../Buttons/ButtonGroup/_BitButtonGroupOptionDemo.*
Expands item and option documentation, examples, state handlers, templates, embedded samples, and interaction guidance.
Behavior validation
src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs
Adds tests for selection modes, toggle limits, keyboard navigation, ARIA output, loading, links, badges, layout classes, indicators, and orientation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant BitButtonGroup
  participant Item
  participant Callback
  User->>BitButtonGroup: Click or navigate with keyboard
  BitButtonGroup->>Item: Resolve loading, toggle, and focus state
  BitButtonGroup->>Item: Render button or anchor with ARIA attributes
  BitButtonGroup->>Callback: Notify toggle or click changes
Loading

Suggested reviewers: mhrastegari, yasmoradi

Poem

A rabbit hops through toggles bright,
With keys that bind and focus right.
Badges bloom and spinners twirl,
Links and layouts shape the world.
“ARIA!” it cries, ears held high—
Tests keep every carrot nigh.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.07% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main BitButtonGroup improvements in this PR.
Linked Issues check ✅ Passed The PR adds the requested BitButtonGroup features, demo examples, and updated descriptions/page copy for issue #12699.
Out of Scope Changes check ✅ Passed The changes stay focused on BitButtonGroup behavior, demos, docs, styling, and tests, with no clear unrelated additions.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.samples.cs (1)

165-207: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

example6CsharpCode is missing the definitions used by the new FixedToggle sample.

The FixedToggle line added at 165 references NameSelectors="multiNameSelectors" and Items="fixedSingleCustoms", but example6CsharpCode (166–207) defines neither (multiNameSelectors only exists in example14CsharpCode). The C# panel shown with this example won't compile if copied. The Item demo's example6CsharpCode added fixedSingleItems for the analogous case; mirror that here (define fixedSingleCustoms, and either reuse toggledNameSelectors in the razor or add multiNameSelectors).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.samples.cs`
around lines 165 - 207, Update example6CsharpCode to define the symbols
referenced by the FixedToggle sample: add fixedSingleCustoms with the required
Operation items and either change the sample to reuse toggledNameSelectors or
define multiNameSelectors locally. Keep the copied C# example self-contained and
compilable.
🧹 Nitpick comments (2)
src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs (2)

135-171: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Ordering assertion doesn't actually prove item-order semantics.

The comment says the keys follow the order of the items claim being tested here, but the click order (buttons[0] then buttons[2], i.e. "a" then "c") matches the item order exactly, so this test can't distinguish "ordered by item position" from "ordered by click/toggle sequence." Click out of item order (e.g. buttons[2] then buttons[0]) and still assert ["a", "c"] to actually validate the claim.

♻️ Strengthen the ordering assertion
-        comp.FindAll("button")[0].Click();
-        comp.FindAll("button")[2].Click();
+        // Click out of item order to actually prove ordering follows item position, not click sequence.
+        comp.FindAll("button")[2].Click();
+        comp.FindAll("button")[0].Click();

         // Both stay toggled, and the keys follow the order of the items.
         CollectionAssert.AreEqual(new[] { "a", "c" }, toggleKeys?.ToArray());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs`
around lines 135 - 171, Update
BitButtonGroupMultipleSelectionShouldUseTheToolbarPatternAndToggleIndependently
to click the third button before the first, while preserving the assertion that
toggleKeys is ordered as ["a", "c"]. Keep the existing independent-toggle and
removal assertions unchanged.

222-256: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keyboard navigation itself is never exercised.

This test only checks the initial tabindex placement (roving vs. per-button), which shows the group is configured for roving-tabindex, but no test in this file actually dispatches arrow/Home/End key events to verify focus moves between items. Given this layer's stated purpose explicitly includes "navigation," and bUnit ships IElement.KeyDown(Key, ...) / KeyDown(string key, ...) extension methods for this, adding a keydown-driven test would meaningfully close the gap. Also note SelectOnFocus (which toggles the focused item while navigating) has no coverage anywhere in this diff.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs`
around lines 222 - 256, Extend
BitButtonGroupNavigableShouldMakeTheGroupASingleTabStop to dispatch keyboard
events using bUnit keydown helpers and assert focus moves between buttons for
arrow, Home, and End navigation. Also cover SelectOnFocus by enabling it and
verifying that navigating to an item toggles the focused item, while preserving
the existing roving-tabindex assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor.cs`:
- Around line 546-611: Update HandleOnKeyDown to prevent the browser’s default
action only when handling ArrowUp, ArrowDown, Home, or End, while preserving
existing navigation behavior and allowing Space/Enter defaults. Apply the
prevention through the component’s keydown event handling rather than a blanket
`@onkeydown`:preventDefault.

In
`@src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.scss`:
- Around line 194-199: Add an empty line before the badge tinting comment in the
button-group SCSS, and change every referenced `currentColor` value to lowercase
`currentcolor` in the badge styles and `.bit-btg-sin::after` `border-color`
declaration.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor`:
- Around line 655-665: Update the Links demo copy within the `DemoExample` for
`example21` to describe only the currently rendered `linkCustoms` examples, or
extend `linkCustoms` to visibly include mixed button/link and disabled or
loading-link cases. Keep the documentation aligned with what the demo actually
renders.

---

Outside diff comments:
In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.samples.cs`:
- Around line 165-207: Update example6CsharpCode to define the symbols
referenced by the FixedToggle sample: add fixedSingleCustoms with the required
Operation items and either change the sample to reuse toggledNameSelectors or
define multiNameSelectors locally. Keep the copied C# example self-contained and
compilable.

---

Nitpick comments:
In
`@src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs`:
- Around line 135-171: Update
BitButtonGroupMultipleSelectionShouldUseTheToolbarPatternAndToggleIndependently
to click the third button before the first, while preserving the assertion that
toggleKeys is ordered as ["a", "c"]. Keep the existing independent-toggle and
removal assertions unchanged.
- Around line 222-256: Extend
BitButtonGroupNavigableShouldMakeTheGroupASingleTabStop to dispatch keyboard
events using bUnit keydown helpers and assert focus moves between buttons for
arrow, Home, and End navigation. Also cover SelectOnFocus by enabling it and
verifying that navigating to an item toggles the focused item, while preserving
the existing roving-tabindex assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0a0105f8-7fbf-4dfc-9e35-4924e02e059a

📥 Commits

Reviewing files that changed from the base of the PR and between 7bb7bb0 and 4701e5d.

📒 Files selected for processing (25)
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.scss
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupClassStyles.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupItem.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupNameSelectors.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOption.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOverflow.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupSelectionMode.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor.scss
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/Operation.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.samples.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor.samples.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor.samples.cs
  • src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs

@msynk

msynk commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

@msynk, I’ll perform a fresh, comprehensive review of the PR, including the newly added BitButtonGroup behavior, accessibility semantics, styling, demos, and tests.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor`:
- Around line 30-45: The anchor branch in _BitButtonGroupItem must expose the
same toggle semantics as the button branch for selectable items. Mirror the
button branch’s role and appropriate aria-checked/aria-pressed attributes on the
<a>, using the existing item state helpers and preserving non-toggle behavior
for non-selectable groups.

In
`@src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.scss`:
- Around line 43-45: Insert an empty line between the overflow-y declaration and
the explanatory comment in the BitButtonGroup styles, preserving the existing
overscroll-behavior-x declaration and comment text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ca1997d4-74cd-4d47-a6ba-a4cef75fd216

📥 Commits

Reviewing files that changed from the base of the PR and between 5b05193 and c85d27c.

📒 Files selected for processing (25)
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.razor.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroup.scss
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupClassStyles.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupItem.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupNameSelectors.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOption.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupOverflow.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/BitButtonGroupSelectionMode.cs
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor
  • src/BlazorUI/Bit.BlazorUI/Components/Buttons/ButtonGroup/_BitButtonGroupItem.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/BitButtonGroupDemo.razor.scss
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/Operation.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupCustomDemo.razor.samples.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupItemDemo.razor.samples.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Buttons/ButtonGroup/_BitButtonGroupOptionDemo.razor.samples.cs
  • src/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Buttons/ButtonGroup/BitButtonGroupTests.cs

@msynk

msynk commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

@msynk, starting a fresh comprehensive review of #12703, including BitButtonGroup behavior, accessibility, styling, demos, and tests.

✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 25 minutes.

@msynk
msynk merged commit 35bfa69 into bitfoundation:develop Jul 20, 2026
3 checks passed
@msynk
msynk deleted the 12699-blazorui-buttongroup-improvements branch July 20, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The BitButtonGroup improvements

1 participant