Skip to content

Fix clipped graph controls and hide the game in the previous dashboard - #22264

Merged
Sébastien Ros (sebastienros) merged 3 commits into
mainfrom
sebros/graph-controls-clipped-dashboard-ca20ac
Nov 13, 2026
Merged

Sébastien Ros (sebastienros) merged 3 commits into
mainfrom
sebros/graph-controls-clipped-dashboard-ca20ac

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

In the previous dashboard experience, the resource graph controls (export, zoom in, zoom out, reset) were clipped by the bottom of the viewport and couldn't be clicked.

The graph sized its SVG viewBox from .resources-summary-layout. On the new overview that element contains only the graph, but on the previous experience's Resources page it also contains the tab header row. The SVG had no CSS height, so it took its height from the viewBox aspect ratio (the full layout height) while being placed below the header. The graph area ended about 50px below the viewport, and .resource-tabs { overflow: hidden } clipped the bottom-anchored controls. Before #21412 a hard-coded clientHeight - 50 hid this; that offset was removed when the graph moved to the overview.

Changes:

  • Previous experience CSS: the SVG fills its container (width/height: 100%), and the container uses min-height: 0; overflow: hidden so it stays inside its 1fr grid row.
  • app-resourcegraph.js: size the viewBox from the graph's own container (.resource-graph-container) instead of the surrounding layout, and observe that element for resizes. Skip resizing while the graph is hidden, and fit the initial graph the first time it has a size, so a graph first shown from another tab isn't fitted to a zero-size box.

This PR also hides the Aspire Outage game from the previous experience's graph. The game is a feature of the new dashboard's overview graph. The previous experience's Resources page no longer renders the Play button or exposes the game's interop method, and it passes no game strings (GraphIconsDto.Game is now nullable), so app-resourcegraph.js doesn't attach the game there and the O key stays with the dashboard's global shortcuts.

Fixes #21858

Screenshots

This PR includes UI changes. Both graph layouts with the fix, showing the controls fully visible at the bottom right. The previous experience no longer shows the game's Play button at the bottom left; the new dashboard keeps it.

Previous experience (Resources → Graph) New dashboard (Overview → Graph)
Previous experience resource graph with controls visible and no game button New dashboard overview graph with controls visible

Validation

Manually verified with playground/TestShop at a 768px-high viewport:

  • Previous experience, Graph tab: before the fix the graph container ended at 822px and the controls sat at 764–792px (clipped). After the fix the container ends at 768px, the controls sit at 710–738px, and the viewBox matches the SVG's rendered size.
  • Zoom in and Reset change and restore the graph transform.
  • Loading the previous experience on the Resources tab and then switching to Graph fits the graph the same way as loading the Graph tab directly.
  • New dashboard overview graph, which starts hidden behind Summary, still fits correctly when shown and its controls are visible.
  • Previous experience graph has no .graph-game button, and pressing O on the focused graph doesn't open the game. The new overview still has the Play button, which opens the game; Escape closes it.
  • Aspire.Dashboard.Components.Tests ResourcesTests and ApplicationSummaryTests: 76 passed.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

The resource graph sized its SVG viewBox from .resources-summary-layout. On the
previous experience's Resources page that element also contains the tab header,
and the SVG had no CSS height, so it took the full layout height from its
viewBox and pushed the bottom-anchored graph controls below the clipped edge of
.resource-tabs.

Size the SVG with CSS to fill its container, and measure and observe the
graph's own container instead of the page layout. Skip resizing while the graph
is hidden, and fit the initial graph the first time it has a size.

Fixes #21858
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22264

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22264"

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 13, 2026 16:58
@github-actions

This comment has been minimized.

The game is a feature of the new dashboard's overview graph. Remove its Play
button and interop method from the previous experience's Resources page, and
pass no game strings there so the graph script doesn't attach the game or take
the O key from the dashboard's global shortcuts.
@sebastienros Sébastien Ros (sebastienros) changed the title Fix clipped resource graph controls in the previous dashboard Fix clipped graph controls and hide the game in the previous dashboard Nov 13, 2026
@sebastienros

Copy link
Copy Markdown
Contributor Author

/backport to release/17.0

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 shared graph sizing change creates a resize feedback loop on the standalone page that pushes controls out of view, and the new deferred initial-fit behavior lacks regression tests.

2 open issues
What changed in this PR

Fixes clipped resource graph controls in the previous dashboard by sizing the graph to its own container rather than the surrounding layout.

Changes:

  • Constrains the legacy graph container and explicitly sizes its SVG to keep controls within the viewport.
  • Measures and observes the graph container, deferring initial fitting until a hidden graph becomes visible.
File Description
src/​Aspire.Dashboard/​wwwroot/​js/​app-resourcegraph.js Uses container dimensions for resizing and defers fitting until measurable.
src/​Aspire.Dashboard/​Components/​Legacy/​Pages/​Resources.razor.css Constrains graph height and makes the SVG fill its container.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

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

The deferred initial-fit behavior lacks regression coverage verifying that fitting stays pending while hidden, succeeds when visible, and preserves user zoom on subsequent resizes.

2 open issues

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Apply the same constrained container and explicit SVG sizing to the new
experience's Resources component, which also hosts the graph. Without it the
SVG would be sized by the viewBox the script derives from its own container,
a resize feedback loop.

Extend the ResourceGraph JavaScript tests to cover the initial fit waiting for
a sized viewport, the first visible resize fitting the graph, later resizes
keeping the user's zoom, and a hidden graph keeping its last viewBox.
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

14 / 101 PR test projects · 2 PR jobs, from 7 changed files.

Selected PR test projects (14 / 101)

Aspire.Dashboard.Components.Tests, Aspire.Dashboard.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests, Aspire.Templates.Tests, Infrastructure.Tests

Selected PR jobs (2)

extension-e2e, native-dashboard-validation


How these were chosen — grouped by what changed

⚠️ 10 of the 14 selected test projects come from a single change — src/Aspire.Dashboard/Components/Legacy/Pages/Resources.razor.

🔧 src/Aspire.Dashboard/Components/Legacy/Pages/Resources.razor (changed source)
→ 10 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests (3 hops), Aspire.Hosting.Azure.Tests (2 hops), Aspire.Hosting.Blazor.Tests (2 hops), Aspire.Hosting.Dotnet.Tests (2 hops), Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Radius.Tests (2 hops), Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests (2 hops)

🔧 src/Aspire.Dashboard/wwwroot/js/app-resourcegraph.js (changed source)
→ 1 directly: Infrastructure.Tests
→ 1 via the project graph: Aspire.Dashboard.Tests

🧪 tests/Aspire.Dashboard.Components.Tests/JavaScript/ResourceGraph.test.mjs (changed test)
→ 2 directly: Aspire.Dashboard.Components.Tests, Infrastructure.Tests

📦 affected project Aspire.Dashboard
→ 1 test: Aspire.Templates.Tests

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Dashboard/Components/Legacy/Pages/Resources.razor, src/Aspire.Dashboard/Components/Legacy/Pages/Resources.razor.cs, src/Aspire.Dashboard/Components/Legacy/Pages/Resources.razor.css, src/Aspire.Dashboard/Components/Pages/Resources.razor.css, src/Aspire.Dashboard/Model/ResourceGraph/IconDto.cs, src/Aspire.Dashboard/wwwroot/js/app-resourcegraph.js
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard

Selection computed for commit 9c27d42.

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.

🟢 Approval recommended

No active review issues are recorded for these changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@sebastienros
Sébastien Ros (sebastienros) merged commit 8e63008 into main Nov 13, 2026
162 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.1 milestone Nov 13, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #2144

Generated by PR Documentation Check · copilot · auto · 20 AIC · ⌖ 1.16 AIC · ⊞ 7.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#2144 targeting release/17.0.

No gating signals fired (docs_optional), but the PR changes user-visible behavior of a documented feature: the Aspire Outage game is removed from the Previous dashboard graph. Updated dashboard/explore.mdx to say the game is only in the new dashboard Overview graph.

Note

This draft PR needs human review before merging.

Maddy Montaquila (maddymontaquila) pushed a commit to microsoft/aspire.dev that referenced this pull request Nov 13, 2026
Documents changes from microsoft/aspire#22264 by ``@sebastienros``.

Targeting `release/17.0`, the latest release branch on
`microsoft/aspire.dev`, because `release/17.1` (from the source PR
milestone `17.1`) does not exist there (`target_resolution`:
`latest_release_fallback`).

**Why:** The source PR hides the Aspire Outage game from the Previous
dashboard's Resources graph. The game now exists only in the new
dashboard's Overview graph. The docs previously said the Graph view
includes the game without qualification.

**Changes (updated page):**
- `src/frontend/src/content/docs/dashboard/explore.mdx`: the Aspire
Outage section now states that the game is available only on the new
dashboard's Overview graph, not in the Previous dashboard experience.

No deterministic signals fired; this was drafted for the user-visible
behavior change to a documented feature.

> Generated by [PR Documentation
Check](https://github.com/microsoft/aspire/actions/runs/43478281003) for
#22264 · copilot · auto · 20 AIC · ⌖ 1.16 AIC · ⊞ 7.4K ·
[◷](https://github.com/search?q=repo%3Amicrosoft%2Faspire.dev+%22gh-aw-workflow-id%3A+pr-docs-check%22&type=pullrequests)

<!-- gh-aw-agentic-workflow: PR Documentation Check, engine: copilot,
model: auto, id: 43478281003, workflow_id: pr-docs-check, run:
https://github.com/microsoft/aspire/actions/runs/43478281003 -->

<!-- gh-aw-workflow-id: pr-docs-check -->
<!-- gh-aw-workflow-call-id: microsoft/aspire/pr-docs-check -->

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
@sebastienros

Copy link
Copy Markdown
Contributor Author

/backport to release/17.0

@github-actions

Copy link
Copy Markdown
Contributor

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

Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 13, 2026
…evious dashboard (#22268)

Backport of #22264 to release/17.0

/cc @sebastienros

## Customer Impact

## Testing

## Risk

## Regression?

---------

Co-authored-by: Sébastien Ros <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AspireE2E][Old Dashboard] Graph controls are clipped at the bottom and all buttons are inaccessible for Aspire 17.0

4 participants