Skip to content

feat: retire IdentityPageTitle and route confirm dialogs via ConfirmService#123

Merged
andregoepel merged 1 commit into
mainfrom
feature/dialogs-pagetitle-design-system
Jul 19, 2026
Merged

feat: retire IdentityPageTitle and route confirm dialogs via ConfirmService#123
andregoepel merged 1 commit into
mainfrom
feature/dialogs-pagetitle-design-system

Conversation

@andregoepel

Copy link
Copy Markdown
Owner

Final step of the design-system rollout (#113), after the login pages (#122). PR 5 of 5 — closes #113.

Page titles — retire IdentityPageTitle

IdentityPageTitle was a thin local wrapper over the design library's AppPageTitle whose only job was to add the app name as the document-title suffix. AppPageTitle already reads that from DesignBlazorOptions.BrandName, so the wrapper is redundant.

  • AddMartenIdentityBlazor now feeds the host-configured MartenIdentityBlazorOptions.ApplicationName into DesignBlazorOptions.BrandName (bound lazily off IOptions so it picks up the host's configureOptions value).
  • All 33 <IdentityPageTitle Title=… Breadcrumb=… /> become plain <AppPageTitle …>. Output is identical: AppPageTitle composes "{title} – {BrandName}", and BrandName is now the same ApplicationName the wrapper used to pass as Suffix.
  • The component, its now-empty Components/Shared folder, and the dead _Imports using are removed.
  • New regression test (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.Confirm calls now go through ConfirmService.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 keeps DialogService for its Alert/Close calls.

There are zero raw DialogService.Confirm left in the codebase.

Alerts left as-is (deliberate)

ConfirmService is a confirm wrapper — it has no alert method. The remaining DialogService.Alert error-message calls (in the admin dialogs and grids) stay raw. A follow-up can add ConfirmService.AlertAsync and sweep them — task chip filed.

Verification

  • dotnet build: 0 errors, 0 warnings (compiling all 33 swaps proves no IdentityPageTitle reference is left).
  • bUnit suite: 101/101 green (100 + the new wiring test).
  • csharpier: clean.
  • Every field Name and 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).

…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
@andregoepel
andregoepel merged commit c82215b into main Jul 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt shared design-blazor components (design-system consolidation)

1 participant