-
-
Notifications
You must be signed in to change notification settings - Fork 254
Apply some improvements to Overview page of demo website (#11787) #11788
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
Apply some improvements to Overview page of demo website (#11787) #11788
Conversation
WalkthroughThe Overview page has been redesigned from a minimal text layout to a card-based structure with multiple BitCard sections presenting components, installation, browser/platform support, Codespaces, and resources. Supporting SCSS styles have been refactored with responsive adjustments scoped under Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 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
🧹 Nitpick comments (4)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/OverviewPage.razor (4)
21-27: Avoid wrapping<ul>lists insideBitTextto keep HTML semantics validRight now, unordered lists are rendered inside
BitTextblocks, which likely output as a paragraph or span. That’s invalid HTML and can confuse assistive tech.Consider rendering lists outside of
BitText, e.g.:- <BitText Typography="BitTypography.Body1" Gutter> - <ul dir="auto"> - <li>Optimized for .NET 8.0+ with SSR-friendly styles and responsive layouts.</li> - <li>Light/dark themes and global design tokens ready for customization.</li> - <li>Extensive demos, docs, and source available for every component.</li> - </ul> - </BitText> + <BitText Typography="BitTypography.Body1" Gutter> + Key highlights: + </BitText> + <ul dir="auto"> + <li>Optimized for .NET 8.0+ with SSR-friendly styles and responsive layouts.</li> + <li>Light/dark themes and global design tokens ready for customization.</li> + <li>Extensive demos, docs, and source available for every component.</li> + </ul>Same pattern can be applied to the other list sections.
Also applies to: 190-196, 208-214, 241-245
39-47: Make BitStack boolean parameters explicit for clarityOn
BitStackyou’re using bare attributes:<BitStack Gap="1rem" Horizontal Wrap Alignment="BitAlignment.SpaceBetween">Blazor component parameters are typically set with
name=value, even forbools, which keeps intent clear and avoids any ambiguity in how Razor parses them.(blog.51cto.com)Consider:
- <BitStack Gap="1rem" Horizontal Wrap Alignment="BitAlignment.SpaceBetween"> + <BitStack Gap="1rem" Horizontal="true" Wrap="true" Alignment="BitAlignment.SpaceBetween">(Same style could be applied to other boolean parameters like
FullWidth,FullSize,NoShadow,NoUnderlineif you want maximum consistency.)
40-147: Add explicitAlttext for category icons to improve accessibilityThe category tiles all use
BitImagewithoutAlt, so screen readers will likely fall back to the file name or nothing useful:<BitImage Src="_content/Bit.BlazorUI.Demo.Client.Core/images/icon/input-icon.svg" />For decorative icons, prefer an empty
Altso they’re ignored; if you want them announced, use meaningful text:- <BitImage Src="_content/Bit.BlazorUI.Demo.Client.Core/images/icon/input-icon.svg" /> + <BitImage Src="_content/Bit.BlazorUI.Demo.Client.Core/images/icon/input-icon.svg" Alt="" />You can reuse this pattern for the rest of the category cards.
11-12: Consider relying on SCSS spacing instead of multiple<br />tagsThere are many standalone
<br />tags used purely for vertical spacing between cards and texts. Functionally it’s fine, but spacing is usually easier to maintain via margins/padding in the.razor.scssfile.Not urgent, but over time consolidating this into SCSS (e.g., bottom margins on headings/cards) will keep the markup cleaner and easier to tweak.
Also applies to: 30-31, 150-151, 154-155, 159-160, 167-168, 181-182, 185-186, 199-200, 203-204, 217-218, 221-222, 235-236, 238-240, 249-252
📜 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 (2)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/OverviewPage.razor(1 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/OverviewPage.razor.scss(1 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 Bit.BlazorUI
🔇 Additional comments (2)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/OverviewPage.razor.scss (1)
10-12: Verify the spacing calculation for the lg breakpoint.With
BitStack Gap="1rem"(16px), the precise subtract value for 3 columns should be10.67px(32px total gap ÷ 3 cards), but11pxis used here. This might cause minor 1px gaps or overlaps in the card layout.Consider using a precise calculation:
@include lg { - width: calc((100% / 3) - 11px); + width: calc((100% / 3) - calc(32px / 3)); }Alternatively, verify visually that the current 11px approximation is acceptable.
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/OverviewPage.razor (1)
1-31: Overview header and hero card look solidThe new
PageOutletdescription, top heading, and heroBitCardcopy read well and align with the docs-driven story for bit BlazorUI. No functional issues spotted here.
closes #11787
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.