Skip to content

Keep Blazor Weather table scrolling within the page - #70021

Merged
ilonatommy merged 5 commits into
dotnet:mainfrom
dariatiurina:dariatiurina-weather-page-narrow-reflow
Oct 27, 2026
Merged

ilonatommy merged 5 commits into
dotnet:mainfrom
dariatiurina:dariatiurina-weather-page-narrow-reflow

Conversation

@dariatiurina

@dariatiurina dariatiurina commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

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-responsive container, 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

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]>
@github-actions github-actions Bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Oct 23, 2026
@dariatiurina dariatiurina self-assigned this Oct 23, 2026
Keep the narrow viewport fix focused on table-local scrolling.

Co-authored-by: Copilot App <[email protected]>
@dariatiurina
dariatiurina marked this pull request as ready for review October 26, 2026 13:48
@dariatiurina
dariatiurina requested a review from a team as a code owner October 26, 2026 13:48
@dariatiurina
dariatiurina requested review from ilonatommy and a balanced review from Copilot October 26, 2026 13:48

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.

🟡 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

@ilonatommy ilonatommy added the feature-accessibility This issue has accessibility impact label Oct 26, 2026
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]>
@ilonatommy
ilonatommy enabled auto-merge (squash) October 27, 2026 09:04
@ilonatommy

Copy link
Copy Markdown
Member

/ba-g IIS failures are not connected

@ilonatommy
ilonatommy merged commit d0eb43e into dotnet:main Oct 27, 2026
27 of 29 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

✅ 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

  • Conceptual article: Not required — Template Weather page markup wrapped in Bootstrap table-responsive for narrow viewports; docs don't describe this markup.
  • Migration guidance: Not required — No upgrade action needed; generated pages only.
  • Breaking change: Not required — No API, configuration, or default change; existing apps unaffected.

@ilonatommy

Copy link
Copy Markdown
Member

/backport to release/11.0

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

@ilonatommy backporting to release/11.0 failed, the patch most likely resulted in conflicts. Please backport manually!

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

Link to workflow output

@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 4, 2026
wtgodbe pushed a commit that referenced this pull request Nov 6, 2026
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]>

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 435dd0ec Deployed Oct 27, 2026 by ilonatommy via conclusion #105
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 feature-accessibility This issue has accessibility impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants