Skip to content

Implement maximize/minimize and float/unfloat window controls#23

Open
Jeshwin wants to merge 9 commits into
issues/mainfrom
issues/feature/maximize-and-float
Open

Implement maximize/minimize and float/unfloat window controls#23
Jeshwin wants to merge 9 commits into
issues/mainfrom
issues/feature/maximize-and-float

Conversation

@Jeshwin

@Jeshwin Jeshwin commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Implements the maximize/minimize and float/unfloat toolbar buttons (previously placeholders).

Maximize / Minimize

  • New ephemeral maximizedPath context state.
  • The maximize button toggles to minimize. A maximized window overrides its layout position to fill the container at elevated z-index, while all other windows stay in their exact positions.

Float / Unfloat

  • New ephemeral floatingWindows context state + FloatingWindowData type.
  • The float button removes the window from the layout and adds it to a floating layer at its current calculated size.
  • New FloatingWindow component: drag by topbar, resize from any edge/corner, click-to-focus raises z-index, per-window tab selection.
  • unfloat moves all tabs into the layout window under the float's center (hit-testing in layoutGeometry.ts); falls back to seeding a root window when the layout is empty.
  • New FloatIcon/UnfloatIcon, float/unfloat ToolbarButtonType, and floating-window styles. Default non-mutable buttons are now [float, maximize, misc].

State is ephemeral

Maximize/float state is intentionally not persisted to localStorage.

Integration note

Targets issues/main (not main). Touches WindowToolbar.tsx/types.ts/LaymanContext.tsx like the props PR — expect minor merge conflicts, and wire these buttons into the showTabs ellipsis popover during integration.

Jeshwin added 9 commits June 14, 2026 19:21
Maximize/minimize:
- Add ephemeral maximizedPath context state.
- maximize button toggles to minimize; a maximized window overrides its
  layout position to fill the container at elevated z-index while all other
  windows stay in place (Window.tsx, WindowToolbar.tsx).

Float/unfloat:
- Add ephemeral floatingWindows context state + FloatingWindowData type.
- float button removes the window from the layout and adds it to a floating
  layer at its current size.
- New FloatingWindow component: drag by topbar, resize from any edge/corner,
  click-to-focus raises z-index, per-window tab selection.
- unfloat moves all tabs into the layout window under the float's center
  (layoutGeometry.ts hit-testing); falls back to seeding a root window when
  the layout is empty.
- Add FloatIcon/UnfloatIcon, 'float'/'unfloat' ToolbarButtonType, default
  non-mutable buttons now [float, maximize, misc], and floating-window styles.
All maximize/minimize and float/unfloat items are implemented and
verified (tsc, lint, vitest all pass).
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