Repository navigation
Improve display of Urls in main dashboard grid. - #20892
Alex Crome (afscrome) wants to merge 1 commit into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20892Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20892" |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Fixes microsoft#11604. With multiple endpoints on a resource, showing the full URL as the link text gives no indication of which endpoint is which, and takes up excessive space when endpoints only differ by port. As a compromise between showing the full URL and just the endpoint name, default the display text to "{endpoint-name} ({port})" (e.g. "http (12345)") - callers can still override it via WithUrlForEndpoint/WithUrlDisplayName. Also: - Removes the aspire-dashboard resource's special-cased "Dashboard (http)" display text so it follows the same new default as every other resource. - Shows "{label}: {address}" in the Urls column's overflow popover (label is the display text, else the endpoint name, omitted if neither), since it isn't space-constrained the way the inline chips are. Only the address is the link; the label is plain text. - Renders every URL address as a link, including for schemes that aren't browsable such as tcp://. - In the resource details URLs table, the Address column always shows the real address (previously non-browsable URLs showed their display text) and the Text column is no longer a link. - Adds a stress playground showcase (AddUrlEndpointShowcaseResources) covering default/customized endpoints, URLs without an endpoint, and URLs pointing at another resource's endpoint, for both a clickable (http) and non-clickable (tcp) protocol. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dfeb504 to
dd3a75a
Compare
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Fixes #11604, based on some of the feedback on this.
The Urls column showed each URL's full address as its link text. For
*.dev.localhostURLs, such ashttp://my-resource-myapphost.dev.localhost:62482, that takes up almost all of the column, and when a resource has several endpoints the links all look alike so you can't tell which is which.Links now read
http (62482): the endpoint name and port. The port is kept because it is useful when troubleshooting, and the full address is still what you get on click or hover. Display text set by the app host (WithUrlForEndpoint,WithUrl(..., displayText)) still takes priority, and URLs that don't belong to an endpoint still show their address.The
+Noverflow popover has room for more, so each entry there readslabel: address(the label being the display text, or the endpoint name) and nothing is lost. The resource details URLs table always shows the real address in its Address column. Theaspire-dashboardresource no longer has its own special link text and looks like every other resource.To see it, run the Stress playground and look at the
url-endpoint-showcaseresource.Screenshots:
Before:

Truncation could often leave you with a lot of "duplicate" urls, with their differences hidden behidn the fold. You'd often only get a single url, even if you have multiple endpoints.
After:
On the dashboard grid, we now display

{displayText ?? endpointName} ({port}). This gets you the most critical information, in a fairly dense form, such that you can now see a few different endpoints without having to go to the more link. The view more link also shows both the display text and the raw url if you want easy access to hte raw url.Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate🤖 Generated with Claude Code