Skip to content

Dashboard: Add InfoPopover for state column with clickable links#15996

Open
adamint wants to merge 5 commits intomicrosoft:mainfrom
adamint:fix/dashboard-state-column-info-popover
Open

Dashboard: Add InfoPopover for state column with clickable links#15996
adamint wants to merge 5 commits intomicrosoft:mainfrom
adamint:fix/dashboard-state-column-info-popover

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Apr 9, 2026

Description

Adds an interactive InfoPopover component to the dashboard's state column, replacing the plain-text tooltip. This allows state messages containing HTML markup (like clickable links) to be rendered properly.

Fixes #8853

Note that the button opens on click, not on hover. There is an established pattern of these informational button tooltips to use click instead of hover.

image

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

- Extract reusable InfoPopover component (info icon + FluentPopover)
- Replace plain text tooltip on state column with InfoPopover
- XML-escape HTML markup in resx so <a> tags survive as literal HTML
- Show info icon only when tooltip content is available (return null for default states)
- Add link styling, cursor fixes, and text wrapping for popover content

Fixes microsoft#8853
@adamint adamint requested a review from JamesNK as a code owner April 9, 2026 05:37
Copilot AI review requested due to automatic review settings April 9, 2026 05:37
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🚀 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 -- 15996

Or

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an interactive InfoPopover to the Dashboard resource grid “State” column so state messages can contain clickable HTML links (instead of non-interactive tooltips), addressing #8853.

Changes:

  • Updates state tooltip generation to return null for default/healthy states and renders tooltip content in a new InfoPopover component.
  • Escapes HTML in the StateColumnResourceContainerRuntimeUnhealthy resource string so <a> markup survives localization/resource parsing.
  • Adds new localization string for the info button accessible label and updates tests accordingly.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
tests/Aspire.Dashboard.Tests/Model/ResourceStateViewModelTests.cs Adjusts expectations for nullable tooltip output.
src/Aspire.Dashboard/Resources/Columns.resx Updates runtime-unhealthy string to escaped HTML link; adds info button label resource.
src/Aspire.Dashboard/Resources/Columns.Designer.cs Regenerated designer entries for updated/added resources.
src/Aspire.Dashboard/Resources/xlf/Columns.cs.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.de.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.es.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.fr.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.it.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.ja.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.ko.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.pl.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.pt-BR.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.ru.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.tr.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.zh-Hans.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Resources/xlf/Columns.zh-Hant.xlf Updates localized XLF entries for new/changed strings.
src/Aspire.Dashboard/Model/ResourceStateViewModel.cs Makes tooltip content nullable and removes fallback-to-state-text behavior.
src/Aspire.Dashboard/Components/ResourcesGridColumns/StateColumnDisplay.razor Renders InfoPopover with MarkupString content when tooltip exists.
src/Aspire.Dashboard/Components/ResourcesGridColumns/StateColumnDisplay.razor.css Adjusts layout to accommodate the info icon in the state cell.
src/Aspire.Dashboard/Components/Pages/Resources.razor Removes column-level tooltip usage in favor of per-cell popover.
src/Aspire.Dashboard/Components/Controls/InfoPopover.razor New reusable popover control (icon button + FluentPopover).
src/Aspire.Dashboard/Components/Controls/InfoPopover.razor.cs Code-behind for popover open/close state and parameters.
src/Aspire.Dashboard/Components/Controls/InfoPopover.razor.css Styles popover container, sizing, and link appearance.
Files not reviewed (1)
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Language not supported

"dotnet.testWindow.useTestingPlatformProtocol": true,
"aspire.enableSettingsFileCreationPromptOnStartup": false
"aspire.enableSettingsFileCreationPromptOnStartup": false,
"aspire.enableAutoRestore": false
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated but useful change, we have hundreds of projects so we should not automatically restore in the aspire repo

@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Apr 9, 2026

That link is already added to the dashboard message bar, and it's clickable there.

I only added the link to the tooltip because that information is also returned in MCP/CLI API calls. And it's useful for AI to help figure out what is going on.

@adamint
Copy link
Copy Markdown
Member Author

adamint commented Apr 9, 2026

That link is already added to the dashboard message bar, and it's clickable there.

I only added the link to the tooltip because that information is also returned in MCP/CLI API calls. And it's useful for AI to help figure out what is going on.

If it's going to be shown to the user on the dashboard, IMO we should give them a nice experience 😄

Also, this fixes the discoverability issue of the existing tooltip... users do not know which states have additional information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link unclickable in Container Runtime Unavaialble tooltip

3 participants