Add missing parameters to BitDropMenu (#12422)#12423
Conversation
|
Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges. Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughBitDropMenu component gains Background and Border color parameters, plus NoShadow boolean flag to control the callout's styling. The component generates corresponding CSS classes; demo UI demonstrates all variants with interactive parameter controls and embedded code samples. ChangesBitDropMenu styling parameters
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Pull request overview
This PR addresses issue #12422 by adding missing customization parameters to BitDropMenu so consumers can control the callout’s box-shadow, background, and border without relying on custom CSS overrides. It also updates the demo/docs to expose these new parameters and provide examples.
Changes:
- Added
NoShadow,Background, andBorderparameters toBitDropMenuand wired them into callout CSS class generation. - Extended
BitDropMenuSCSS with new callout modifier classes for shadow/background/border. - Updated the DropMenu demo page (samples, parameters table, and examples) to document and showcase the new parameters.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/DropMenu/BitDropMenuDemo.razor.samples.cs | Adds sample snippets demonstrating NoShadow, Background, and Border; renumbers existing examples. |
| src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/DropMenu/BitDropMenuDemo.razor.cs | Documents the new parameters and introduces a BitColorKind sub-enum table + state for choice groups. |
| src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/DropMenu/BitDropMenuDemo.razor | Adds new demo sections for NoShadow, Background, and Border, and wires SubEnums. |
| src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.scss | Adds styling hooks for the new callout customization parameters (shadow/background/border) and adjusts RTL handling. |
| src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs | Adds the new component parameters and updates callout class generation accordingly. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.scss`:
- Around line 89-132: The nested SCSS selectors under .bit-drm-cal are written
as descendant selectors (e.g., .bit-drm-nsh) but the component adds multiple
classes on the same element, so change each nested rule to use the
parent-reference form (e.g., &.bit-drm-nsh) so they compile to combined-class
selectors; update the rules for .bit-drm-rtl, .bit-drm-nsh, .bit-drm-pbg,
.bit-drm-sbg, .bit-drm-tbg, .bit-drm-rbg, .bit-drm-brd, .bit-drm-pbr,
.bit-drm-sbr, .bit-drm-tbr and .bit-drm-rbr inside .bit-drm-cal to use
&.classname just like the existing responsive modifiers do.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2171afc4-59ea-4f96-a801-5178fdbc96d8
📒 Files selected for processing (5)
src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cssrc/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.scsssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/DropMenu/BitDropMenuDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/DropMenu/BitDropMenuDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/DropMenu/BitDropMenuDemo.razor.samples.cs
closes #12422
Summary by CodeRabbit
New Features
NoShadowparameter to optionally remove the callout shadow effect for cleaner appearance.