Skip to content

Add maxDepth and showTabs props (#14)#22

Open
Jeshwin wants to merge 3 commits into
issues/mainfrom
issues/feature/props
Open

Add maxDepth and showTabs props (#14)#22
Jeshwin wants to merge 3 commits into
issues/mainfrom
issues/feature/props

Conversation

@Jeshwin

@Jeshwin Jeshwin commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Implements a subset of the controllable props requested in issue #14.

New props

  • maxDepth?: number (default Infinity) — caps split nesting. Depth = path.length (a single root window is depth 0; each split +1). Split toolbar buttons are hidden and edge drop placements are disabled once the limit is reached; center drops are always allowed.
  • showTabs?: boolean (default true) — when false, the tab row/toolbar collapses to a compact ellipsis popover (new WindowMenu component) in the window's top-right corner, and the pane reclaims the full height. The popover exposes tab selection, add-tab, and the window control buttons.

Out of scope (per discussion)

  • max/min window sizes — not feasible with the current geometry model; deferred.
  • Show/hide sidebar — demo-only, tracked separately.

Plumbing

Wired through types.ts, LaymanContext.tsx, Window.tsx, WindowToolbar.tsx, WindowDropTarget.tsx, plus menu styles in global.css.

Integration note

The showTabs ellipsis popover is the intended host for the maximize/float buttons from the maximize-and-float PR; reconcile when both land on issues/main. Both PRs touch WindowToolbar.tsx/types.ts/LaymanContext.tsx, so expect minor merge conflicts.

Targets issues/main (not main). Refs #14

Jeshwin added 3 commits June 14, 2026 19:16
- maxDepth: caps split nesting (depth = path.length). Hides split toolbar
  buttons and disables edge drop placements once the limit is reached;
  center drops still allowed.
- showTabs: when false, the tab row/toolbar collapses to a compact ellipsis
  popover (new WindowMenu component) in the window's top-right corner; the
  pane reclaims the full height. Popover exposes tab selection, add-tab, and
  the window control buttons.
- Plumb both props through types, context, provider, Window, WindowToolbar,
  and WindowDropTarget; add menu styles.
Add a demo-only show/hide sidebar toggle in demo/App.tsx to exercise the
layout's container-resize handling. Mark the implemented maxDepth and
showTabs items complete in TODO.md.
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