Preview Features for Next Major Version#11377
Preview Features for Next Major Version#11377danielchalmers wants to merge 30 commits intoMudBlazor:devfrom
Conversation
|
@henon @ScarletKuro What do you think about this approach? (the preview switch itself, not the ui changes) |
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (60.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #11377 +/- ##
==========================================
- Coverage 91.12% 91.04% -0.08%
==========================================
Files 465 466 +1
Lines 14409 14427 +18
Branches 2788 2799 +11
==========================================
+ Hits 13130 13135 +5
- Misses 641 643 +2
- Partials 638 649 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This idea works only for things that can co-exist. Most breaking changes can't or else we'd make them in a non-breaking way in the first place (i.e. using the ObsoleteAttribute and forwarding to the new properties, etc). So I see only limited use in this and we'll still have to enter a preview mode where we apply breaking changes that can not be switched off. Edit: But I think it is still a good idea for those changes that can be switched off. |
Right, I don't mean this as an ultimate solution. I just need a way of turning on and off UI elements. Then by the time we're all ready it will cut down the beta period by a good chunk. |
|
This only allows a very limited set of 'breaking changes,' like visuals one (returning |
@ScarletKuro I have to disagree, these changes are breaking by nature and I don't think they should be included in point releases. |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces preview features to facilitate a smooth transition to the next major version by conditionally enabling new UI/UX behaviors. Key changes include the introduction of the EnablePreviewFeatures flag, updated visual element defaults (such as focus handling, modal behavior, and snackbar animations), and modifications to resource labels used across components.
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/MudBlazor/Services/MudGlobal.cs | Added the EnablePreviewFeatures flag and updated default settings that use it. |
| src/MudBlazor/Resources/LanguageResource.resx | Updated resource values for color picker view labels. |
| src/MudBlazor/Components/ThemeProvider/MudThemeProvider.razor.cs | Modified theme generation to add preview-specific styling. |
| src/MudBlazor/Components/Snackbar/* | Adjusted snackbar configuration and transition durations based on preview features. |
| src/MudBlazor/Components/Select, Picker, Overlay, Menu, Autocomplete | Inverted Modal property values when preview features are enabled. |
| src/MudBlazor/Components/List/MudListItem.razor.cs | Updated text typography selection when preview features are active. |
| src/MudBlazor/Components/Input/MudInput.razor.cs | Added a new class for input adornment under preview mode. |
| src/MudBlazor/Components/ColorPicker/MudColorPicker.razor | Wrapped icon buttons in tooltips based on preview feature flag. |
| src/MudBlazor/Components/Chip/MudChip.razor.cs | Forced the addition of a CSS class on chips when preview features are enabled. |
| Docs and UnitTest files | Updated initialization and theme settings to reflect preview behavior. |
Comments suppressed due to low confidence (1)
src/MudBlazor/Components/ColorPicker/MudColorPicker.razor:265
- Ensure that the resource key 'MudColorPicker_ModeSwitch' is defined in the localization resources, as it is used when preview features are enabled.
<MudTooltip Text="@((MudGlobal.EnablePreviewFeatures ? Localizer[LanguageResource.MudColorPicker_ModeSwitch] : null))">
I sense a misunderstanding here. I think Kuro meant that we could release the preview changes (switched off) in minor releases, right? And if so, I would agree with that. |
v8 needs more time to cook, so the idea is to begin staging these changes ahead of time by including them in minor releases, flagged off, so we can develop v8 and v9 in parallel. When we’re ready to switch to the v9 branch, we’ll remove the flag and enable everything at once while making larger breaking changes. The docs can be the playground to have the features enabled. Having a toggle is difficult because they're low level features. This PR is the initial batch. I'll follow up on more PRs of the same type over the next weeks. If I identify anything that could be released now without disruption I'll make separate PRs, but the ones here are breaking UI/UX changes. https://github.com/orgs/MudBlazor/projects/5 |
|
|
Other changes to make:
All the changes will probably not be merged like this because we might target a new palette first, and then these can be tied directly to the palette instead of a feature flag. We don't want to make major changes like these to the classic MudBlazor palette. I think developing the new theme in the v8 branch with the changes marked experimental would be good because then we can keep the fixes coming, then release it when it's considered ready as a defining v9 feature along with necessary breaking changes needed to finalize the new theme. |
|
Parts of this will be extracted in a separate PR dedicated to the new MD3E theme |



Description
This introduces a way to commit breaking changes ahead of time without locking the branch to v9. In this PR, it's used to modernize UI/UX elements based on Material Design 3.
How Has This Been Tested?
visually
Type of Changes
Before/After
Which changes do you like?
⭐ Sentence-cased buttons & increased border radius
⭐ Snackbar with faster and eased animation
Video3.mp4
Video4.mp4
⭐ Re-themed tooltips for readability
⭐ Rounded square chips
⭐ More tooltips
⭐ Appropriately sized adornments
⭐ Don't shrink text in dense mode
⭐ Softer borders
⭐ Modal popovers
Video5.mp4
Video6.mp4
Checklist
dev).