Skip to content

Visualizer: add a per-item visibility toggle to the workcell tree - #1150

Merged
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:visualizer-eye-toggle-visibility
Jul 6, 2026
Merged

Visualizer: add a per-item visibility toggle to the workcell tree#1150
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:visualizer-eye-toggle-visibility

Conversation

@BioCam

@BioCam BioCam commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

The visualizer's workcell tree lists every resource in the workcell - the liquid handler, carriers, plates, tip racks, and lids - but offered no way to hide an individual item from the canvas. On a dense deck, resources overlap and a carrier or lid occludes whatever sits beneath it, with no way to declutter the view or look underneath short of editing the layout.

  • Add an eye toggle to every row of the workcell tree (including the root); clicking it hides or shows that resource on the canvas.
  • Hiding flips the resource's Konva group visibility instead of destroying and redrawing it, so the item keeps its exact location and stacking order when shown again.
  • Hiding a container hides everything on it: the canvas scene graph mirrors the resource tree, so a hidden group clips all of its descendants - hide a carrier and its racks and plates go with it.
  • The hidden set is keyed by resource name and re-applied on every redraw, so an item stays hidden across the volume changes, tip pickups, and re-assignments that rebuild its canvas group.
  • A row whose parent is hidden is shown disabled and greyed with an explanatory tooltip, because its own toggle cannot take effect while an ancestor hides it; alt-clicking such a row reveals it by clearing the hidden flag on it and every hidden ancestor.

Behavior: nothing changes until an eye is clicked - the default view, canvas rendering, and tree counts are untouched. The toggle is view-only; it never alters the deck layout or any resource state, only what the canvas draws, so it is a safe way to declutter a busy deck and inspect occluded or nested resources. Frontend only (lib.js and main.css); no Python or API change.

🤖 Generated with Claude Code

The visualizer's workcell tree lists every resource in the workcell - the liquid handler, carriers, plates, tip racks, and lids - but offered no way to hide an individual item from the canvas. On a dense deck, resources overlap and a carrier or lid occludes whatever sits beneath it, with no way to declutter the view or look underneath short of editing the layout.

- Add an eye toggle to every row of the workcell tree (including the root); clicking it hides or shows that resource on the canvas.
- Hiding flips the resource's Konva group visibility instead of destroying and redrawing it, so the item keeps its exact location and stacking order when shown again.
- Hiding a container hides everything on it: the canvas scene graph mirrors the resource tree, so a hidden group clips all of its descendants - hide a carrier and its racks and plates go with it.
- The hidden set is keyed by resource name and re-applied on every redraw, so an item stays hidden across the volume changes, tip pickups, and re-assignments that rebuild its canvas group.
- A row whose parent is hidden is shown disabled and greyed with an explanatory tooltip, because its own toggle cannot take effect while an ancestor hides it; alt-clicking such a row reveals it by clearing the hidden flag on it and every hidden ancestor.

Behavior: nothing changes until an eye is clicked - the default view, canvas rendering, and tree counts are untouched. The toggle is view-only; it never alters the deck layout or any resource state, only what the canvas draws, so it is a safe way to declutter a busy deck and inspect occluded or nested resources. Frontend only (lib.js and main.css); no Python or API change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BioCam
BioCam merged commit 8dbc1bd into PyLabRobot:main Jul 6, 2026
21 checks passed
@BioCam
BioCam deleted the visualizer-eye-toggle-visibility branch July 6, 2026 08:47
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