-
-
Notifications
You must be signed in to change notification settings - Fork 253
Rename PreserveCalloutWidh parameter to FixedCalloutWidth in callouts (#11507) #11510
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
Rename PreserveCalloutWidh parameter to FixedCalloutWidth in callouts (#11507) #11510
Conversation
WalkthroughThis PR systematically renames the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs (1)
253-253: Rename the public parameter to match the new naming convention.While the interop call has been updated to use
fixedCalloutWidth, this component still exposes a public parameter namedPreserveCalloutWidth. For consistency with the broader rename, this should also be updated toFixedCalloutWidth.Apply this change to rename the parameter:
/// <summary> - /// Disables automatic setting of the callout width and preserves its original width. + /// Forces the callout to preserve its component's original width. /// </summary> - [Parameter] public bool PreserveCalloutWidth { get; set; } + [Parameter] public bool FixedCalloutWidth { get; set; }And update its usage at line 1189:
headerId: CalloutHeaderTemplate is not null ? _headerId : "", footerId: CalloutFooterTemplate is not null ? _footerId : "", - setCalloutWidth: PreserveCalloutWidth is false, + setCalloutWidth: FixedCalloutWidth is false, fixedCalloutWidth: false, maxWindowWidth: 0);
🧹 Nitpick comments (1)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs (1)
61-66: Consider updating the description to align with the new parameter name.The parameter was renamed from
PreserveCalloutWidthtoFixedCalloutWidth, but the description still uses "preserve its component's original width." This creates a semantic mismatch that could confuse developers.Consider revising the description to better reflect "fixed" semantics:
- Description = "Forces the callout to preserve its component's original width." + Description = "Forces the callout to use a fixed width matching its component's width."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (13)
src/BlazorUI/Bit.BlazorUI/Components/Buttons/MenuButton/BitMenuButton.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Inputs/CircularTimePicker/BitCircularTimePicker.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Inputs/DatePicker/BitDatePicker.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Inputs/DateRangePicker/BitDateRangePicker.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Inputs/SearchBox/BitSearchBox.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Inputs/TimePicker/BitTimePicker.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Navs/Breadcrumb/BitBreadcrumb.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Callout/BitCallout.razor.cs(3 hunks)src/BlazorUI/Bit.BlazorUI/Extensions/JsInterop/CalloutsJsRuntimeExtensions.cs(1 hunks)src/BlazorUI/Bit.BlazorUI/Scripts/Callouts.ts(2 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build and test
🔇 Additional comments (12)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs (1)
107-107: LGTM!Good catch fixing the typo "openning" → "opening".
src/BlazorUI/Bit.BlazorUI/Extensions/JsInterop/CalloutsJsRuntimeExtensions.cs (1)
7-44: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in both the method signature and the JS interop invocation.src/BlazorUI/Bit.BlazorUI/Components/Inputs/CircularTimePicker/BitCircularTimePicker.razor.cs (1)
539-556: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in theBitCalloutToggleCalloutinvocation.src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs (1)
206-223: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in theBitCalloutToggleCalloutinvocation.src/BlazorUI/Bit.BlazorUI/Components/Inputs/TimePicker/BitTimePicker.razor.cs (1)
435-452: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in theBitCalloutToggleCalloutinvocation.src/BlazorUI/Bit.BlazorUI/Components/Buttons/MenuButton/BitMenuButton.razor.cs (1)
581-598: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in theBitCalloutToggleCalloutinvocation.src/BlazorUI/Bit.BlazorUI/Components/Inputs/SearchBox/BitSearchBox.razor.cs (1)
523-540: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in theBitCalloutToggleCalloutinvocation.src/BlazorUI/Bit.BlazorUI/Components/Inputs/DateRangePicker/BitDateRangePicker.razor.cs (1)
1927-1944: LGTM!The parameter rename from
preserveCalloutWidthtofixedCalloutWidthis correctly applied in theBitCalloutToggleCalloutinvocation.src/BlazorUI/Bit.BlazorUI/Components/Navs/Breadcrumb/BitBreadcrumb.razor.cs (1)
625-625: LGTM! Parameter rename applied correctly.The interop call has been updated to use
fixedCalloutWidthinstead ofpreserveCalloutWidth, maintaining the same value (false) and behavior.src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs (1)
1190-1190: Interop call parameter updated correctly.The call to
BitCalloutToggleCalloutnow usesfixedCalloutWidthinstead ofpreserveCalloutWidth, maintaining the same behavior.src/BlazorUI/Bit.BlazorUI/Components/Inputs/DatePicker/BitDatePicker.razor.cs (1)
1419-1419: LGTM! Parameter rename applied correctly.The interop call has been updated to use
fixedCalloutWidthinstead ofpreserveCalloutWidth, maintaining the same value and behavior.src/BlazorUI/Bit.BlazorUI/Scripts/Callouts.ts (1)
22-22: LGTM! TypeScript parameter rename aligns with C# changes.The parameter has been renamed from
preserveCalloutWidthtofixedCalloutWidthin both the function signature (line 22) and its usage (line 98). The logic remains unchanged, and the new name better describes the behavior of constraining the callout width to the minimum of the component and callout widths.Also applies to: 98-102
closes #11507
Summary by CodeRabbit
PreserveCalloutWidthparameter toFixedCalloutWidthin Callout and related dropdown/menu components. Update your code if currently using this parameter.