Skip to content

Add draggable splitter between Parameters and Network panels#530

Merged
fdb merged 4 commits intorewrite-in-rustfrom
claude/add-parameters-network-splitter-PoIAf
Feb 15, 2026
Merged

Add draggable splitter between Parameters and Network panels#530
fdb merged 4 commits intorewrite-in-rustfrom
claude/add-parameters-network-splitter-PoIAf

Conversation

@fdb
Copy link
Member

@fdb fdb commented Feb 15, 2026

Summary

This PR adds an interactive vertical splitter between the Parameters (top) and Network (bottom) panels in the right sidebar, allowing users to resize these panels by dragging. The split ratio is now persisted in the app state with sensible defaults and constraints.

Key Changes

  • Added right_panel_split: f32 field to NodeBoxApp to track the vertical split ratio (default 0.35 = 35% Parameters, 65% Network)
  • Implemented draggable splitter UI with visual feedback:
    • Splitter line changes color on hover (ZINC_900 → ZINC_700) and when active (ZINC_300)
    • Cursor changes to resize icon when hovering over splitter
    • Smooth drag interaction updates the split ratio in real-time
  • Added minimum height constraints (80px per panel) to prevent panels from becoming too small
  • Added theme constants for splitter styling:
    • SPLITTER_THICKNESS: 2.0 for the visual line
    • SPLITTER_AFFORDANCE: 8.0 for the interaction zone (larger than visual for easier grabbing)
  • Updated all NodeBoxApp initialization methods to set the default split ratio

Implementation Details

  • The splitter uses egui's interaction system with a dedicated ID for state tracking
  • The interaction zone is 8px tall but the visual line is only 2px, providing better UX for grabbing
  • Split ratio is clamped between calculated min/max values based on minimum panel heights and available space
  • The splitter position is calculated from the usable height (total height minus splitter affordance)

https://claude.ai/code/session_01F3aZek3agmbWSjt2LehCng

@fdb fdb merged commit e1d5b38 into rewrite-in-rust Feb 15, 2026
2 checks passed
@fdb fdb deleted the claude/add-parameters-network-splitter-PoIAf branch February 15, 2026 12:10
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.

2 participants