v7 Migration Guide
mckaragoz opened this issue · comments
This guide shows the migration basics.
Working only with Mud7
MudExtensions v7 works with Mud7 and after. No support for v6 and before versions.
.NET 6 Support Ended
MudExtensions v7 doesn't support .NET 6 any longer (the same on MudBlazor v7). Please migrate at least .NET 7 (.NET 8 is strongly recommended)
MudExtensions.Enums Namespace Removed
There will be no MudExtensions.Enums namespace, so you can use enums easier. If you have some @using MudExtensions.Enums
statements, you need to remove them.
Stepper is now StepperExtended
MudBlazor core will have it's own Stepper component. So this extension component has Extended
suffix into it's name.
General Parameter Name Changes
- All
DisableSomething
parameters changed toShowSomething
orEnableSomething
and values are inverted. - All
ClassSomething
andStyleSomething
parameters changed toSomethingClass
andSomethingStyle
Obsoleted Parameters Removed
Described parameters removed.
MudCodeInput
- ClassInput (Use InputClass instead)
MudCsvMapper
- Delimter (Use Delimiter instead)
MudListItemExtended
- Command
- CommandParameter
MudSelectExtended
- Direction
- OffsetX (Use AnchorOrigin and TransformOrigin instead)
- OffsetY
- ClearAsync (Use Clear instead)
- DisableSelectedItemStyle (Use EnableSelectedItemStyle instead)
- DisablePopoverPadding (Use EnablePopoverPadding instead)
MudSplitter
- StyleContent (Use ContentStyle instead)
- StyleBar (Use BarStyle)
MudStepper
- PreventStepChange (Use PreventStepChangeAsync instead)
I am testing converting our large application to MB v7 (prerelease 3) and MBE v7 (prerelease 2). I am receiving the following error. (I believe this is because MudButton now has a Title property):
The type 'MudExtensions.MudLoadingButton' declares more than one parameter matching the name 'title'. Parameter names are case-insensitive and must be unique.
I am testing converting our large application to MB v7 (prerelease 3) and MBE v7 (prerelease 2). I am receiving the following error. (I believe this is because MudButton now has a Title property):
The type 'MudExtensions.MudLoadingButton' declares more than one parameter matching the name 'title'. Parameter names are case-insensitive and must be unique.
AndForget changed on preview 3, we should also changed the method to new one.
Didn't see the change of Title parameter on latest preview, but will look ofc
Here's the change:
MudBlazor/MudBlazor#8630
Edit:
Tested just removing the property from MudLoadingButton and it worked perfectly fine. Opened a pull request #396
@gabephudson thanks for info. This is a missing thing on first preview. This only occurs on Text variant, you can use other variants as workaround. Already fixed, will come with next preview.
@mckaragoz, just wanted to see if the extensions team had a release date in mind for v7?
Is the v7 RC1 release good to go with MB v7.0+?
@mckaragoz, just wanted to see if the extensions team had a release date in mind for v7?
Is the v7 RC1 release good to go with MB v7.0+?
Yes it completely compatible with Mud7, will only add little features and release the extension v7 in couple of days
@mckaragoz , we have completed our conversion to MB v7.2 using MudExtensions v7 RC1. :)
One issue we discovered is when using a MudLoadingButton as the "ActivatorContent" of the v7 MudBlazor file upload control, it will trigger a loop where the file upload dialog immediately shows again after selecting a file.
This was a known issue in MBv7 if one left the HtmlTag="label" in a MudButton, but this tag is not present in our code using a MudLoading Button.
This was a known issue in MBv7 if one left the HtmlTag="label" in a MudButton, but this tag is not present in our code using a MudLoading Button.
Doesn't understand, do we know how we can fix?
Apologize for the confusion. Basically, using a MudLoadingButton for a MudFileUpload activator worked in v6 and does not in v7. The button will trigger an upload dialog when clicked, but after selecting a file, the upload dialog will appear again instead of the upload event firing.
This is certainly caused by changes in how the FileUpload works in MudBlazor v7, however, I am not sure what the issue might be, since a LoadingButton is just a wrapper for a MudButton. Just wanted to point this out in case it can be fixed.
Works in MB v6
<MudFileUpload T="IBrowserFile" FilesChanged="UploadFiles">
<ButtonTemplate>
<MudLoadingButton HtmlTag="label" for="@context.Id" @bind-Loading="_busy" ButtonVariant="ButtonVariant.Button"
Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.CloudUpload">Upload</MudLoadingButton>
</ButtonTemplate>
</MudFileUpload>
Does not work in MB v7, Ext v7 RC1
<MudFileUpload T="IBrowserFile" FilesChanged="UploadFiles">
<ActivatorContent>
<MudLoadingButton @bind-Loading="_busy" ButtonVariant="ButtonVariant.Button"
Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.CloudUpload">Upload</MudLoadingButton>
</ActivatorContent>
</MudFileUpload>
@gabephudson try to set AutoDelay to 0 or null on loading button
@gabephudson try to set AutoDelay to 0 or null on loading button
Unfortunately, setting AutoDelay to any value (null, 0, 500) had no impact on this behavior. The button will trigger the file dialog, after a file selection occurs the file selection dialog will re-appear, and after one selects the file again, then the upload event will fire/proceed.
Again, this is likely an issue with the new MudBlazor v7 ActivatorContent logic, but I am not sure what (not sure what was changed in this regard) and if it can even be addressed directly by MudExtensions.
It's not critical, as one can just switch to a standard MudButton. Here is an example of working markup in MB v7...
<MudFileUpload Class="flex-grow-0 mb-4" T="IBrowserFile" FilesChanged="(IBrowserFile browserFile)=>Upload(browserFile)" Style="margin:0;">
<ActivatorContent>
<MudButton Disabled="@_working" Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.CloudUpload">
@if (_working)
{
<span class="mr-2">Uploading</span>
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate />
}
else
{
<span>Upload</span>
}
</MudButton>
</ActivatorContent>
</MudFileUpload>