Repository navigation
Fix account-name overflow in web templates - #70346
Conversation
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🔵 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
|
✅ 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
|
|
/backport to release/11.0 |
|
Started backporting to |
Co-authored-by: Ilona Tomkowicz <[email protected]> Co-authored-by: Copilot App <[email protected]>
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
BlazorServerIdentityAccessibilityTestsandRazorPagesIdentityAccessibilityTestsin 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