Skip to content

Add per-channel remove control to merged/overlay docks - #20

Merged
0x0Anna merged 2 commits into
mainfrom
overlay-dock-ungroup-control
Sep 16, 2026
Merged

0x0Anna merged 2 commits into
mainfrom
overlay-dock-ungroup-control

Conversation

@0x0Anna

@0x0Anna 0x0Anna commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Closes the "overlay group can be built but not taken apart" gap from PROJECT_PLAN.md: each entry in a merged dock's per-channel legend now has a small "×" that removes just that channel (graph::remove_channel_from_dock), collapsing the dock back to a plain single-channel one automatically once one remains.
  • Along the way, fixed a Slint layout bug the new remove button exposed: nested HorizontalLayouts for each legend entry let Slint's flex-style distribution stretch the label to fill leftover row width (this falls back to "treat all children as equally stretchy" whenever none of them individually claims a stretch, and it's evaluated separately at each nesting level). Rebuilt the legend row as plain Rectangle entries with absolute-positioned children instead.

Test plan

  • cargo build -p sde-app succeeds
  • cargo test --workspace passes (95 tests in sde-app, incl. 2 new remove_channel_from_dock unit tests; 0 failures workspace-wide)
  • Manually verified in the running app (software renderer, real acr_motec_*.ld capture): queued an overlay of LB.pressure + LF.pressure, confirmed the legend renders tight (swatch, label, "×" per entry, no stray gap), and clicking one channel's "×" removes only that channel, collapsing the dock to a plain LF.pressure (bar) dock.

Annalise added 2 commits September 15, 2026 21:03
An overlay group could be built by Ctrl-dragging one dock onto another,
but had no way to take a single channel back out short of deleting the
whole dock and re-adding what should have stayed. Each entry in a merged
dock's per-channel legend now gets a small "x": graph::remove_channel_from_dock
drops just that channel from dock_channels[i], and the dock collapses
back to a plain single-channel one automatically once one remains, since
rendering already treats group.len() == 1 that way.

The legend row itself needed rebuilding as plain-Rectangle entries with
absolute-positioned children rather than nested HorizontalLayouts: Slint's
flex-style distribution kept stretching each entry's label to fill the
row's leftover width regardless of any horizontal-stretch set on the entry
or a sibling spacer, stranding the remove button far from its label.

Closes the "overlay group can be built but not taken apart" gap noted in
PROJECT_PLAN.md.

Claude-Session: https://claude.ai/code/session_01TMZB9qMKPv42o6XDYzdh4B
@0x0Anna
0x0Anna force-pushed the overlay-dock-ungroup-control branch from ba9944e to 18c3751 Compare September 16, 2026 02:04
@0x0Anna
0x0Anna merged commit a7c6e63 into main Sep 16, 2026
7 checks passed
@0x0Anna
0x0Anna deleted the overlay-dock-ungroup-control branch September 16, 2026 02:24
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.

1 participant