Repository navigation
fix(desktop): sidebar ports chip sits left of ×, hover card survives a brush across chips - #8549
saddlepaddle wants to merge 2 commits into
Conversation
…utton The workspace row's right cluster is now one flex row: queued badge and diff stats, then the ⌘N hint, then the ports chip, then ×. Only the × reserves its width (visibility hidden rather than display none), so the chip never moves when the hover controls appear; the dynamic hints sit to its left where their swaps cannot shift it. The stacked grid cell from #8524, which put the chip right of × so it would not hop, is gone. Measured over CDP: chip x identical idle vs hover on the active row with diff stats, a row with a ⌘N hint, and a row past 9 with no hint.
A chip took a hold on the row's workspace hover card on pointerenter, so touching the ports or agents chip closed the card before the chip's own card had opened, and the row's mouseenter never fires again to bring it back. The hold now begins when the chip's card opens and ends when it closes; brushing across a chip leaves the workspace card alone, and the ref-counted holds collapse to the open flag the hook already tracked.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryMoves the ports chip directly left of the delete button and keeps the button’s width reserved.
Known limitation: saddlepaddle explicitly deferred reopening the workspace card while the pointer remains over an open ports chip. The stated structural fix is one card per row. Reviews (1) · Last reviewed commit: "fix(desktop): let the workspace hover ca..." · Reviewed by Greptile |
|
Review verdict: minor issues. The approach is sound, it is smaller than the code it replaces, and CI is green at
I checked the layout with the PR's markup and the app's real CSS in the live sidebar: the chip x stays at 232 px idle and hovered. I could not check the brush-across-chip hover card end to end, because this sandbox has no local workspace rows. Details, screenshots and measurements: https://app.superset.sh/page/pr-8549-review-sidebar-ports-chip-hover-card-ekgfbj |
…er moves on row hover (#8592) idle, so the chip still jumped 20 px toward the row edge on every hover. Take #8549's shape instead: one flex row of queued badge + diff stats → ⌘N hint → ports chip → ×, where only the × reserves its width (invisible, not hidden); the hint and diff stats swap to the chip's left where they cannot move it. On a bulk-selected row the × stays rendered-but-invisible for the same reason. The chip hover-suppression hook loses the pointer-enter hold and the `suppressWorkspaceCardOn` option: the hold begins in onOpenChange(true) and ends on close for both the ports and agents chips, so brushing across a chip no longer dismisses the row's workspace hover card. Measured over CDP on five seeded rows (1, 2, 3, 5 and 12 ports): chip x is 224 idle and hovered on a ⌘3 row and on the 9+ row; before the swap it was 244 → 224.
Summary
×instead of right of it; the stacked grid cell feat(desktop): badge-style ports icon, ports on the workspace title line #8524 added to stop the chip hopping is gone.Why / Context
#8524 parked the chip right of
×because the hover-only⌘N ×cluster wasdisplay:nonewhen idle, so anything left of it jumped as the row was hovered. It also had the chip close the workspace hover card onpointerenter, which meant brushing across the chip killed the card before the ports card had opened, and the row'smouseenternever fires again to bring it back.How It Works
⌘Nhint (hover) → ports chip →×. Only×reserves its width (invisiblerather thanhidden), so the chip's offset from the row edge is constant; the dynamic hints live to its left where their swaps cannot move it. On a bulk-selected row the×stays rendered-but-invisible for the same reason.useDashboardSidebarChipHoverSuppressionbegins the hold inonOpenChange(true)and ends it on close; thepointerenterhold and the ref-count are gone. Ports and agents chips both use it.Manual QA Checklist
Driven over CDP with real pointer input in the dev app, five rows seeded with live
python3 -m http.serverlisteners from their own terminals:+126979 −5826, a⌘2row, and a row past 9 with no hint;×directly right of the chip in all three9+badge on a 12-port row; hover card lists ports and close-all worksconsole.errorduring any runTesting
bun run lint:fix,bunx sherif— cleanbun run check:i18n— no catalog changesbun run typecheck— the only failure is@superset/auth(better-auth session types) in files this PR does not touch; main's CI typecheck is green at the same basee6cfbc8f74bun test apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar— 189/189bun run test --filter=@superset/desktop— 8266 pass, 37 fail in main-process git/worktree/shell-env suites (spawn EBADF,git update-ref); none import the changed modules andgit-task-handlers.test.tspasses 12/12 aloneKnown Limitations
Summary by cubic
Fixes the workspace row's right-cluster layout and hover behavior so the ports chip sits directly left of the delete × and the row's hover card survives brushing across a chip.
invisibleinstead ofdisplay:none, so the chip no longer jumps when hover hints appear.pointerenterhold on the workspace hover card; the hold starts only when the chip's own card opens and ends when it closes.Changes:
DashboardSidebarExpandedWorkspaceRowso the row edge, queued badge, diff stats, shortcut hint, ports chip, and delete × live in a single flex container.useDashboardSidebarChipHoverSuppressionto track an open flag instead of ref-counted holds.onPointerEnterfrom the ports and agents chip triggers.Written for commit b5a6d41. Summary will update on new commits.
Summary by CodeRabbit