Add maxDepth and showTabs props (#14)#22
Open
Jeshwin wants to merge 3 commits into
Open
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a subset of the controllable props requested in issue #14.
New props
maxDepth?: number(defaultInfinity) — 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;centerdrops are always allowed.showTabs?: boolean(defaulttrue) — whenfalse, the tab row/toolbar collapses to a compact ellipsis popover (newWindowMenucomponent) 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)
Plumbing
Wired through
types.ts,LaymanContext.tsx,Window.tsx,WindowToolbar.tsx,WindowDropTarget.tsx, plus menu styles inglobal.css.Integration note
The
showTabsellipsis popover is the intended host for the maximize/float buttons from the maximize-and-float PR; reconcile when both land onissues/main. Both PRs touchWindowToolbar.tsx/types.ts/LaymanContext.tsx, so expect minor merge conflicts.Targets
issues/main(notmain). Refs #14