feat: retire IdentityPageTitle and route confirm dialogs via ConfirmService#123
Merged
Merged
Conversation
…ervice Final step of the design-system rollout (#113), after the login pages (#122). Page titles: - Retire the local IdentityPageTitle wrapper. It only added the app name as the document-title suffix; AppPageTitle now reads that from DesignBlazorOptions.BrandName. AddMartenIdentityBlazor feeds the configured ApplicationName into DesignBlazorOptions.BrandName (bound lazily off IOptions), so every <IdentityPageTitle> becomes a plain <AppPageTitle> with identical output ("{title} – {ApplicationName}"). - 33 pages swapped, the component and its now-empty Shared folder / _Imports using removed. Regression test asserts the brand-name wiring. Confirm dialogs: - The last two raw DialogService.Confirm calls (DeletePersonalData, RoleUserDialog) now go through ConfirmService.ConfirmAsync, so no page builds a confirm dialog by hand. DeletePersonalData preserves its "Yes, Delete My Account" / "No, Cancel" button text (E2E depends on it). - DialogService.Alert calls stay: ConfirmService is a confirm wrapper and has no alert method yet — a follow-up can add ConfirmService.AlertAsync and sweep those. Pure presentational/wiring change. Build 0 warnings, bUnit 101 green, csharpier clean. Every field Name and button text preserved. Closes #113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final step of the design-system rollout (#113), after the login pages (#122). PR 5 of 5 — closes #113.
Page titles — retire IdentityPageTitle
IdentityPageTitlewas a thin local wrapper over the design library'sAppPageTitlewhose only job was to add the app name as the document-title suffix.AppPageTitlealready reads that fromDesignBlazorOptions.BrandName, so the wrapper is redundant.AddMartenIdentityBlazornow feeds the host-configuredMartenIdentityBlazorOptions.ApplicationNameintoDesignBlazorOptions.BrandName(bound lazily offIOptionsso it picks up the host'sconfigureOptionsvalue).<IdentityPageTitle Title=… Breadcrumb=… />become plain<AppPageTitle …>. Output is identical:AppPageTitlecomposes"{title} – {BrandName}", andBrandNameis now the sameApplicationNamethe wrapper used to pass asSuffix.Components/Sharedfolder, and the dead_Importsusing are removed.AddMartenIdentityBlazor_FeedsApplicationNameIntoDesignBrandName) asserts the brand-name wiring, so a page title silently losing its suffix can't regress.Confirm dialogs — via ConfirmService
The last two raw
DialogService.Confirmcalls now go throughConfirmService.ConfirmAsync, so no page hand-builds a confirm dialog:DeletePersonalData— keeps its"Yes, Delete My Account"/"No, Cancel"button text (the E2E delete flow clicks it).RoleUserDialog— the "Remove user?" confirm; the dialog keepsDialogServicefor itsAlert/Closecalls.There are zero raw
DialogService.Confirmleft in the codebase.Alerts left as-is (deliberate)
ConfirmServiceis a confirm wrapper — it has no alert method. The remainingDialogService.Alerterror-message calls (in the admin dialogs and grids) stay raw. A follow-up can addConfirmService.AlertAsyncand sweep them — task chip filed.Verification
dotnet build: 0 errors, 0 warnings (compiling all 33 swaps proves noIdentityPageTitlereference is left).Nameand button text preserved, so the Playwright suites (incl. the account-delete confirm flow) still match. E2E runs in CI (local E2E is blocked by the Aspire HTTPS dev cert).Rollout complete
This closes #113. The five PRs (#116 admin grids, #120 passkeys, #121 account forms, #122 login, this) migrate the whole marten-identity Blazor UI onto
AndreGoepel.Design.Blazor. Two small design-blazor enhancements are queued as follow-ups (CardForm destructive submit; FormField label-actions slot; ConfirmService.AlertAsync).