ux: eliminate white-flash on Blazor navigation from Inquiry page
TaxBaik CI/CD / build-and-deploy (push) Successful in 50s
TaxBaik CI/CD / build-and-deploy (push) Successful in 50s
- App.razor: loading overlay starts with `show` class (visible on cold load) - admin-session.js: add showLoading()/hideLoading(); MutationObserver detects .admin-page-hero / .admin-login-page instead of mud-element count threshold; observer restarts on every navigation cycle via LocationChanged - MainLayout.razor: subscribe to NavigationManager.LocationChanged → call JS showLoading() on every route change; implements IDisposable - InquiryList.razor: remove unused IInquiryRepository injection; load data once (GetPagedAsync(1,200)) and pass IReadOnlyList to all six tab panels - InquiryTable.razor: accept Inquiries parameter; filter synchronously in OnParametersSet() — eliminates 6 redundant API calls per page visit - admin.css: overlay fade-in animation (0.15s); page content fade-in on route mount via .admin-page-hero / .admin-login-page animation (0.25s) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
@using TaxBaik.Web.Services
|
||||
@inject IInquiryBrowserClient InquiryClient
|
||||
|
||||
<MudSimpleTable Striped="true" Dense="true" Class="admin-table mt-4">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -37,24 +34,19 @@
|
||||
</MudSimpleTable>
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired]
|
||||
public IReadOnlyList<Domain.Entities.Inquiry> Inquiries { get; set; } = [];
|
||||
|
||||
[Parameter]
|
||||
public string Status { get; set; } = "";
|
||||
|
||||
private List<Domain.Entities.Inquiry> inquiries = [];
|
||||
private List<Domain.Entities.Inquiry> filteredInquiries = [];
|
||||
private IReadOnlyList<Domain.Entities.Inquiry> filteredInquiries = [];
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var (items, _) = await InquiryClient.GetPagedAsync(1, 100);
|
||||
inquiries = items.ToList();
|
||||
FilterInquiries();
|
||||
}
|
||||
|
||||
private void FilterInquiries()
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
filteredInquiries = string.IsNullOrEmpty(Status)
|
||||
? inquiries
|
||||
: inquiries.Where(x => x.Status == Status).ToList();
|
||||
? Inquiries
|
||||
: Inquiries.Where(x => x.Status == Status).ToList();
|
||||
}
|
||||
|
||||
private static string GetPreview(string message)
|
||||
@@ -77,9 +69,4 @@
|
||||
};
|
||||
|
||||
private static string GetStatusLabel(string status) => InquiryStatusMapper.Labels.GetValueOrDefault(status, status);
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
FilterInquiries();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user