[dev-v5] Add ValidateClassNames property in LibraryConfiguration - #5149
Merged
Vincent Baaij (vnbaaij) merged 2 commits intoAug 14, 2026
Merged
Conversation
…n and update CssBuilder to use it
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
August 14, 2026 13:46
Copilot started reviewing on behalf of
Denis Voituron (dvoituron)
August 14, 2026 13:47
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new LibraryConfiguration.ValidateClassNames setting (stored process-wide) and wires CssBuilder to use it, with accompanying unit tests to validate defaults and shared-state behavior.
Changes:
- Added
LibraryConfiguration.ValidateClassNameswith a static backing store and an internal accessor forCssBuilder. - Updated
CssBuilderto useLibraryConfiguration.ShouldValidateClassNamesinstead of its own static switch. - Added unit tests covering default value, disabling validation, and shared state across configuration instances.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/Core/Utilities/CssBuilderTests.cs | Adds tests validating the new configuration behavior (including shared/static behavior). |
| src/Core/Utilities/CssBuilder.cs | Switches validation toggle source to LibraryConfiguration (and removes the previous public toggle). |
| src/Core/Infrastructure/LibraryConfiguration.cs | Adds the new ValidateClassNames configuration property with a static backing store and internal accessor. |
💡 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%
|
Vincent Baaij (vnbaaij)
approved these changes
Aug 14, 2026
Vincent Baaij (vnbaaij)
deleted the
users/dvoituron/dev-v5/validate-classnames
branch
August 14, 2026 14:34
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 ValidateClassNames property in LibraryConfiguration
Introduce a new
ValidateClassNamesproperty inLibraryConfigurationto control CSS class name validation across the application.This change enhances configurability and maintains existing validation logic.
Update
CssBuilderto utilize this property, ensuring consistent behavior.Unit Tests
Add tests to verify the functionality and shared state of the validation setting across instances.