-
-
Notifications
You must be signed in to change notification settings - Fork 260
Add Params infrastructure for BitStack (#11884) #11906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Params infrastructure for BitStack (#11884) #11906
Conversation
WalkthroughThis PR introduces cascading parameter infrastructure for the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (2)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStack.cs(2 hunks)src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStackParams.cs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStack.cs (3)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStackParams.cs (1)
BitStackParams(6-246)src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Card/BitCard.razor.cs (1)
DynamicDependency(94-99)src/BlazorUI/Bit.BlazorUI/Components/Inputs/ChoiceGroup/BitChoiceGroup.razor.cs (1)
OnParametersSet(156-170)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStackParams.cs (5)
src/BlazorUI/Bit.BlazorUI/Utils/Params/BitComponentBaseParams.cs (2)
BitComponentBaseParams(6-144)UpdateBaseParameters(80-143)src/BlazorUI/Bit.BlazorUI/Utils/Params/BitParams.cs (1)
BitParams(8-65)src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStack.cs (1)
BitStack(8-213)src/BlazorUI/Bit.BlazorUI/Extensions/StringExtensions.cs (1)
HasValue(5-10)src/BlazorUI/Bit.BlazorUI/Components/BitComponentBase.cs (1)
HasNotBeenSet(349-352)
🪛 GitHub Actions: bit platform CI - BlazorUI
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStack.cs
[error] 177-177: CS0246: The type or namespace name 'DynamicDependencyAttribute' could not be found (are you missing a using directive or an assembly reference?)
🪛 GitHub Check: build Bit.BlazorUI
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStack.cs
[failure] 177-177:
The type or namespace name 'DynamicDependencyAttribute' could not be found (are you missing a using directive or an assembly reference?)
[failure] 177-177:
The name 'DynamicallyAccessedMemberTypes' does not exist in the current context
[failure] 177-177:
The type or namespace name 'DynamicDependency' could not be found (are you missing a using directive or an assembly reference?)
[failure] 177-177:
The type or namespace name 'DynamicDependencyAttribute' could not be found (are you missing a using directive or an assembly reference?)
[failure] 177-177:
The name 'DynamicallyAccessedMemberTypes' does not exist in the current context
[failure] 177-177:
The type or namespace name 'DynamicDependency' could not be found (are you missing a using directive or an assembly reference?)
[failure] 177-177:
The type or namespace name 'DynamicDependencyAttribute' could not be found (are you missing a using directive or an assembly reference?)
[failure] 177-177:
The name 'DynamicallyAccessedMemberTypes' does not exist in the current context
[failure] 177-177:
The type or namespace name 'DynamicDependency' could not be found (are you missing a using directive or an assembly reference?)
[failure] 177-177:
The type or namespace name 'DynamicDependencyAttribute' could not be found (are you missing a using directive or an assembly reference?)
🔇 Additional comments (4)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStack.cs (1)
10-19: LGTM!The cascading parameter property is well-documented and follows the established pattern used by other components like
BitCard.src/BlazorUI/Bit.BlazorUI/Components/Layouts/Stack/BitStackParams.cs (3)
1-20: LGTM!The class structure correctly inherits from
BitComponentBaseParamsand implementsIBitComponentParams. TheParamNameconstant andNameproperty follow the established pattern used by other component params in the codebase.
24-107: LGTM!Property definitions correctly mirror the
BitStackcomponent parameters with proper nullable types (bool?,string?,BitAlignment?) to allow optional cascading values. Documentation is consistent with the source component.
122-245: LGTM!The
UpdateParametersmethod correctly follows the established pattern fromBitComponentBaseParams.UpdateBaseParameters:
- Null-guard on entry
- Calls base
UpdateBaseParametersfirst- For each parameter, checks both
HasValue/HasValue()andHasNotBeenSetbefore applying- Resets the appropriate builders (
StyleBuilder/ClassBuilder) matching theResetStyleBuilder/ResetClassBuilderattributes on the correspondingBitStackproperties
closes #11884
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.