Skip to content

Fix inconsistent dashboard action icon colors - #22142

Merged
James Newton-King (JamesNK) merged 2 commits into
mainfrom
jamesnk/dashboard-action-icon-colors
Nov 12, 2026
Merged

James Newton-King (JamesNK) merged 2 commits into
mainfrom
jamesnk/dashboard-action-icon-colors

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Description

Make dashboard grid action icons use the default neutral color instead of the accent color, and prevent shared icons from changing color when rendered elsewhere.

The resource action renderer was calling WithColor on shared, cached icon instances. Rendering overview and sidebar actions could therefore overwrite the color used by another component. This change sets the color on FluentIcon instead of mutating the shared icon.

Resource-grid command and output icons use currentColor, inheriting the buttons' neutral foreground; overflow buttons remain neutral. Resource list and sidebar row actions also use neutral icons, while labeled overview command and overflow icons use the primary color. Existing neutral trace, span, and structured-log grid menus and primary-colored legacy toolbars are unchanged.

Regression coverage checks resolved, default, and unknown-icon fallbacks across sidebar, grid, and overview rendering, including rerendering, without recoloring shared icons.

User-facing usage

Resource-grid command and output icons use the default neutral text color instead of the accent color. Grid overflow icons remain neutral; labeled overview icons and endpoint links use primary styling.

Screenshots / Recordings

This PR includes UI changes. The current TestShop resource grid shows neutral stop, restart, and overflow icons alongside primary-colored endpoint links.

TestShop resource grid with neutral command and overflow-menu icons

Validation

  • Passed: 167 component tests after rebasing, with quarantined and outerloop tests excluded:

    $env:DOTNET_ROOT = 'C:\Development\Source\aspire-review\.dotnet'
    $env:DOTNET_ROOT_X64 = $env:DOTNET_ROOT
    $env:PATH = "$env:DOTNET_ROOT;$env:PATH"
    $env:MSBUILDTERMINALLOGGER = 'false'
    dotnet test --project tests\Aspire.Dashboard.Components.Tests\Aspire.Dashboard.Components.Tests.csproj --no-launch-profile -- --filter-class '*.ResourcesLayoutTests' --filter-class '*.ResourceActionsTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • In the isolated, anonymous TestShop dashboard, Playwright checked that all 66 enabled resource-row action icons matched their button text color. Captured the resource-grid screenshot above.

  • Passed: git diff --check origin/main...HEAD.

Fixes # (issue)

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

@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 -- 22142

Or

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

@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.

🟢 Approval recommended

No active review issues remain for the dashboard icon-color changes.

No open issues 🎉

What changed in this PR

Fixes inconsistent dashboard action icon colors by applying color to components instead of mutating shared, cached icons.

Changes:

  • Sets resource command icons to the primary color without modifying shared icon instances.
  • Applies the primary color consistently to resource and telemetry overflow menus.
  • Adds regression coverage for shared-icon color stability across overview and sidebar rendering.
File Description
tests/​Aspire.Dashboard.Components.Tests/​Layout/​ResourcesLayoutTests.cs Adds a regression test for shared-icon color stability.
src/​Aspire.Dashboard/​Components/​Layout/​ResourcesLayout.razor.css Updates a comment to describe endpoint-link coloring; no CSS behavior changes.
src/​Aspire.Dashboard/​Components/​Layout/​ResourcesLayout.razor Uses component-level command icon colors and primary-colored overflow icons.
src/​Aspire.Dashboard/​Components/​Controls/​TraceActions.razor Sets trace overflow icons to the primary color.
src/​Aspire.Dashboard/​Components/​Controls/​StructuredLogActions.razor Sets structured-log overflow icons to the primary color.
src/​Aspire.Dashboard/​Components/​Controls/​SpanActions.razor Sets span overflow icons to the primary color.
src/​Aspire.Dashboard/​Components/​Controls/​ResourceActions.razor Sets resource overflow icons to the primary color.

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.

@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.

🟡 Changes recommended

Command, output, and overflow icons still inherit neutral foreground colors instead of the intended purple and need explicit component-level primary coloring.

3 open issues

Review effort: Balanced

@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.

🟡 Changes recommended

Active findings identify neutral-color regressions in resource command and output icons, plus missing primary coloring on resource-picker and other overflow-menu triggers.

1 open issue
3 resolved since last review

Review effort: Balanced

@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.

🟢 Approval recommended

No active review issues remain for the component-local icon color changes.

No open issues 🎉

1 resolved since last review

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.

Set icon colors on FluentIcon components instead of mutating shared cached icons. Keep resource and telemetry grid action menus brand-colored and cover shared-icon rerenders.

Co-authored-by: Copilot <[email protected]>
@JamesNK
James Newton-King (JamesNK) force-pushed the jamesnk/dashboard-action-icon-colors branch from 0f4d430 to 9af456f Compare November 12, 2026 22:43
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 12, 2026 22:44
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

13 / 101 PR test projects · 2 PR jobs, from 3 changed files.

Selected PR test projects (13 / 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

Selected PR jobs (2)

extension-e2e, native-dashboard-validation


How these were chosen — grouped by what changed

⚠️ 11 of the 13 selected test projects come from a single change — src/Aspire.Dashboard/Components/Controls/ResourceActions.razor.

🔧 src/Aspire.Dashboard/Components/Controls/ResourceActions.razor (changed source)
→ 11 via the project graph: Aspire.Dashboard.Tests, 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)

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

🧪 tests/Aspire.Dashboard.Components.Tests/Layout/ResourcesLayoutTests.cs (changed test)
→ 1 directly: Aspire.Dashboard.Components.Tests

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Dashboard/Components/Controls/ResourceActions.razor, src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard

Selection computed for commit 9af456f.

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 remain for the component-local icon color changes.

No open issues 🎉

Review effort: Balanced

@JamesNK
James Newton-King (JamesNK) merged commit ebc3bc9 into main Nov 12, 2026
160 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.1 milestone Nov 12, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Branch: docs_optional → bug_fix_restores_documented_behavior (proven false positive; visual-only fix).

Triggered signals: pr_body_has_cli_flag_mention (evidence: the PR body's dotnet test --project ... command, not a product flag) and pr_body_has_user_facing_section (the "User-facing usage" heading only describes neutral vs. accent icon colors in the dashboard resource grid).

Changed files: src/Aspire.Dashboard/Components/Controls/ResourceActions.razor, src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor, and a dashboard component test. The change fixes shared-icon color mutation and has no new option, setting, behavior, or API to document.

Maddy Montaquila (maddymontaquila) added a commit that referenced this pull request Nov 13, 2026
…s, trace log previews, test flakes (#22232)

The remaining dashboard work for `release/17.0`, as one squashable PR:
one commit per change, in this order.

**Backported from `main` (cherry-picked with `-x`):**

1. #21500: Fix flaky terminal
WebSocket close handshake abort (test only)
2. #21503: Fix bUnit JS timeout
flakes in StructuredLogs/Traces/TraceDetails tests (test only)
3. #21471: Fix flaky
TerminalWebSocketTests final-output drain (test only)
4. #21924: Read resource row
state at every density in dashboard browser tests (test only)
5. #22142: Fix inconsistent
dashboard action icon colors. It conflicted with #22188 in
`ResourcesLayout.razor`: the resolution keeps the row menu on every row,
parameters included, with #22142's icon color.

**From open PRs against `main`, applied as they stand:**

6. #22228: Fix resource sidebar
hover state after selection
7. #22229: Keep resource picker
popup width consistent

**New:**

8. Render the trace log preview only for the marker that's hovered or
focused. Each log marker rendered its own hidden preview for the
tooltip, so a span with many logs built over a million hidden elements.
The page now renders one preview, filled on hover or focus. This
addresses Copilot's review on #22230.

9. Center tag group chevrons over the state dot column. In the compact
sidebar at rest, the rows' state dots form a column at the end of the
list, and the group header's chevron sat 13px past it. This replaces
#21996.
10. Fix two resource pane Playwright tests:
- `Rows_KeepDensity` expected parameter rows in the expanded list to
have no overflow menu, but every row has one now.
- `FilterAndGrouping` could hover before the feedback prompt pushed the
page down 40px, leaving the pointer on the brand. It now waits for the
prompt.

When `release/17.0` merges back into `main`, the `Rows_KeepDensity`
change has to come along with it, because #22228's version of that test
expects no menu on parameter rows.

Once this is in `release/17.0`, `release/17.0` merges back into `main`.
#22228 and #22229 can then close on `main`.

## Customer Impact

Fixes and polish to the 17.0 dashboard: icon colors, the resource
sidebar and picker, and trace pages with many logs.

## Testing

- `Aspire.Dashboard.Components.Tests`: 1,447 passed, 0 failed.
- `ResourcePaneResponsiveTests.FilterAndGrouping_*` and
`Rows_KeepDensity*`: 11 passed. `FilterAndGrouping` passed 5 runs in a
row after the fix; before it, the 2000px cases failed in about half the
runs.
- The chevron alignment was checked in the browser at 1440px: the
chevron and the dots are both centered 25px from the list's end.

## Risk

Low. Dashboard-only, and the backports are unchanged apart from the one
conflict described above.

## Regression?

No.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: David Fowler <[email protected]>
Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Maddy Montaquila <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: James Newton-King <[email protected]>
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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants