Add ReverseNavPanel parameter to BitLayout (#9755)#9760
Add ReverseNavPanel parameter to BitLayout (#9755)#9760msynk merged 3 commits intobitfoundation:developfrom
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 pull request introduces a new feature for the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Layout/BitLayout.razor (1)
21-21: Consider using a more robust style concatenation approach.While the current implementation works, consider using a style builder or helper method to handle style concatenation more robustly. This would help prevent potential issues with missing spaces or semicolons.
- <main style="@(ReverseNavPanel ? "flex-direction:row-reverse;" : "")@Styles?.Main" class="bit-lyt-man @Classes?.Main"> + <main style="@GetMainStyles()" class="bit-lyt-man @Classes?.Main">Add this method to the code-behind file:
private string GetMainStyles() { var styles = new List<string>(); if (ReverseNavPanel) { styles.Add("flex-direction:row-reverse"); } if (!string.IsNullOrEmpty(Styles?.Main)) { styles.Add(Styles.Main); } return string.Join(";", styles); }src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Layouts/Layout/BitLayoutDemo.razor.cs (1)
59-65: Consider adding an example demonstrating ReverseNavPanel usage.While the parameter is well-documented, consider adding an example to demonstrate its usage in one of the example code snippets (example1RazorCode, example2RazorCode, or example3RazorCode).
For example, you could modify example3RazorCode to include:
<BitLayout Styles="@(new() { Main = "height: 19rem;" })" + ReverseNavPanel="true" Classes="@(new() { Header = "header2",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Layout/BitLayout.razor(1 hunks)src/BlazorUI/Bit.BlazorUI/Components/Layouts/Layout/BitLayout.razor.cs(2 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Layouts/Layout/BitLayoutDemo.razor.cs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build and test
🔇 Additional comments (2)
src/BlazorUI/Bit.BlazorUI/Components/Layouts/Layout/BitLayout.razor.cs (2)
43-46: LGTM! Well-documented parameter.The parameter is well-documented and follows the established pattern in the codebase.
69-72: LGTM! Clean implementation.The RegisterCssStyles method is simple and correctly registers the root styles.
closes #9755
Summary by CodeRabbit
New Features
ReverseNavPaneloption to the layout componentDocumentation