You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kill animation: fade the ghost instead of crushing it
The directional crush (to-left/right/up/down/hcenter/vcenter/br) added
motion that competed with the grower's FLIP reveal, which already
carries the direction. Replacing with a uniform opacity fade reads
cleaner and eliminates the case-detection branching — every kill path
(edge / middle / last-pane) now uses the same .pane-fading-out class.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/specs/layout.md
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,22 +297,17 @@ When a pane is added, its dockview group element gets a directional `.pane-spawn
297
297
298
298
The direction is carried via `FreshlySpawnedContext` — a `Map<paneId, SpawnDirection>` written by the spawn call site and consumed once by `TerminalPanel`'s `useLayoutEffect` on first mount.
299
299
300
-
### Kill (ghost crush + FLIP reclaim)
300
+
### Kill (ghost fade + FLIP reclaim)
301
301
302
302
`orchestrateKill(api, killedId)` in `Pond.tsx` runs on kill confirmation:
303
303
304
304
1. Snapshot `getBoundingClientRect` for every other panel's group element.
305
305
2.`destroyTerminal` + `api.removePanel`; dockview snaps the layout.
306
306
3. Measure post-rects. Any panel whose rect grew is a "grower."
307
-
4. Pick a crush direction by comparing growers' post-rect centers against the killed rect's center:
308
-
- Growers to one side only (horizontal axis) → `.pane-crushing-to-{left,right}`.
309
-
- Growers to one side only (vertical axis) → `.pane-crushing-{up,down}`.
310
-
- Growers on both sides of the killed pane's center (horizontal or vertical) → `.pane-crushing-to-{hcenter,vcenter}` (middle-kill crush).
311
-
- No growers (last-pane kill) → `.pane-crushing-to-br` (crushes toward bottom-right corner, opposite of where the auto-spawned replacement reveals from).
312
-
5. Mount a solid `var(--color-surface)` ghost overlay at the killed rect (`position: fixed`, `z-index: 55`) with that class; it removes itself on `animationend` with a 1s timeout safety net.
313
-
6. For each grower, apply an inline `clip-path: inset(...)` with the newly-claimed territory clipped off, force a reflow, then transition to `inset(0)`. This reveals the grower into the vacated space without affecting `getBoundingClientRect`. Clears on `transitionend`.
314
-
315
-
Case detection is purely rect-based (measure before and after removal), so 2-pane splits, linear 3+ rows/columns, and nested splits all fall through the same code path.
307
+
4. Mount a solid `var(--color-surface)` ghost overlay at the killed rect (`position: fixed`, `z-index: 55`) with the `.pane-fading-out` class; it removes itself on `animationend` with a 1s timeout safety net. A uniform fade works for every case (edge/middle/last-pane kill) because the directional cue is already carried by the grower's FLIP reveal.
308
+
5. For each grower, apply an inline `clip-path: inset(...)` with the newly-claimed territory clipped off, force a reflow, then transition to `inset(0)`. This reveals the grower into the vacated space without affecting `getBoundingClientRect`. Clears on `transitionend`.
309
+
310
+
Case handling is purely rect-based (measure before and after removal), so 2-pane splits, linear 3+ rows/columns, and nested splits all fall through the same code path with no per-case branching.
0 commit comments