Repository navigation
Keep Blazor Weather table scrolling within the page - #70021
ilonatommy merged 5 commits into
Conversation
Preserve forecast table content and desktop layout while preventing narrow viewport document overflow. Add one generated standalone WebAssembly regression test. Co-authored-by: Copilot App <[email protected]>
Keep the narrow viewport fix focused on table-local scrolling. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The new test must honor the disabled-Chromium configuration to avoid failures in Linux and macOS CI.
1 open issue
What changed in this PR
This PR confines narrow-screen Weather table scrolling to the table container in the Blazor Web and standalone WebAssembly templates, preserving forecast content and native table semantics.
Changes:
- Wraps both tables in named, keyboard-focusable Bootstrap responsive containers.
- Adds one standalone WebAssembly regression test checking document width at 320px after all five forecast rows load.
- Updates an existing table selector to accommodate the wrapper.
| File | Description |
|---|---|
| src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Pages/Weather.razor | Adds the responsive container to standalone WebAssembly Weather. |
| src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Pages/Weather.razor | Adds the equivalent container to Blazor Web Weather. |
| src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs | Adds the narrow-viewport regression test. |
| src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs | Adjusts the forecast-row selector for the wrapper. |
Review effort: Balanced
Use the existing browser-parameter and availability-guard pattern before creating the generated project. Co-authored-by: Copilot App <[email protected]>
Share the generated-page reflow assertion between standalone WebAssembly and Blazor Web regression tests. Co-authored-by: Copilot App <[email protected]>
|
/ba-g IIS failures are not connected |
|
✅ No documentation PR was created. Confidence that documentation is needed: 20% No docs needed: minor template UI/accessibility polish with a regression test; no user-facing API or configuration change. Documentation surfaces considered
|
|
/backport to release/11.0 |
|
Started backporting to |
|
@ilonatommy backporting to git am output$ git cherry-pick d0eb43e3a128b317b2a8ab27180262b3c133a2bd
Auto-merging src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs
Auto-merging src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs
Auto-merging src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs
CONFLICT (content): Merge conflict in src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs
error: could not apply d0eb43e3a1... Keep Blazor Weather table scrolling within the page (#70021)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Confine Blazor Weather table overflow to an accessible scroll region
Applying: Remove custom Weather table focus styling
Applying: Respect disabled browsers in Weather reflow test
Applying: Cover narrow Weather pages in both Blazor templates
Using index info to reconstruct a base tree...
M src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs
M src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs
M src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs
Falling back to patching base and 3-way merge...
Auto-merging src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs
Auto-merging src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs
Auto-merging src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs
CONFLICT (content): Merge conflict in src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0004 Cover narrow Weather pages in both Blazor templates
Error: The process '/usr/bin/git' failed with exit code 128 |
Backport of #70021. Preserve release-specific passkey test attributes while adding the original Weather overflow fix and regression tests. Co-authored-by: Copilot App <[email protected]>

Keep Blazor Weather table scrolling within the page
Keep narrow Weather table overflow local without shrinking or removing content.
Description
Generated Blazor Server and standalone WebAssembly Weather pages overflow the document at a 320 CSS px viewport. Their native tables need more space than the 272px available inside the article padding, producing document widths of 335px and 324px respectively.
Wrap each table in Bootstrap's existing
table-responsivecontainer, named "Weather forecasts" and keyboard-focusable, with an explicit focus-visible outline. This preserves native table semantics, forecast data, 16px text, and desktop geometry while confining narrow horizontal scrolling to the table. The region remains an extra keyboard stop at desktop widths. This is a page-scrolling improvement, not a claim that the original table necessarily violated WCAG 1.4.10, which includes a two-dimensional table exception.Add exactly one focused regression test using the existing generated standalone WASM Weather component and ProjectTemplates publishing/Gateway harness. It waits for all five real JSON-loaded rows at 320px and checks document width. Update the existing directly coupled table selector for the wrapper; otherwise preserve existing tests.
Validation
Validation used Windows x64 and Chromium. Server, keyboard, and wider-viewport checks are diagnostic evidence rather than a permanent test matrix. Other browsers, screen-reader speech, cultures, and all authentication/interactivity permutations were not verified. The full repository build encountered an unrelated native-AOT linker failure; required local package/runtime producers were completed separately, and no full-build success is claimed.
Fixes dotnet/aspnetcore-scenario-tests#168