Browse Source
Apply MudBlazor 9 runtime fixes and QA polish
- MudMenu: switch ActivatorContent to MenuContext.ToggleAsync pattern (v9 breaking)
- MudForm: rename Validate to ValidateAsync (v9.1 obsoletion)
- MudInput: replace AutoGrow with Sizing for textarea
- DataGrid: add white-space:nowrap on header to prevent CJK characters stacking vertically
- BlockUI: shrink loading spinner inside mud-dialog
- Search field: switch Label to Placeholder so the text shows next to the magnifier icon
pull/25393/head
maliming
5 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
13 changed files with
47 additions and
22 deletions
framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs
framework/src/Volo.Abp.MudBlazorUI/Components/ObjectExtending/MudTextAreaExtensionProperty.razor
framework/src/Volo.Abp.MudBlazorUI/wwwroot/volo.abp.mudblazorui.css
modules/account/src/Volo.Abp.Account.Blazor.MudBlazor/Pages/Account/AccountManage.razor.cs
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LanguageSwitch.razor
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LanguageSwitch.razor
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor
modules/identity/src/Volo.Abp.Identity.Blazor.MudBlazor/Pages/Identity/UserManagement.razor
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor.MudBlazor/Components/PermissionManagementModal.razor
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor.MudBlazor/Components/ResourcePermissionManagementModal.razor.cs
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor.MudBlazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor.cs
@ -469,7 +469,7 @@ public abstract class AbpMudCrudPageBase<
var isValid = true ;
if ( CreateFormRef ! = null )
{
await CreateFormRef . Validate ( ) ;
await CreateFormRef . ValidateAsync ( ) ;
isValid = CreateFormRef . IsValid ;
}
@ -527,7 +527,7 @@ public abstract class AbpMudCrudPageBase<
var isValid = true ;
if ( EditFormRef ! = null )
{
await EditFormRef . Validate ( ) ;
await EditFormRef . ValidateAsync ( ) ;
isValid = EditFormRef . IsValid ;
}
@ -9,7 +9,7 @@
Label="@PropertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
@bind-Value="@Value"
Lines="3"
AutoGrow="true "
Sizing="InputSizing.Auto "
Disabled="IsReadonlyField"
Validation="@((Func<string?, string?>)Validate)"
Immediate="true" />
@ -57,4 +57,29 @@
. abp-crud-page-header-actions {
display : flex ;
gap : 8px ;
}
}
/ * BlockUI spinner inside mud-dialog : shrink to fit short modal bodies ( e . g . file upload modal ) .
abp . css defines a 150px x 150px spinner via . abp-block-area-busy : before , which gets clipped
by mud-dialog ' s overflow when the modal content is short . * /
. mud-dialog . abp-block-area . abp-block-area-busy : before {
width : 48px ;
height : 48px ;
top : calc ( 50 % - 24px ) ;
left : calc ( 50 % - 24px ) ;
}
. mud-dialog . abp-block-area . abp-block-area-busy : after {
font-size : 12px ;
}
/ * DataGrid header : prevent CJK characters from breaking one-per-line when column is narrow .
v9 column-header is a flex container with flex item width : 100 % ; without nowrap , CJK
( no word boundary ) collapses to min-content = single character width , stacking each
header character vertically . * /
. mud-data-grid . mud-table-cell . column-header . sortable-column-header ,
. mud-data-grid . mud-table-cell . column-header > span : not ( . column-options ) ,
. mud-data-grid . mud-table-head . mud-table-cell {
white-space : nowrap ;
}
@ -59,7 +59,7 @@ public partial class AccountManage
return ;
}
await _ changePasswordForm . Validate ( ) ;
await _ changePasswordForm . ValidateAsync ( ) ;
if ( ! _ changePasswordForm . IsValid )
{
return ;
@ -100,7 +100,7 @@ public partial class AccountManage
return ;
}
await _ personalInfoForm . Validate ( ) ;
await _ personalInfoForm . ValidateAsync ( ) ;
if ( ! _ personalInfoForm . IsValid )
{
@ -9,8 +9,8 @@
@if (_otherLanguages != null && _otherLanguages.Any())
{
<MudMenu>
<ActivatorContent>
<MudIconButton Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" />
<ActivatorContent Context="menuCtx" >
<MudIconButton OnClick="@(async () => await menuCtx.ToggleAsync())" Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" />
</ActivatorContent>
<ChildContent>
<MudMenuItem Disabled="true">@_currentLanguage.DisplayName</MudMenuItem>
@ -14,8 +14,8 @@
<AuthorizeView>
<Authorized>
<MudMenu>
<ActivatorContent Context="menuActivator ">
<MudIconButton Icon="@Icons.Material.Outlined.AccountCircle" Color="Color.Inherit" />
<ActivatorContent Context="menuCtx ">
<MudIconButton OnClick="@(async () => await menuCtx.ToggleAsync())" Icon="@Icons.Material.Outlined.AccountCircle" Color="Color.Inherit" />
</ActivatorContent>
<ChildContent>
<MudMenuItem>
@ -11,8 +11,8 @@
@if (_otherLanguages != null && _otherLanguages.Any())
{
<MudMenu>
<ActivatorContent>
<MudIconButton Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" />
<ActivatorContent Context="menuCtx" >
<MudIconButton OnClick="@(async () => await menuCtx.ToggleAsync())" Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" />
</ActivatorContent>
<ChildContent>
<MudMenuItem Disabled="true">@_currentLanguage.DisplayName</MudMenuItem>
@ -17,8 +17,8 @@
<AuthorizeView>
<Authorized>
<MudMenu>
<ActivatorContent Context="menuActivator ">
<MudIconButton Icon="@Icons.Material.Outlined.AccountCircle" Color="Color.Inherit" />
<ActivatorContent Context="menuCtx ">
<MudIconButton OnClick="@(async () => await menuCtx.ToggleAsync())" Icon="@Icons.Material.Outlined.AccountCircle" Color="Color.Inherit" />
</ActivatorContent>
<ChildContent>
<MudMenuItem>
@ -23,7 +23,7 @@
<MudItem xs="12" sm="8"></MudItem>
<MudItem xs="12" sm="4">
<MudTextField Margin="Margin.Dense" @bind-Value="GetListInput.Filter"
Label ="@L["Search"]"
Placeholder ="@L["Search"]"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search"
Immediate="true"
@ -12,7 +12,7 @@
<MudItem xs="12" sm="8">
<MudTextField Margin="Margin.Dense" Value="@_permissionGroupSearchText"
ValueChanged="@(async ([CanBeNull] string b) => await OnPermissionGroupSearchTextChangedAsync(b))"
Label ="@L["Search"]"
Placeholder ="@L["Search"]"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search"
Immediate="true" />
@ -231,7 +231,7 @@ public partial class ResourcePermissionManagementModal
return ;
}
await _ createFormRef . Validate ( ) ;
await _ createFormRef . ValidateAsync ( ) ;
if ( ! _ createFormRef . IsValid )
{
return ;
@ -266,7 +266,7 @@ public partial class ResourcePermissionManagementModal
return ;
}
await _ editFormRef . Validate ( ) ;
await _ editFormRef . ValidateAsync ( ) ;
if ( ! _ editFormRef . IsValid )
{
return ;
@ -68,7 +68,7 @@ public partial class EmailSettingGroupViewComponent
return ;
}
await _ emailFormRef . Validate ( ) ;
await _ emailFormRef . ValidateAsync ( ) ;
if ( ! _ emailFormRef . IsValid )
{
return ;
@ -132,7 +132,7 @@ public partial class EmailSettingGroupViewComponent
return ;
}
await _ testEmailFormRef . Validate ( ) ;
await _ testEmailFormRef . ValidateAsync ( ) ;
if ( ! _ testEmailFormRef . IsValid )
{
return ;
@ -163,7 +163,7 @@ public partial class TenantManagement
return ;
}
await _ createFormRef . Validate ( ) ;
await _ createFormRef . ValidateAsync ( ) ;
if ( ! _ createFormRef . IsValid )
{
return ;
@ -179,7 +179,7 @@ public partial class TenantManagement
return ;
}
await _ editFormRef . Validate ( ) ;
await _ editFormRef . ValidateAsync ( ) ;
if ( ! _ editFormRef . IsValid )
{
return ;