Repository navigation
Fix dashboard filter badges and toolbar navigation - #20471
James Newton-King (JamesNK) merged 4 commits into
Conversation
Co-authored-by: Copilot <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20471Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20471" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The zero-count badge regression lacks automated component coverage across the affected dashboard pages.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Fixes dashboard filter badge rendering, responsive toolbar layout, and mobile navigation timing.
Changes:
- Hides zero-count filter badges without removing filter controls.
- Allows resource detail toolbars to grow when controls wrap.
- Prevents stale deferred navigation during page navigation or disposal, with regression tests.
| File | Description |
|---|---|
tests/Aspire.Dashboard.Components.Tests/Pages/ResourcesTests.cs |
Tests mobile navigation and disposal behavior. |
src/Aspire.Dashboard/wwwroot/css/layout.css |
Stabilizes badge container layout. |
src/Aspire.Dashboard/Components/Pages/Traces.razor |
Hides empty filter badges. |
src/Aspire.Dashboard/Components/Pages/TraceDetail.razor |
Hides empty badges in trace detail toolbars. |
src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor |
Hides empty filter badges. |
src/Aspire.Dashboard/Components/Pages/IPageWithSessionAndUrlState.cs |
Defers navigation only while the mobile panel is open. |
src/Aspire.Dashboard/Components/Layout/AspirePageContentLayout.razor.cs |
Discards stale callbacks on navigation or disposal. |
src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.css |
Permits wrapped toolbar height growth. |
Co-authored-by: Copilot <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <[email protected]>
This comment has been minimized.
This comment has been minimized.
This removes the scoped flex-wrap rule; at narrow split-pane widths, the search field can extend outside the summary pane. Co-authored-by: Copilot <[email protected]>
Tests selector13 / 99 PR test projects · 2 PR jobs, from 9 changed files. Selected PR test projects (13 / 99)
Selected PR jobs (2)
How these were chosen — grouped by what changed
🔧 📦 affected project 🔧 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
✅ No documentation update needed. Step 5 branch taken: Triggered signals (3): Why no docs update is needed, per signal:
(summary truncated) |
|
/backport to release/13.6 |
|
Started backporting to |
|
James Newton-King (@JamesNK) an error occurred while backporting to |
…0511) Backport of #20471 to release/13.6 /cc @JamesNK ## Description Dashboard filter badges could remain visible with an empty count, narrow resource-details controls could overlap properties, and mobile Resources tab changes could leave navigation queued until the filter panel closed—even after leaving the page. This backport hides zero-count badges without replacing their button, lets narrow controls wrap, and updates the mobile URL immediately unless the filter panel is open. Pending changes are discarded after navigation or disposal. At narrow Structured Logs split-pane widths, the search field can still extend outside the summary pane, as noted on the source PR. ### User-facing usage Disable every filter on Structured Logs, Traces, or Trace Detail to hide the count badge while retaining the Filters button. On mobile Resources, switch to Parameters without opening the filter panel to update the URL to `/?view=Parameters`. ### Screenshots / Recordings > **This PR includes UI changes.** Please add screenshots or screen recordings so reviewers can evaluate the visual changes without running locally. > > - For before/after comparisons, place them side-by-side or label them clearly. > - For interactive changes (animations, transitions, new flows), prefer a short screen recording (GIF or video). > - If you cannot capture visuals now, note what scenario to test and mark this section as TODO. Screenshots from #20471: | Filter enabled | Filter disabled | | --- | --- | |  |  | | Resources toolbar and row actions | Resource details toolbar | | --- | --- | |  |  | Fixes # (issue) ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] 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 - [x] 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 - [x] No ## Customer Impact Empty filter badges can remain visible, narrow toolbar controls can overlap, and mobile Resources tab changes can be delayed until the filter panel closes or navigate after leaving the page. The backport corrects these behaviors. ## Testing On `release/13.6`, 40/40 Resources and dialog-provider tests passed; the source PR also reports browser/Playwright toolbar measurements and manual dashboard checks. ## Risk Medium — shared mobile navigation lifecycle and toolbar CSS affect several Dashboard pages; in a narrow Structured Logs split pane, the search field can still extend outside the summary pane, as noted in the source PR. ## Regression? Yes — confirmed by the requester; the introducing version is not documented.

Description
Dashboard filter badges could remain visible with an empty count when every filter was disabled, and toggling a badge changed toolbar height. In narrow resource details panes, Filter and Options could wrap over the property grid. The Structured Logs clear-menu wrapper could stretch a wrapped toolbar row below its grid track. Also, a mobile Resources tab change could leave a navigation to
/?view=Parametersqueued until the filter panel closed, even when it was not open; a queued navigation could run while the page was being torn down.Filter badges now disappear at zero without replacing the menu button, and their container no longer shifts the toolbar when shown. The resource details toolbar grows to fit wrapped controls. The shared menu-button wrapper now sizes to its button instead of stretching to the parent's full height, so wrapped filter-toolbar rows stay within their grid track. Mobile tab changes update the URL immediately unless the filter panel is open; pending panel changes are discarded on navigation away or disposal rather than navigating from a closing page.
The Structured Logs summary pane no longer has a special wrapping rule for its right-hand toolbar group. At narrow split-pane widths, that group remains on one line and the search field can extend outside the summary pane.
User-facing usage
On Structured Logs, Traces, and Trace Detail, disable every filter to hide the count badge while keeping the Filters button in place. The full-width Structured Logs toolbar still wraps as space permits, but with log details open its right-hand group may extend beyond the narrower summary pane. On Resources, switch to Parameters on mobile without opening the filter panel: the URL updates to
/?view=Parameters. In a narrow resource details pane, the Filter and Options controls wrap without overlapping properties.Screenshots / Recordings
Structured Logs with the same filter enabled, then disabled. The count badge disappears while the Filters button remains:
TestShop at 1024px after removing the global menu-wrapper height:
Validation: browser/Playwright measurements confirmed a constant 48px filter toolbar with no button shift and a resource-details toolbar that expands for wrapped controls. On Structured Logs, enabling and disabling a filter kept the two-row desktop toolbar at 88px while hiding the empty badge and retaining the Filters button. After the global height removal, the live dashboard served the updated CSS; clear-menu, row-action, header run-selector, and detail-pane menu wrappers stayed centered on their buttons, and the Structured Logs clear menu opened correctly. A split-pane experiment at 1024px showed that without the Structured Logs-specific wrapping rule, the search field starts 10px outside the toolbar's left edge when details are open. Resources and dialog-provider component tests passed (40 tests) before the CSS-only follow-ups. The Dashboard Release build passed with zero warnings or errors before the CSS-only follow-ups.
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?