-
-
Notifications
You must be signed in to change notification settings - Fork 254
Add missing callout features to BitCallout component (#10628) #11094
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 missing callout features to BitCallout component (#10628) #11094
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe BitCallout component and related code have been updated to introduce new parameters for enhanced scroll and sizing control, including support for specifying scroll container IDs and offsets. The JavaScript and C# interop signatures were updated for consistency. Demo examples were added to illustrate the new scroll handling capabilities. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BlazorApp
participant BitCallout (C#)
participant JSInterop
participant Callouts (JS)
User->>BlazorApp: Interacts to open BitCallout
BlazorApp->>BitCallout (C#): ToggleCallout()
BitCallout (C#)->>JSInterop: Invoke BitCalloutToggleCallout with new parameters
JSInterop->>Callouts (JS): Call toggle with FooterId, HeaderId, MaxWindowWidth, SetCalloutWidth, ScrollContainerId, ScrollOffset
Callouts (JS)-->>JSInterop: Handles positioning and scroll logic
JSInterop-->>BitCallout (C#): JS operation completes
Assessment against linked issues
Poem
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (3)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor (1)
120-120: Fix typo in demo descriptionThere's a typo in the demo description: "Utilizaing" should be "Utilizing".
- <div>Utilizaing the ScrollContainerId one can enable scrolling the content of the callout.</div> + <div>Utilizing the ScrollContainerId one can enable scrolling the content of the callout.</div>src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs (1)
61-66: Fix typos in parameter descriptionsSeveral typos need correction in the parameter descriptions:
- Description = "The id of the footer element that renders at the end of the scrolling container of the callout contnet." + Description = "The id of the footer element that renders at the end of the scrolling container of the callout content."- Description = "The id of the header element that renders at the top of the scrolling container of the callout contnet." + Description = "The id of the header element that renders at the top of the scrolling container of the callout content."- Description = "Force the callout to set its content container width while openning it based on the available space and actual content." + Description = "Force the callout to set its content container width while opening it based on the available space and actual content."- Description = "The vertical offset of the scroll container to consider in the positining and height calculation of the callout." + Description = "The vertical offset of the scroll container to consider in the positioning and height calculation of the callout."Also applies to: 68-73, 89-94, 96-101, 103-108
src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Callout/BitCallout.razor.cs (1)
53-56: Fix typos in parameter documentationSeveral typos need correction in the XML documentation:
- /// The id of the footer element that renders at the end of the scrolling container of the callout contnet. + /// The id of the footer element that renders at the end of the scrolling container of the callout content.- /// The id of the header element that renders at the top of the scrolling container of the callout contnet. + /// The id of the header element that renders at the top of the scrolling container of the callout content.- /// The max window width to consider when calculating the position of the callout before openning. + /// The max window width to consider when calculating the position of the callout before opening.- /// Force the callout to set its content container width while openning it based on the available space and actual content. + /// Force the callout to set its content container width while opening it based on the available space and actual content.- /// The vertical offset of the scroll container to consider in the positining and height calculation of the callout. + /// The vertical offset of the scroll container to consider in the positioning and height calculation of the callout.Also applies to: 58-61, 71-74, 81-84, 86-89, 91-94
📜 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 (5)
src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Callout/BitCallout.razor.cs(3 hunks)src/BlazorUI/Bit.BlazorUI/Extensions/JsInterop/CalloutsJsRuntimeExtensions.cs(2 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(1 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs(3 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 (6)
src/BlazorUI/Bit.BlazorUI/Extensions/JsInterop/CalloutsJsRuntimeExtensions.cs (1)
23-23: LGTM: Parameter rename improves clarityThe parameter rename from
maxWidthtomaxWindowWidthis more descriptive and aligns with the updated component API. The change maintains consistency across the interop boundary.Also applies to: 40-40
src/BlazorUI/Bit.BlazorUI/Scripts/Callouts.ts (1)
22-22: LGTM: Consistent parameter renamingThe parameter rename from
maxWidthtomaxWindowWidthmaintains consistency with the C# component changes. The logic remains functionally equivalent while using more descriptive naming.Also applies to: 113-114
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor (2)
82-116: LGTM: Improved demo structureThe refactoring to remove unnecessary wrapping divs improves code cleanliness while maintaining the same functionality.
119-138: LGTM: Well-structured ScrollContainerId demoThe new demo effectively demonstrates the ScrollContainerId functionality with a comprehensive example showing scrollable content within the callout.
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs (1)
333-349: LGTM: New demo example code is well-structuredThe new ScrollContainerId demo code properly demonstrates the functionality with clear markup and appropriate styling.
src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Callout/BitCallout.razor.cs (1)
188-203: LGTM: Well-structured JS interop call with named parametersThe updated ToggleCallout method properly passes all the new parameters to the JavaScript interop. The use of named parameters improves readability and maintainability. The null coalescing operators provide appropriate default values.
closes #10628
Summary by CodeRabbit
New Features
Documentation