Repository navigation
Fix clipped graph controls and hide the game in the previous dashboard - #22264
Sébastien Ros (sebastienros) merged 3 commits into
Conversation
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
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22264Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22264" |
This comment has been minimized.
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.
|
/backport to release/17.0 |
There was a problem hiding this comment.
🟡 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
|
Started backporting to |
This comment has been minimized.
This comment has been minimized.
|
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.
Tests selector14 / 101 PR test projects · 2 PR jobs, from 7 changed files. Selected PR test projects (14 / 101)
Selected PR jobs (2)
How these were chosen — grouped by what changed
🔧 🔧 🧪 📦 affected project Job reasons
Selection computed for commit |
|
Pull request created: #2144
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#2144 targeting 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 Note This draft PR needs human review before merging. |
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>
|
/backport to release/17.0 |
|
Started backporting to |
…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]>


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
viewBoxfrom.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 theviewBoxaspect 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-codedclientHeight - 50hid this; that offset was removed when the graph moved to the overview.Changes:
width/height: 100%), and the container usesmin-height: 0; overflow: hiddenso it stays inside its1frgrid row.app-resourcegraph.js: size theviewBoxfrom 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.Gameis now nullable), soapp-resourcegraph.jsdoesn't attach the game there and the O key stays with the dashboard's global shortcuts.Fixes #21858
Screenshots
Validation
Manually verified with
playground/TestShopat a 768px-high viewport:viewBoxmatches the SVG's rendered size..graph-gamebutton, 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.TestsResourcesTestsandApplicationSummaryTests: 76 passed.Checklist
<remarks />and<code />elements on your triple slash comments?