Open henon opened 1 month ago
When is it expected to be released
I expect the first pre-release towards the end of April, no sooner. It greatly depends on how busy the team is with their day-to-day jobs.
@henon the FileUploadButtonTemplateContext.ClearAsync marked as required property.
part is no longer applicable since the template context was removed
@henon the
FileUploadButtonTemplateContext.ClearAsync marked as required property.
part is no longer applicable since the template context was removed
Thanks, I removed it.
Under the "Other Changes" heading the info about the Snackbar changes could be moved to be under the "Snackbar" heading with the other snackbar related stuff.
I do not understand what is the use of name change of so many property for a stable framework. Its like thanos snap .. gone
I do not understand what is the use of name change of so many property for a stable framework. Its like thanos snap .. gone
@gyanverma2 TLDR; you may choose to keep using v6.x.x and as long as people submit bugfix PRs and .net version upgrades for the v6 branch it will live on.
We are not abandoning v6 if you still need it. Just don't expect us to support or innovate on it (it just isn't possible with such a small team), the community will have to do the minimum that's necessary to keep it alive and we'll do our part by reviewing and merging your PRs against the v6 branch.
We know very well that breaking changes are a burden for users! That's why we have kept mudblazor stable for years and avoided all breaking changes in that time period. But consistency does matter too, and many users have complained about it. Also, the design errors we made over the years are really hampering us and hinder innovation. We needed to break at some point in time and that time is now.
In the future, there will be other breaking changes as the library has to evolve. Maybe it was wrong to wait so long. Maybe we should have made a small set of breaking changes at regular intervals instead of doing a big break like this. And we'll ask the community if we should break more often in the future with smaller change-sets.
In any case, we do our best to help anyone migrate. That's why we are tracking all the changes in this document. You can compile your app, see what compiler errors you get and do a quick Ctrl+F
find in this guide to see what you have to change. Also, we added an illegal parameter detection for razor parameters so when you execute your app you'll get runtime errors for all the parameters you forgot to update. We decided that this way (failing fast instead of silently ignoring errors) is the easiest way for you to migrate if you want. You don't have to though.
I just want to say that I am very excited for this release! Huge thank you to everyone who contributed their time and energy to making this happen 🙏
I'm glad that you've been giving Obsolete warnings throughout the lifetime of v6.x. I wish the Blazor compiler did more to help raise those when compiling, but that's on Microsoft to fix.
You guys have done a fantastic job, and thank you for only breaking on a major release, and not a minor one like Microsoft's Graph package. You're doing a fantastic job, and this migration guide is invaluable!
I'm glad that you've been giving Obsolete warnings throughout the lifetime of v6.x.
Yes, but not all breaking changes we made in v7 have been preceeded by obsoletion warnings. While working on v7 we discovered a lot more inconsistencies and rectified them on the spot.
I wish the Blazor compiler did more to help raise those when compiling, but that's on Microsoft to fix.
Yes, but we have added runtime exceptions for renamed parameters and there is also a new approach in the works by @peterthorpe81 who is tinkering with a compile time analyzer: https://github.com/MudBlazor/MudBlazor/pull/8771#issuecomment-2087717291
Some things I ran into that I could not find in this guide:
DialogOptions
- DisableBackdropClick
-> BackdropClick
, this needs to be added to the inverted negative parameters section?
MudDatePicker
- datePicker.Close()
-> await datePicker.CloseAsync
For MudList
and MudListItem
I couldn't set T in my project. I restarted Visual Studio then it started working, just an FYI if anyone encounters this.
Thanks for reporting @digitaldirk, I've updated the guide.
Minor one for MudColorPicker
- ShowToolbar is now defaulted to true so you need to set that to false to get previous default.
Minor one for
MudColorPicker
- ShowToolbar is now defaulted to true so you need to set that to false to get previous default.
Hmm, maybe we should revert that to false? Sounds like an oversight to me. Edit: done in f98e9a1b
Created a discussion topic MudBlazor v7 Feedback
MudBlazor version 7.0.0 brings a ton of breaking changes which we can't postpone any longer as we strive for more consistency and necessary improvements. This migration guide shall make the upgrade process as easy as possible for you.
Note: Please limit discussion strictly to migration or reporting errors in this guide. Discussion about the changes itself belong in the linked PRs and will be deleted in this issue. If you want to give general feedback about version 7.0.0 you are welcome to do it in MudBlazor v7 Feedback.
How to Use this Guide
Since the guide itself is quite lengthy you probably won't need to read it all. But you should read all the Warning boxes as they are very important.
It is probably best if you just compile your app against the v7 nuget and use browser search to find the new parameter or method name for the renamed parameters in this guide. Once your app runs again make sure you run all your tests to find additional problems in razor which will surface as
ArgumentExceptions
. If you don't have full test coverage then it is advised that you do a full manual test by visiting every razor component of your UI..NET 6 is not supported any longer
If you need .NET 6 support you can stay on the latest v6.x.x version. If you need any bug fixes in v6 please PR and we'll release v6 updates for you.
For more details see #8441
ICommand no longer supported
This concerns the components: MudBaseButton, MudButton, MudIconButton, MudFab, MudChip, MudListItem, MudBaseSelectItem, MudNavLink, MudMenu, MudMenuItem, MudOverlay, MudTreeViewItem, MudTableBase, MudTable
Command
+CommandParameter
withEventCallback<MouseEventArgs> OnClick
For more details see #8436
Unified Breakpoint Services
The services
SubscriptionInfo
,ResizeService
,ResizeListenerService
,ResizeBasedService
andBreakpointService
have been removed and are replaced entirely byBrowserViewportService
.For more details see #8467
Service Configuration
Some MudBlazor services hat config methods where you could directly pass options. These have been removed in favor of overloads where you pass an
Action<SomeServiceOptions>
which then manipuluates the options. The removed overloads are:AddMudBlazorSnackbar
AddMudBlazorResizeListener
AddMudBlazorResizeObserver
AddMudBlazorResizeObserverFactory
AddMudPopoverService
AddMudServices
For details see #8531
Async Protected Methods now bear the Async Postfix
Several protected
async
methods were renamed to bear theAsync
postfix to comply with our naming rules. For the most part we don't list them here as they are not important for most users except those few who derived own components from ours.Changes to Inputs
These changes concern MudTextField, MudInput and all inheriting from MudBaseInput
OnKeyPress
is no longer supported. UseOnKeyDown
instead.InvokeKeyPress
was removedIf an input has no label, it now automatically shrinks in height by 4px:
For details see #8476 and #8540
Pickers
This concerns the components MudPicker, MudColorPicker, MudBaseDatePicker, MudDatePicker, MudDateRangePicker, MudTimePicker
ClassAction
withActionsClass
#8489InputIcon (removed obsolete)
withAdornmentIcon
InputVariant (removed obsolete)
withVariant
AllowKeyboardInput
(removed, unused)ClassActions
withActionsClass
Classnames
withClassname
Close()
withCloseAsync()
Async
postfixFor details see #8506 and #8517
IMudStateHasChanged related
To force a render update cast the component in question to
IMudStateHasChanged
and callStateHasChanged()
on it. Other public ways to force a refresh have been removedForceRender
&StateHasChanged
removed #8477, #8610ForceRender
removed #8532Refresh
removed #8610Update
removed #8610Accessability Changes
Typo.subtitle1
andTypo.subtitle2
now render as<span>
instead of<h6>
#6061Inline
was removed. Instead ofInline="true"
useHtmlTag="span"
, the default tag remains<p>
. #8916Renamed Components
MudAppBarSpacer
andMudToolBarSpacer
withMudSpacer
#8475MudTextFieldString
withMudTextfield<string>
#8475Gray is the new Grey
All usage of
grey
was renamed togray
inColors
,Palette
and in css variables and classes. For more Details see #8452MudTheme
Palette
has been made abstract. #8453MudTheme.Palette
is nowPaletteLight
and is of typePaletteLight
to matchPaletteDark
. #8453ChipDefault
andChipDefaultHover
color settings have been removed fromMudPalette
, the chips now use the normal palette settings. #8599MudThemeProvider
MudThemingProvider
. #8712Before (v6.x.x):
After (v7.x.x):
Icons
Icons.Filled
withIcons.Material.Filled
Icons.Outlined
withIcons.Material.Outlined
Icons.Rounded
withIcons.Material.Rounded
Icons.Sharp
withIcons.Material.Sharp
Icons.TwoTone
withIcons.Material.TwoTone
See #8421, #8536 for more details.
Inverted Negative Parameters
For more consistency negative parameter names were renamed and inverted. You need to do the same, make sure to invert the boolean value or condition for these parameters! This change concerns the components: MudButton, MudSelectItem, MudFab, MudToggleIconButton, MudCheckBox, MudListItem, MudMenu, MudNavGroup, MudRadio, MudRatingItem, MudSwitch, MudToggleGroup, MudList, MudListItem, AppBar, ToolBar, ExpansionPanel and possibly some others as well:
DisableRipple
withRipple
and invert the value. #8571DisableGutters
withGutters
and invert the value. #8580DisablePadding
withPadding
and invert the value. #8613DisableElevation
withDropShadow
and invert the value #8592DisableUnderLine
withUnderline
and invert the value #8591DisableRowsPerPage
withPageSizeSelector
and invert the value. #8662DisableLegend
withShowLegend
and invert value #8826DisableToolbar
withShowToolbar
and invert value #8826DisableToolbar
withShowToolbar
and invert value #8826DisableSidePadding
withGutters
and invert value #8826DisableOverlay
withOverlay
and invert value #8826DisableSliderAnimation
withSliderAnimation
and invert value #8826DisableModifiers
withModifiers
and invert value #8826Other changes
DoubleExtentions
withDoubleExtensions
#8473ToDescriptionString
enum extension has been removed. If you used this, please copy our code from the v6 branch to your own project. #8474Link
withHref
inMudChip
,MudMenuItem
,MudButton
,MudIconButton
,MudFab
andMudBaseButton
#8471Item
now usesIReadOnlyList
instead ofList
. #4728Bottom
,Left
,Start
withOrigin
#8475Delayed
withDelay
#8475OverFlowBehavior.FilpOnOpen
withFlipOnOpen
#8475Select
renamed toSelectAsync
#8477ClearAsync
withClear
#8477AndForget
with enum parameter was removed in favor of one with a bool parameter. See #8531AreEqual
removed, useDoubleEpsilonEqualityComparer.Default.Equals
#8531ColorManager
andColorTransformation
removed in favor ofMudColor
#8531AlertTextPosition
withContentAlignment
#8532ShowDelimiters
withShowBullets
andDelimitersColor
withBulletsColor
#8532InterpolationRequired
removed fromILineInterpolator
andNoInterpolation
class removed. There is no replacement #8532AnimationEnd
withAnimationEndAsync
#8532Reset
withResetAsync
#8532Minimum
withMin
andMaximum
withMax
#8532Option
withValue
#8532ResetValue
withResetValueAsync
#8532Icon
withStartIcon
#8532Checked
withValue
#8564Async
postfix. The obsolete propertySelector
was removed. #8564mud-tabs-toolbar
tomud-tabs-tabbar
in all css classes, i.e.: Usemud-tabs-tabbar-transparent
instead ofmud-tabs-toolbar-transparent
. #8569Direction
,OffsetX
,OffsetY
withAnchorOrigin
andTransformOrigin
#8475Outline
toOutlined
#8616Image
andAlt
parameters. Replaced with aMudImage
as the ChildContent instead #8648Text
and constrained type parameter toINumber
. #8745IsExpandedChanged
withExpandedChanged
#8718IsEnabled
withEnabled
#8764IsEnabled
withEnabled
#8764UnCheckedColor
withUncheckedColor
#8759VerticalAlign
toVertical
#8798IsChecked
withChecked
#8825IsCheckable
withCheckable
#8825IsChecked
withChecked
#8825IsCheckable
withCheckable
#8825IsChecked
withChecked
#8825IsCheckable
withCheckable
#8825IsChecked
withChecked
#8825IsCheckable
withCheckable
#8825IsCheckedChanged
withCheckedChanged
#8825IsChecked
withChecked
#8825ToolBarClass
withToolbarClass
#8826NullableValue
instead ofValue
if you need to bind a nullable type #8881ValueLabelContent
changed fromRenderFragment<T>
toRenderFragment<SliderContext<T>>
#8881Href
is set the underlying html element is rendered as<a>
instead of<div>
#8649IsSelected
withSelected
#8886AppbarMinHeight
. #8568ItemIsDisabled
withItemDisabled
#8887ItemIsDisabled
withItemDisabled
#8887IsActive
withActive
#8888IsOpened
withOpen
#8891IsOpenChanged
withOpenChanged
#8891IsOpen
withOpen
#8891IsHidden
withHidden
#8952IsHiddenChanged
withHiddenChanged
#8952MudAutocomplete
SearchFunc
got an extra argument for a CancellationToken andSearchFuncWithCancel
was removed #8490increment
parameter was removed from theScrollToListItem
method #8477Direction
withAnchorOrigin
orTransformOrigin
#8532OffsetX
withAnchorOrigin
orTransformOrigin
#8532OffsetY
withAnchorOrigin
orTransformOrigin
#8532ChangeMenuAsync
withOpenMenuAsync
andCloseMenuAsync
#8787SelectOnClick
toSelectOnActivation
#8787IsOpenChanged
withOpenChanged
#8891IsOpen
withOpen
#8891ItemDisabledTemplate
andItemSelectedTemplate
will now display even ifItemTemplate
is not defined. #8913MudChipSet and MudChip
Both are now generic and
MudChipSet<T>
selection is now data driven which means that it only selects values not MudChips.<MudChip>
with<MudChip T="string">
or any other type forT
except if it is used inside aMudChipSet
from which it automatically inherits the type parameter. #4342<MudChipSet>
with<MudChipSet T="string">
or any other type forT
. #4342Avatar
andAvatarClass
withAvatarContent
#4342Link
withHref
#4342Filter
withCheckMark
#4342DisableRipple
withRipple
but make sure to invert the boolean expression. #4342Value
instead ofText
, useText
only for displaying a different text than the assigned value. Only forT="string"
when you don't setValue
thenText
is used instead as before. For all other types, you must setValue
. #4342MultiSelection
andMandatory
withSelectionMode
.MultiSelection="true"
corresponds toSelectionMode.MultiSelection
. For the default single-selection of the old chip set useSelectionMode.ToggleSelection
. The oldMultiSelection="false" Mandatory="true"
corresponds toSelectionMode.SingleSelection
. #8722Correspondence of old parameters to the new selection mode (#8722):
true
SelectionMode.MultiSelection
false
true
SelectionMode.SingleSelection
false
false
SelectionMode.ToggleSelection
SelectedChip
andSelectedChips
withSelectedValue
andSelectedValues
#4342IsSelected
withSelected
#8886IsSelectedChanged
withSelectedChanged
#8886MudColorPicker
DisableSliders
withShowSliders
and invert value #8826DisablePreview
withShowPreview
and invert value #8826DisableModeSwitch
withShowModeSwitch
and invert value #8826DisableInputs
withShowInputs
and invert value #8826DisableDragEffect
withDragEffect
and invert value #8826DisableColorField
withShowColorField
and invert value #8826DisableAlpha
withShowAlpha
and invert value #8826MudDialog
The changes below concern the classes
MudDialog
,MudDialogOptions
,MudDialogInstance
andMudDialogProvider
andDialogResult
ClassBackground
withBackgroundClass
#8458ClassAction
withActionsClass
#8481ClassContent
withContentClass
#8481AreParametersRendered
was removed, it had no function #8475Cancelled
withCanceled
#8475MudBlazor.Dialog
was removed completely. #8564DisableBackdropClick
toBackdropClick
and invert the conditionpublic DialogService
was madeprotected
. #8925Show()
renamed toTask ShowAsync()
. #8925Close()
renamed toTask CloseAsync()
. #8925MudDrawer
DrawerWidth
. #8568DrawerHeightTop
. #8568DrawerHeightBottom
. #8568MudExpansionPanels
IsExpanded
withExpanded
#8718IsExpandedChanged
withExpandedChanged
#8718IsInitiallyExpanded="true"
withExpanded="true"
or use@bind-Expanded="_expanded"
where_expanded
istrue
as initial value.CollapseAll()
withCollapseAllAsync()
CollapseAllExcept(...)
withCollapseAllExceptAsync(...)
CloseAllExcept()
withCollapseAllExceptAsync(...)
ExpandAll()
withExpandAllAsync()
UpdateAll()
withUpdateAllAsync()
RemovePanel(...)
is not public any more. If you used it, you have to change your code to a more blazoresque coding style where the panels are created from a list. Removing a panel can then be done by removing it from the list and callingStateHasChanged
.For more details see #8446
MudExpansionPanel
ToggleExpansion()
withToggleExpansionAsync()
Expand()
withExpandAsync()
Collapse()
withCollapseAsync()
For more details see #8446
MudFileUpload
ButtonTemplate
withActivatorContent
. AnyMudButton
withinActivatorContent
now activates the file picker. #8694MudFormComponent
This concerns all inputs which inhert from MudFormComponent, such as MudTextField, MudCheckBox, MudSwitch, MudFileUpload, etc.
BeginValidateAfter
withBeginValidationAfterAsync
andBeginValidate
withBeginValidateAsync
#8564Reset
andResetValue
withResetValueAsync
#8564MudGrid
If you didn't set a value vor
Spacing
, you don't have to do anything as we already doubled the default value. Of course the maximum allowable spacing has also been increased from 10 to 20.MudList
MudList
andMudListItem
are now generic<T>
so you can bind any type toSelectedValue
. This means you now must specifyT
, even if you don't use the selection feature. #8613SelectedItem
has been removed. The selection is solely managed viaSelectedValue
which you should bind. #8613Clickable
toReadOnly
and inverted conditions. #8613SelectedValue
. Lists are interactive by default now. If the list isReadOnly
, the selection will still be shown but can't be changed, ifDisabled
no selection shows. #8613DisablePadding
toPadding
and inverted conditions #8613Avatar
andAvatarClass
in favor ofAvatarContent
render fragment #8677InitiallyExpanded
, just setExpanded
totrue
#8613T="string"
, you can just setText
if theValue
is the same so you don't have to repeat yourself. This also means you don't have to set a value if you only have a (unique)Text
and you won't get selection problems. In the old list you had to set a uniqueValue
just so the selection mechanism worked. #8613AdornmentColor
withExpandIconColor
#8775OnClickHandlerPreventDefault
toOnClickPreventDefault
#8775MudRadioGroup
ResetValue
renamed toResetValueAsync
. #8477SelectedOption
withValue
instead. #8568SelectedOptionChanged
withValueChanged
instead. #8568MudSelect
Direction
withAnchorOrigin
orTransformOrigin
#8532OffsetX
withAnchorOrigin
orTransformOrigin
#8532OffsetY
withAnchorOrigin
orTransformOrigin
#8532MudSnackbar
SnackbarService
methodAddNew
withAdd
#8475Add(string message, ...)
does not supportMarkupString
any longer for security reasons. We added an overloadAdd(MarkupString message, ...)
. #8156MudSwipeArea
GetSwipeDelta
removed. UseOnSwipeEnd
instead #8568OnSwipe
removed. UseOnSwipeEnd
instead #8568MudTable
ServerData
got an extra argument for a CancellationToken #8407RightAlignSmall
removed as not needed any longer, the cells width/alignment is done automatically.. #8532DisableRowsPerPage
withHideRowsPerPage
#8532IsExpandable
withExpandable
#8718IsExpandable
withExpandable
#8718IsExpanded
withExpanded
#8718IsExpandable
withExpandable
#8718IsEditable
withEditable
#8892IsEditing
andIsEditSwitchBlocked
#8892IsEditable
withEditable
#8892QuickColumns
property andMudColumn
that was used to generate table when no Columns and Rows were present. We no longer want to use reflection in MudTable, so we removed this undocumented feature. #8927MudTreeView
CanActivate
was removed, it is no longer needed. #8475CanHover
withHover
#8475CanSelect
removed. Use MultiSelection instead #8532ActivatedValueChanged
withSelectedValueChanged
#8532ReadOnly
for a non-selectable treeview. #8661Multiselection
has been replaced by parameterSelectionMode
with enum values{ SingleSelection, MultiSelection, ToggleSelection }
#8661Items
now usesIReadOnlyCollection<T>
#8661Actived
was removed. UseSelected
instead #8661Items
andServerData
now useIReadOnlyCollection<T>
#8661MudDrawer
INavigationEventReceiver.OnNavigation()
is implemented now explicitly. #8532PreserveOpenState
as it is not needed any longer. #8833MudDataGrid
FilterDefinition.GenerateFilterExpression()
replace withFilterExpressionGenerator.GenerateExpression
FilterDefinition
that was replaced byIFilterDefinition
API.FilterContext.FilterActions
all properties are marked as required.FooterContext.FooterActions
all properties are marked as required.HeaderContext.SetSelectAllAsync
all properties are marked as required.HeaderContext.IsAllSelected
changed type frombool
tobool?
.IsEditable
withEditable
For more details see #8548, #8317, #8892
MudMenu
Link
,Target
,HtmlTag
andButtonType
were removed. They had no function. #8475ToggleMenu
is renamed toToggleMenuAsync
#8317CloseMenu
is renamed toCloseMenuAsync
#8317OpenMenu
is renamed toOpenMenuAsync
#8317MouseEnter
is not public API anymore. #8317MouseLeave
is not public API anymore. #8317MudMenuItem:
UriHelper
changed visibility frompublic
toprotected
. #8317JsApiService
changed visibility frompublic
toprotected
. #8317Activate(object, MouseEventArgs)
is now implemented explicitlyIActivatable.Activate(object, MouseEventArgs)
#8317void Activate(object, TouchEventArgs)
was removed. #8317