Skip to content

Keep resource picker popup width consistent - #22229

Merged
James Newton-King (JamesNK) merged 2 commits into
mainfrom
jamesnk/fix-resource-picker-width
Nov 13, 2026
Merged

James Newton-King (JamesNK) merged 2 commits into
mainfrom
jamesnk/fix-resource-picker-width

Conversation

@JamesNK

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

Copy link
Copy Markdown
Member

Description

The collapsed resource selector popup previously inherited the sidebar's saved width, so resizing the sidebar also changed the popup's size. Keep the popup at 330px regardless of the saved sidebar width, while retaining the viewport-width limit.

Fixes # (issue)

User-facing usage

Resize and collapse the resource sidebar, then open the resource picker. The popup remains 330px wide regardless of the expanded sidebar width.

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.

Both screenshots use a 560px sidebar. For the before capture, the original width rule was temporarily reapplied in the browser. The after capture applies the 330px rule from this PR as a browser override.

Before: 560px popup After: 330px popup
Popup inheriting sidebar width Popup with fixed width

Validation

  • node - with an inline Playwright check against TestShop on main, applying the 330px CSS rule from this PR as a browser override — passed: popup measured 330px after resizing the sidebar to both 300px and 560px.
  • git diff --check — passed.
  • Dashboard build for the 330px change was not run; the change is CSS-only.

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 -- 22229

Or

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

@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 are recorded for the change that makes the collapsed resource picker’s width independent of the saved sidebar width.

No open issues 🎉

What changed in this PR

Keeps the dashboard’s collapsed resource picker popup independent of the saved sidebar width.

Changes:

  • Sets the popup width to 350px instead of using the expanded sidebar width.
  • Preserves the viewport-width limit for smaller screens.
File Description
src/​Aspire.Dashboard/​Components/​Layout/​ResourcesLayout.razor.css Uses a fixed 350px popup width capped at the viewport width minus 24px.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

13 / 101 PR test projects · 2 PR jobs, from 1 changed file.

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

⚠️ 12 of the 13 selected test projects come from a single change — src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.css.

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

Job reasons

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

Selection computed for commit 8ed830f.

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

The review reports no active issues with the resource-picker width change.

No open issues 🎉

Review effort: Balanced

@IEvangelist

Copy link
Copy Markdown
Member

What does this look like with "Comfortable" density? This should really be a bit more dynamic and not a hard-coded width. I have concerns about this not accommodating longer resource names.

@JamesNK

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

Copy link
Copy Markdown
Member Author

I'm not worried about long resource names. The width is chosen to leave lots of space for the resource name but before the type is also displayed. Example of long names being displayed:

image

Even longer names are trimmed with an ellipsis and a tooltip can display the full name.


Comfortable looks bad. But, that's because of its design rather than the width of the popup:

image

If comfortable only displayed buttons on hover like compact does then it would be fine. Can do that in another PR.

@JamesNK

Copy link
Copy Markdown
Member Author

Fix comfortable: #22239

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]>
@JamesNK

Copy link
Copy Markdown
Member Author

/backport to release/17.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/17.0 (link to workflow run)

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

James Newton-King (@JamesNK) backporting to release/17.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Keep resource picker popup width consistent
Using index info to reconstruct a base tree...
M	src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.css
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.css
CONFLICT (content): Merge conflict in src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.css
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Keep resource picker popup width consistent
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

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

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Proven false positive: the triggered signals pr_body_has_user_facing_section and pr_body_has_cli_flag_mention matched only PR template text (the "User-facing usage" heading and "git diff --check"). The actual change is a CSS-only fix keeping the collapsed resource picker popup at 330px; no CLI flags, API, config, or documented behavior changed, and no docs page describes popup width.

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.

4 participants