Make floating-window close buttons minimise
Remove the separate minimise control and make the title-bar X hide windows while preserving their state and reachability. Update window behavior documentation and focused tests for chat, terminal, and window layering.
This commit is contained in:
@@ -15,13 +15,14 @@ every destination and come back at app start without Chat being opened.
|
||||
chat's window last was, else at the default frame stepped 32 px per chat
|
||||
window already open.
|
||||
- **Window**: drag the title bar to move, the lower right corner to resize,
|
||||
double click the title to maximise. The title bar has Dock, Minimise,
|
||||
Maximise and Close.
|
||||
double click the title to maximise. The title bar has Dock, Maximise and
|
||||
the X.
|
||||
- **Dock** puts the chat back into the tiling, right of the active pane. When
|
||||
the Chat destination is not built it opens the chat there instead.
|
||||
- **Minimise** hides that window; the chord brings it back.
|
||||
- **Close (X)** closes the window and returns nothing to the tiling. The chat
|
||||
itself is not closed on the server.
|
||||
- **X** (tooltip and semantics: Minimise) hides that window, keeping its state;
|
||||
it stays listed in the Windows menu and the chord brings it back. It never
|
||||
closes the window, the chat or the tiling: nothing returns to the tiling.
|
||||
The chat itself is not closed on the server.
|
||||
- **Chord**: Alt+Y, Ctrl+Y, and Cmd+Y on Apple platforms (`chatFloatShortcut`).
|
||||
With chat windows open it hides or shows all of them. With none it floats the
|
||||
active tiled pane, when that pane can float and Chat has the keyboard;
|
||||
|
||||
@@ -15,7 +15,8 @@ mode (below). `FloatingLayer`, the overlay the old windows used, is gone.
|
||||
- `WindowHost`: the windows as plain children of the terminal stage's stack, in
|
||||
the shell page (not an overlay above it), outside every destination.
|
||||
- `WindowLayer` / `WindowFrame`: one window's card, title bar (drag, double
|
||||
click to maximise, kind actions, Minimise, Maximise, Close) and resize corner.
|
||||
click to maximise, kind actions, Maximise, the X = minimise) and resize corner.
|
||||
There is no separate Minimise button; the X hides the window and keeps it.
|
||||
- `WindowNavigator`: each window's own page stack.
|
||||
- `WindowFocus`: a focus scope per window; the keyboard follows the top window
|
||||
and returns to what had it when the last one hides.
|
||||
@@ -73,8 +74,8 @@ the device, not a server) and `TerminalWindows`, which keeps it in step with
|
||||
float, panel height); the bottom panel is still a shell panel.
|
||||
|
||||
- Showing the terminal in float mode opens or shows the window; hiding it
|
||||
(Alt+T, Ctrl+`, the options menu) minimises it. The window's Minimise and
|
||||
Close both hide the terminal. Its shells and tabs live in `TerminalHub`, so
|
||||
(Alt+T, Ctrl+`, the options menu) minimises it. The window's X (minimise)
|
||||
hides the terminal. Its shells and tabs live in `TerminalHub`, so
|
||||
nothing is lost either way, and the window comes back where it was.
|
||||
- The frame and maximised state are the window system's. The first window
|
||||
takes the ones `pipelines.terminal-layout.v1` saved before; that record is
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# Window X minimises (no separate Minimise button)
|
||||
|
||||
## Change
|
||||
|
||||
- The title bar of a floating window is now: kind actions (Dock on a chat),
|
||||
Maximise / Restore size, then the X.
|
||||
- The X hides the window and keeps its state, exactly as Minimise did. Its
|
||||
tooltip and semantics are `Minimise`. It keeps the X glyph (`Icons.close`).
|
||||
- The X never calls the kind's `closed` hook, so a chat window keeps its chat
|
||||
open on the server and returns nothing to the tiling.
|
||||
- `WindowFrame` no longer takes `onClose`; `WindowLayer` wires the X to
|
||||
`manager.setMinimized(id, true)`.
|
||||
- Unchanged: the chord (Alt+Y) shows hidden chat windows; the Windows menu
|
||||
still lists minimised windows with a minimise mark and shows them on choice;
|
||||
Show all, Minimise all and Close all stay in that menu. Terminal windows
|
||||
still hide the terminal when their window is hidden by the X.
|
||||
|
||||
Changed paths (under `app/`):
|
||||
|
||||
- `lib/shell/windows/window_frame.dart`, `window_layer.dart`, `window_kind.dart`,
|
||||
`window_entry.dart` (comments and the frame's parameters)
|
||||
- `lib/features/terminal/terminal_window.dart` (comment only)
|
||||
- `test/shell/windows/window_host_test.dart`, `window_layering_test.dart`
|
||||
- `test/features/chat/chat_floating_pane_test.dart`
|
||||
- `test/features/terminal/terminal_surface_test.dart`
|
||||
- `notes/floating-windows.md`, `notes/chat-floating-pane.md`
|
||||
|
||||
## Focused results
|
||||
|
||||
- `tool/memwatch/full.sh 'test/shell/windows/window_host_test.dart
|
||||
test/shell/windows/window_layering_test.dart
|
||||
test/shell/windows/window_conveniences_test.dart
|
||||
test/features/chat/chat_floating_pane_test.dart
|
||||
test/features/terminal/terminal_surface_test.dart'`:
|
||||
PASS, 72 passed, 0 failed, 0 skipped, exit 0.
|
||||
- `tool/analyze.sh`: clean, exit 0.
|
||||
- Not run: the full suite (the land gate runs it). No Cupertino code or tests
|
||||
touched.
|
||||
|
||||
## Affected states (widget-test coverage only)
|
||||
|
||||
- Window title bar: no `Close` tooltip; `Minimise` on the X; `Maximise` /
|
||||
`Restore size` unchanged.
|
||||
- Chat window: X hides it; the chat stays open, is not docked and sends no
|
||||
`chat_close`; the chord shows it again with the same frame and composer.
|
||||
- Probe window: X keeps the entry (minimised), the content state survives, and
|
||||
the group toggle brings it back.
|
||||
- Terminal float window: X hides the terminal and keeps its tabs; the chord
|
||||
shows it again at the same frame.
|
||||
|
||||
## Limitations
|
||||
|
||||
- No browser or device capture here; `ui-review` owns the title-bar captures.
|
||||
- The X glyph with a Minimise tooltip is a deliberate choice; a minimise glyph
|
||||
would be a one-line change in `window_frame.dart` if preferred.
|
||||
Reference in New Issue
Block a user