Skip to content

Fix account-name overflow in web templates - #70346

Merged
ilonatommy merged 1 commit into
dotnet:mainfrom
ilonatommy:ilonatommy-identity-overflow-fix
Nov 6, 2026
Merged

ilonatommy merged 1 commit into
dotnet:mainfrom
ilonatommy:ilonatommy-identity-overflow-fix

Conversation

@ilonatommy

@ilonatommy ilonatommy commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Allow authenticated account names to wrap in generated web templates.

Description

Long account identifiers must fit the available width without losing text. Enable wrapping and let containers grow, rather than imposing fixed widths or truncating names. Covers Blazor, standalone WebAssembly, MVC and Razor Pages account displays; no framework changes.

Existing BlazorServerIdentityAccessibilityTests and RazorPagesIdentityAccessibilityTests in dotnet/aspnetcore-scenario-tests provide the test coverage.
Local browser reproduction is verified before/after.

Before (Blazor, 375px viewport): the account name causes horizontal overflow.

identity-before.webm

After: the full account name wraps without horizontal overflow.

identity-after.webm

Fixes dotnet/aspnetcore-scenario-tests#166

@github-actions github-actions Bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Nov 6, 2026
@ilonatommy ilonatommy self-assigned this Nov 6, 2026
@ilonatommy ilonatommy added area-identity Includes: Identity and providers feature-accessibility This issue has accessibility impact labels Nov 6, 2026
@ilonatommy
ilonatommy marked this pull request as ready for review November 6, 2026 11:07
@ilonatommy
ilonatommy requested a review from a team as a code owner November 6, 2026 11:07
Copilot AI balanced review requested due to automatic review settings November 6, 2026 11:07
@ilonatommy
ilonatommy enabled auto-merge (squash) November 6, 2026 11:10

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.

🔵 Needs a closer look

Responsive layout changes require browser validation across template variants, but the source-only review could not independently confirm wrapping, overflow behavior, or cited test coverage.

No open issues 🎉

What changed in this PR

Updates generated web templates so long authenticated account names can wrap without truncation, with containers able to grow vertically. Changes are limited to templates; framework behavior is unchanged.

Changes:

  • Enables account-name wrapping in MVC and Razor Pages authentication displays.
  • Allows standalone WebAssembly greetings to wrap and the header to grow.
  • Updates Blazor authentication pages and navigation to accommodate multiline names while preserving the account icon.

Paths below are relative to src/ProjectTemplates/Web.ProjectTemplates/content/.

File Description
StarterWeb-CSharp/​Views/​Shared/​_LoginPartial.OrgAuth.cshtml Enables wrapping for organizational account names.
StarterWeb-CSharp/​Views/​Shared/​_LoginPartial.Identity.cshtml Enables wrapping for Identity account names.
StarterWeb-CSharp/​Views/​Shared/​_Layout.cshtml Enables wrapping for Windows authentication greetings.
RazorPagesWeb-CSharp/​Pages/​Shared/​_LoginPartial.OrgAuth.cshtml Enables wrapping for organizational account names.
RazorPagesWeb-CSharp/​Pages/​Shared/​_LoginPartial.Identity.cshtml Enables wrapping for Identity account names.
RazorPagesWeb-CSharp/​Pages/​Shared/​_Layout.cshtml Enables wrapping for Windows authentication greetings.
ComponentsWebAssembly-CSharp/​Layout/​MainLayout.razor.css Replaces fixed header height with minimum height.
ComponentsWebAssembly-CSharp/​Layout/​LoginDisplay.razor Allows long greetings to break anywhere.
BlazorWeb-CSharp/​BlazorWebCSharp.1/​Components/​Pages/​Auth.razor Wraps authenticated greeting text.
BlazorWeb-CSharp/​BlazorWebCSharp.1/​Components/​Layout/​NavMenu.razor Supports multiline account links and prevents icon shrinking.
BlazorWeb-CSharp/​BlazorWebCSharp.1.Client/​Pages/​Auth.razor Wraps authenticated greeting text in the client page.

Review effort: Balanced

@ilonatommy
ilonatommy merged commit a5c12ac into dotnet:main Nov 6, 2026
42 of 44 checks passed
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 15%

No docs needed: a visual bug fix to generated template account-name display with no API, default, or configuration change.

Documentation surfaces considered

  • Conceptual article: Not required — Template signals are cosmetic wrapping markup/CSS (e.g., text-break div in Auth.razor); no documented behavior changes.
  • Migration guidance: Not required — No action needed by users upgrading.
  • Breaking change: Not required — No compatibility impact.

@ilonatommy

Copy link
Copy Markdown
Member Author

/backport to release/11.0

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

wtgodbe pushed a commit that referenced this pull request Nov 6, 2026
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 8, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — dafbf36f Deployed Nov 6, 2026 by ilonatommy via conclusion #205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI area-identity Includes: Identity and providers feature-accessibility This issue has accessibility impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants