Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new BitCheckbox form component to the BitBlazor library with comprehensive documentation, tests, and examples. It also refactors the AdditionalText functionality from BitInputFieldBase to the base BitFormComponentBase class, making it available to all form components.
Key Changes
- Added
BitCheckboxcomponent with support for inline and grouped layouts, disabled states, and additional text - Refactored
AdditionalTextandAdditionalTextIdparameters toBitFormComponentBasefor reusability across all form components - Updated BlazingStory packages to version 1.0.0-preview.62
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/BitBlazor/Form/Checkbox/BitCheckbox.razor | Checkbox component markup with InputCheckbox, label, and additional text support |
| src/BitBlazor/Form/Checkbox/BitCheckbox.razor.cs | Component logic with Inline and Grouped parameters, CSS class computation |
| src/BitBlazor/Form/BitFormComponentBase.cs | Added AdditionalText parameters and rendering methods moved from BitInputFieldBase |
| src/BitBlazor/Form/BitInputFieldBase.cs | Removed AdditionalText-related code (refactored to base class) |
| tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Rendering.razor | Rendering tests for default, inline, grouped, disabled, and checked states |
| tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Behaviors.cs | Behavior tests for value changes and checked attribute updates |
| stories/BitBlazor.Stories/Components/Stories/Form/BitCheckbox.stories.razor | Storybook stories demonstrating various checkbox configurations |
| stories/BitBlazor.Stories/BitBlazor.Stories.csproj | Updated BlazingStory package versions |
| docs/form/checkbox.md | Comprehensive documentation with usage examples and parameter descriptions |
| docs/form/form-components.md | Added BitCheckbox to components table |
| docs/quick-reference.md | Added BitCheckbox quick reference examples and form example |
| docs/README.md | Added BitCheckbox to documentation index |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
stories/BitBlazor.Stories/Components/Stories/Form/BitCheckbox.stories.razor
Show resolved
Hide resolved
stories/BitBlazor.Stories/Components/Stories/Form/BitCheckbox.stories.razor
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Rendering.razor
Outdated
Show resolved
Hide resolved
tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Rendering.razor
Outdated
Show resolved
Hide resolved
…azor Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Rendering.razor
Outdated
Show resolved
Hide resolved
…azor Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a new
BitCheckboxform component to the BitBlazor library, along with its associated documentation, stories, and tests. Additionally, it refactors the handling of "additional text" and related attributes in form components to centralize this logic in the base class, improving code maintainability and consistency.New BitCheckbox Component:
BitCheckboxform component, which supports features like inline display, grouping, and additional text, and integrates with form validation and accessibility. (src/BitBlazor/Form/Checkbox/BitCheckbox.razor[1]src/BitBlazor/Form/Checkbox/BitCheckbox.razor.cs[2]Refactoring and Codebase Improvements:
AdditionalTextandAdditionalTextIdparameters, as well as their rendering and attribute logic, fromBitInputFieldBase<T>to the more generalBitFormComponentBase<T>, ensuring all form components can leverage this functionality and reducing code duplication. (src/BitBlazor/Form/BitFormComponentBase.cs[1] [2] [3];src/BitBlazor/Form/BitInputFieldBase.cs[4] [5]Storybook and Documentation:
BitCheckbox, demonstrating its usage in various scenarios, including inline, grouped, disabled, and with additional text. (stories/BitBlazor.Stories/Components/Stories/Form/BitCheckbox.stories.razorstories/BitBlazor.Stories/Components/Stories/Form/BitCheckbox.stories.razorR1-R142)BlazingStorypackages. (stories/BitBlazor.Stories/BitBlazor.Stories.csprojstories/BitBlazor.Stories/BitBlazor.Stories.csprojL12-R13)Testing:
BitCheckboxto verify its behaviors, markup, and accessibility features. (tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Behaviors.cs[1]tests/BitBlazor.Test/Form/Checkbox/BitCheckboxTest.Rendering.razor[2]