[dev-v5] Add ControlStyle parameter to FluentSelect - #5145
Open
Denis Voituron (dvoituron) wants to merge 4 commits into
Open
[dev-v5] Add ControlStyle parameter to FluentSelect#5145Denis Voituron (dvoituron) wants to merge 4 commits into
Denis Voituron (dvoituron) wants to merge 4 commits into
Conversation
… internal control
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
August 14, 2026 11:00
Copilot started reviewing on behalf of
Denis Voituron (dvoituron)
August 14, 2026 11:01
View session
Denis Voituron (dvoituron)
enabled auto-merge (squash)
August 14, 2026 11:02
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a ControlStyle parameter to FluentSelect so consumers can inject CSS into the component’s internal control (shadow DOM), matching the customization capability already present in other input components. This extends the Fluent UI Blazor component API surface with a targeted styling hook plus a unit test to validate the JS interop call.
Changes:
- Implement
IFluentControlStyleonFluentSelectand apply the style viaAttributes.applyShadowStyleon first render. - Capture the rendered dropdown element via
@refto provide anElementReferencefor JS interop. - Add a bUnit test asserting the JS interop invocation and arguments for
ControlStyle.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Core/Components/List/FluentSelect.razor.cs |
Adds ControlStyle + Element parameters and applies shadow-style injection on first render. |
src/Core/Components/List/FluentSelect.razor |
Captures the internal <fluent-dropdown> element via @ref for JS interop styling. |
tests/Core/Components/List/FluentSelectTests.razor |
Adds a unit test verifying the applyShadowStyle JS invocation for ControlStyle. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.7%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
…/github.com/microsoft/fluentui-blazor into users/dvoituron/dev-v5/select-control-style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[dev-v5] Add ControlStyle parameter to FluentSelect
Introduce a
ControlStyleparameter to FluentSelect, allowing styles to be applied to the internal control.This enhancement improves customization options for users. A corresponding test verifies the functionality.
Fix the existing CSS selector from
.controlto:host .controlUnit Tests
Added