Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new radio button component set (BitRadioGroup and BitRadio) for single-choice selection in forms, with support for generic value types, validation, inline/grouped layouts, disabled states, and additional help text. The implementation includes comprehensive tests and Storybook examples, following existing component patterns in the codebase.
Key changes:
- New
BitRadioGroup<T>andBitRadio<T>components with full form integration viaInputRadioGroupandInputRadio - Comprehensive test coverage including behavioral tests (value changes, checked attributes) and rendering tests (inline, grouped, disabled, additional text)
- Complete documentation with usage examples and accessibility guidance
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/BitBlazor/Form/Radio/BitRadioGroup.razor | Component template wrapping InputRadioGroup with cascading context |
| src/BitBlazor/Form/Radio/BitRadioGroup.razor.cs | Component logic with validation support, inline/grouped layout options |
| src/BitBlazor/Form/Radio/BitRadio.razor | Individual radio item template with label and additional text |
| src/BitBlazor/Form/Radio/BitRadio.razor.cs | Radio item logic with CSS class computation and accessibility attributes |
| tests/BitBlazor.Test/Form/Radio/BitRadioGroupTest.Behaviors.cs | Behavioral tests for value changes and checked state management |
| tests/BitBlazor.Test/Form/Radio/BitRadioGroupTest.Rendering.razor | Rendering tests verifying markup for various configurations |
| stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor | Storybook examples demonstrating component features |
| docs/form/radio.md | Comprehensive component documentation with examples |
| docs/quick-reference.md | Quick reference documentation with basic usage patterns |
| docs/README.md | Updated component index with radio button entry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor
Outdated
Show resolved
Hide resolved
stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor
Outdated
Show resolved
Hide resolved
stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor
Outdated
Show resolved
Hide resolved
stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor
Show resolved
Hide resolved
stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razor
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/BitBlazor/Form/Radio/BitRadio.razor:18
- Extra blank line at the end of the file. Other similar Razor files in the codebase (like BitCheckbox.razor and BitRadioGroup.razor) have only one blank line at the end, not two.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a new, fully featured
BitRadioGroupandBitRadiocomponent set for forms in Blazor, along with comprehensive tests and Storybook stories. The new components support grouping, inline display, disabling, additional help text, and integration with form validation. The changes are organized as follows:Component Implementation:
BitRadioGroup<T>andBitRadio<T>components, supporting generic value types, inline/grouped display, disabling, additional text, and unique ID generation. These components are designed for use in forms and support validation and flexible layout. (src/BitBlazor/Form/Radio/BitRadioGroup.razor[1]src/BitBlazor/Form/Radio/BitRadioGroup.razor.cs[2]src/BitBlazor/Form/Radio/BitRadio.razor[3]src/BitBlazor/Form/Radio/BitRadio.razor.cs[4]Storybook/Documentation:
BitRadioGroupdemonstrating default, inline, disabled, grouped, and additional text usage scenarios, aiding in documentation and manual testing. (stories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razorstories/BitBlazor.Stories/Components/Stories/Form/BitRadioGroup.stories.razorR1-R98)Automated Testing:
BitRadioGroup, verifying value change behavior, checked attribute logic, rendering of inline/grouped/disabled/additional-text scenarios, and markup correctness. (tests/BitBlazor.Test/Form/Radio/BitRadioGroupTest.Behaviors.cs[1]tests/BitBlazor.Test/Form/Radio/BitRadioGroupTest.Rendering.razor[2]