-
-
Notifications
You must be signed in to change notification settings - Fork 346
fix(SelectGeneric): add dropdown-menu-body class #6110
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
Conversation
Co-Authored-By: j4587698 <[email protected]>
Reviewer's GuideThis PR updates the SelectGeneric component by adding a consistent dropdown-menu-body CSS wrapper for both virtualized and standard option lists and refactors the grouping and item rendering logic to ensure proper templating and remove redundant loops. Flow Diagram: Update to SelectGeneric Dropdown CSS Wrappersgraph TD
A[Start Dropdown Rendering] --> IsVirtualize{IsVirtualize?};
IsVirtualize -- Yes --> V_Path[Virtualized List];
V_Path --> V_Wrap["Update wrapper: div class includes 'dropdown-menu-body' (now 'dropdown-menu-body dropdown-virtual')"];
V_Wrap --> V_Content[Render virtualized content];
IsVirtualize -- No --> NV_Path[Non-Virtualized List];
NV_Path --> NV_Wrap["Add new wrapper: <div class='dropdown-menu-body'>"];
NV_Wrap --> NV_Content[Render non-virtualized groups & items];
V_Content --> Output[Final Dropdown UI];
NV_Content --> Output;
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Pull Request Overview
This PR ensures that the SelectGeneric component’s dropdown content is consistently wrapped with a dropdown-menu-body
class and bumps the package version.
- Adds
dropdown-menu-body
CSS class to both virtualized and non-virtualized dropdown wrappers - Increments version from 9.6.5-beta02 to 9.6.5-beta03
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
SelectGeneric.razor | Wrapped virtual and non-virtual list blocks with a <div class="dropdown-menu-body"> for consistent styling |
BootstrapBlazor.csproj | Updated <Version> to 9.6.5-beta03 |
Comments suppressed due to low confidence (1)
src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor:44
- Add or update automated tests to verify that the
dropdown-menu-body
class is applied whenIsVirtualize
is both true and false, ensuring styling is consistently applied.
<div class="dropdown-menu-body dropdown-virtual">
@@ -41,7 +41,7 @@ | |||
} | |||
@if (IsVirtualize) | |||
{ | |||
<div class="dropdown-virtual"> | |||
<div class="dropdown-menu-body dropdown-virtual"> |
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.
Consider updating the component’s documentation or README to note that dropdown content is now wrapped in a dropdown-menu-body
class for both virtualized and non-virtualized modes.
Copilot uses AI. Check for mistakes.
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.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@foreach (var itemGroup in Rows.GroupBy(i => i.GroupName)) | ||
{ | ||
if (!string.IsNullOrEmpty(itemGroup.Key)) | ||
<div class="dropdown-menu-body"> |
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.
suggestion (performance): GroupBy is executed on every render in markup
Move the grouping logic to a computed property or backing field to avoid repeated execution and improve performance with large data sets.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6110 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 703 703
Lines 31019 31019
Branches 4386 4386
=========================================
Hits 31019 31019 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6109
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a wrapper element with the "dropdown-menu-body" class around the dropdown content in SelectGeneric to restore expected styling and streamline group header rendering.
Bug Fixes:
Enhancements: