Skip to content

feat: Identity app support (auth blocks, sidebar account menu, static /Account pages) - #40

Merged
Shewart merged 4 commits into
mainfrom
feat/identity-apps
Oct 3, 2026
Merged

Shewart merged 4 commits into
mainfrom
feat/identity-apps

Conversation

@Shewart

@Shewart Shewart commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes ShellUI work with Blazor apps created with --auth Individual.

  • Fix: Identity pages returned Not Found after init. init set <Routes> to InteractiveServer for every page, but the Identity pages are excluded from interactive routing because they set sign-in cookies. In Identity apps, init now uses a PageRenderMode that renders /Account statically and everything else with InteractiveServer (the .NET 8 template's approach; compiles on .NET 8, 9 and 10).
  • Sidebar account menu. Adding a dashboard to an Identity app also installs the hidden sidebar-account component and swaps AppSidebar's placeholder user footer for it: Log in and Register when signed out, the user (linking to Account/Manage) and Log out when signed in. A customized footer is left alone.
  • Auth blocks, like shadcn's login blocks: shellui add auth-01 (centered card), auth-02 (split screen with a brand panel), auth-03 (minimal form). Adding one:
    • sets @layout in Components/Account/Pages/_Imports.razor, so sign-in, sign-up and recovery pages render without the dashboard sidebar; the Manage pages keep the app layout. Adding another auth block switches to it.
    • restyles the Identity pages that are unchanged from dotnet new blazor (checked against all 41 stock files for .NET 8, 9 and 10 across every interactivity option, any project name), mapping Bootstrap classes to ShellUI's button, input and alert styles. Edited pages are listed, not changed. Columns use container queries, so they stack inside a narrow card and on phones.
  • init no longer restyles or flags the Identity pages; it prints a hint naming the auth blocks.
  • Comments: multi-line // comments shortened to single lines.

Tests and CI

  • New AccountPagesTests and AuthSetupTests, plus cases for the static render mode, the footer swap and Identity detection.
  • CI creates an --auth Individual app, runs init --dashboard 02 and add auth-01, checks the wiring and builds it.
  • Docs: CLI reference "Auth layouts" section; registry counts 243 entries, 93 direct, 150 hidden.

Verification

  • dotnet build 0 warnings, 298 tests pass.
  • .NET 10 in the browser:
    • With the dashboard: register, confirm email, log in, account pages and log out all work, and the sidebar footer switches between signed-out and signed-in.
    • auth-01 and auth-02 on desktop, and auth-01 at 375px with no horizontal overflow.
  • .NET 8 with auth-02, .NET 9 with auth-03, and .NET 10 with Auto interactivity build clean with a hyphenated app name (my-app), with no Bootstrap classes left.

Shewatipa Tseisi added 4 commits October 3, 2026 15:50
…ity apps

Adding a dashboard to an app that uses ASP.NET Core Identity also installs the hidden sidebar-account component and swaps AppSidebar's placeholder user footer for it. Signed out it shows Log in and Register; signed in, the user (linking to Account/Manage) and Log out. A customized footer is left alone.
init set <Routes> to InteractiveServer for every page, but the Identity pages are excluded from interactive routing because they set sign-in cookies, so every /Account page returned Not Found. In Identity apps, init now uses a PageRenderMode that renders /Account statically and everything else with InteractiveServer, the same approach as the .NET 8 template.
Three layout blocks for the sign-in, sign-up and account recovery pages: a centered card, a split screen and a minimal form. Adding one sets @layout in Components/Account/Pages/_Imports.razor (the Manage pages keep the app layout) and restyles the Identity pages that are unchanged from dotnet new blazor on .NET 8, 9 and 10, mapping Bootstrap classes to ShellUI's button, input and alert styles. Edited pages are listed, not changed. init no longer flags these pages as needing a restyle; it points to the blocks instead.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 14:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Shewart
Shewart merged commit 37aa18c into main Oct 3, 2026
1 check passed
@Shewart
Shewart deleted the feat/identity-apps branch October 3, 2026 14:42
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.

2 participants