-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/demo theme switcher #11
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
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 pull request adds a disabled state feature to the multiselect component and reorganizes the test suite. The changes include styling updates for disabled state, new behavior to prevent interaction when disabled, comprehensive test coverage for the disabled functionality, and a demo page showcasing the feature. Additionally, tests have been refactored into separate files based on their purpose.
Key Changes:
- Added
Disabledparameter to the SimpleMultiselect component with logic to prevent dropdown interaction and auto-close when disabled - Introduced CSS styling for disabled state with Bootstrap compatibility
- Reorganized test suite by splitting tests into focused files (StylingTests, EqualityTests, DisabledTests) with shared BaseTest infrastructure
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/SimpleBlazorMultiselect/SimpleMultiselect.razor.css | Updated CSS to support disabled state with proper border colors and Bootstrap compatibility |
| src/SimpleBlazorMultiselect/SimpleMultiselect.razor | Added disabled parameter, attribute binding, and logic to prevent interaction when disabled |
| src/SimpleBlazorMultiselect.Tests/StylingTests.cs | Created new test file for styling-related tests extracted from SimpleMultiselectTests |
| src/SimpleBlazorMultiselect.Tests/SimpleMultiselectTests.cs | Refactored to use BaseTest class and removed tests moved to dedicated files |
| src/SimpleBlazorMultiselect.Tests/SimpleBlazorMultiselect.Tests.csproj | Added xunit.runner.visualstudio package reference |
| src/SimpleBlazorMultiselect.Tests/Helper/TestValueItem.cs | Extracted TestValueItem record into separate file for reuse |
| src/SimpleBlazorMultiselect.Tests/Helper/TestReferenceItem.cs | Extracted TestReferenceItem class into separate file for reuse |
| src/SimpleBlazorMultiselect.Tests/Helper/BaseTest.cs | Created base test class with shared setup, test data, and assertion helpers |
| src/SimpleBlazorMultiselect.Tests/EqualityTests.cs | Created new test file for equality-related tests extracted from SimpleMultiselectTests |
| src/SimpleBlazorMultiselect.Tests/DisabledTests.cs | Added comprehensive test coverage for disabled state functionality |
| src/SimpleBlazorMultiselect.Demo/Pages/DisabledDropdown.razor | Created demo page showcasing disabled state with toggle button |
| src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor | Added theme toggle button and DisabledDropdown navigation link |
| src/SimpleBlazorMultiselect.Demo/Layout/MainLayout.razor | Removed "About" link from top navigation bar |
| src/SimpleBlazorMultiselect.Demo/App.razor | Changed Standalone cascading value from true to false |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| &:disabled { | ||
| background-color: var(--bs-btn-disabled-bg); | ||
| border-color: var(--bs-border-color); |
Copilot
AI
Nov 7, 2025
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.
The disabled state removed the background-color style but added a border-color style. This change is inconsistent with the original implementation. Consider whether the background color should remain, or add a comment explaining why it was intentionally removed.
| border-color: var(--bs-border-color); | |
| border-color: var(--bs-border-color); | |
| background-color: var(--bs-btn-disabled-bg); |
| } | ||
|
|
||
| protected override async Task OnParametersSetAsync() | ||
| { |
Copilot
AI
Nov 7, 2025
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.
The OnParametersSetAsync method should call the base implementation. Add await base.OnParametersSetAsync(); at the beginning of the method.
| { | |
| { | |
| await base.OnParametersSetAsync(); |
| <nav class="flex-column"> | ||
| <div class="nav-item px-3"> | ||
| <button | ||
| onclick="document.querySelector('html').setAttribute('data-bs-theme', document.querySelector('html').getAttribute('data-bs-theme') === 'dark' ? 'light' : 'dark')" |
Copilot
AI
Nov 7, 2025
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.
No description provided.