test: v0.4.0 focus/drag/resize assertions
Adds 46 new W.3 assertions covering: focus(id) reorders within open_order; focus(hud) no-op; raise alias; lower(id) to bottom; get_focused tier priority + nil-when-empty; click-to-focus auto-routing; drag updates bounds_override; drag screen-clamp on all four edges; resize updates bounds_override; min_size + max_size clamps; dispatch-time drag-start + resize-start consume the click; chromeless drag-start excluded; bounds_override survives drag-end and is respected by point_in_any_panel. Bumps panel-test 0.3.0 -> 0.4.0 + panel-dep 0.4.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
39
README.md
39
README.md
@@ -1,18 +1,23 @@
|
||||
# lib-core.panel-test
|
||||
|
||||
Test-module for `lib-core.panel`. v0.3.0 expands to 79 assertions:
|
||||
Test-module for `lib-core.panel`. v0.4.0 expands to 128 assertions:
|
||||
- v0.1.x: registry lifecycle, theme validation, error handling,
|
||||
pause-gate, context-menu dispatch.
|
||||
- v0.2.0 (W.0): multi-active model, 11 layout-slots, custom-fn layout,
|
||||
hit-test reverse-open-order, bw-compat shim.
|
||||
- v0.3.0 (W.2): z-tiers (hud/normal/top), persistent windows,
|
||||
input_block routing (none/self/all), default-input_block per tier,
|
||||
panel.point_in_any_panel public API.
|
||||
panel.point_in_any_panel public API, chromeless guards, top-tier
|
||||
modal swallow.
|
||||
- v0.4.0 (W.3): focus API (focus/raise/lower/get_focused),
|
||||
click-to-focus auto-routing, drag-by-title-bar with 32px
|
||||
screen-clamp, resize-by-SE-corner with min/max_size clamps,
|
||||
bounds_override pattern persistence, chromeless drag guard.
|
||||
|
||||
**Version:** 0.3.0
|
||||
**Version:** 0.4.0
|
||||
**Lib-ID:** lib-core.panel-test
|
||||
**Requires:** lib-core.panel v0.3.0
|
||||
**Tags:** test, panel, ui, window-manager
|
||||
**Requires:** lib-core.panel v0.4.0
|
||||
**Tags:** test, panel, ui, window-manager, focus, drag, resize
|
||||
|
||||
## Running
|
||||
|
||||
@@ -23,9 +28,9 @@ SPOREL_LIBS_DIR=~/Projects/Sporel/sporel-libs SPOREL_CI=1 SPOREL_LOG_STDERR=1 \
|
||||
./build/Sporel.exe --test-libs=lib-core.panel-test 2>&1 | tail -15
|
||||
```
|
||||
|
||||
Expected: `pass=79 fail=0`.
|
||||
Expected: `pass=128 fail=0`.
|
||||
|
||||
## Assertion Summary (v0.3.0)
|
||||
## Assertion Summary (v0.4.0)
|
||||
|
||||
**v0.1.x baseline (10 assertions):**
|
||||
1. register + open / close round-trip
|
||||
@@ -45,7 +50,7 @@ layout-slot resolution (left-half, right-half, center, custom fn),
|
||||
loud-error on unknown slot, hit-test reverse-open-order, is_pausing
|
||||
across all open windows.
|
||||
|
||||
**v0.3.0 W.2 z-tiers + persistent + input-block (25 assertions):**
|
||||
**v0.3.0 W.2 z-tiers + persistent + input-block (28 assertions):**
|
||||
- persistent flag auto-opens at register-time + is in open_order
|
||||
- z_tier render-order is hud → normal → top
|
||||
- within z_tier, open-order preserved
|
||||
@@ -58,3 +63,21 @@ across all open windows.
|
||||
- Loud-Error on unknown input_block
|
||||
- default input_block per tier (hud=none, normal=self, top=all)
|
||||
- point_in_any_panel public API (inside / outside / none open)
|
||||
- chromeless suppresses phantom close-button hit-test
|
||||
- top-tier modal swallows outside-clicks before lower tiers can claim
|
||||
|
||||
**v0.4.0 W.3 focus + drag + resize (46 assertions):**
|
||||
- focus(id) reorders within open_order; focus(hud) is no-op
|
||||
- raise alias = focus
|
||||
- lower(id) moves to bottom of open_order
|
||||
- get_focused() prioritizes top-tier over normal; nil when nothing open
|
||||
- click on window auto-focuses (non-hud only)
|
||||
- drag updates bounds_override (simulate-backdoor)
|
||||
- drag screen-clamp keeps 32px of title-bar visible on all edges
|
||||
- resize updates bounds_override (SE-corner; simulate-backdoor)
|
||||
- resize min_size + max_size constraints clamp correctly
|
||||
- dispatch-time drag-start fires on real title-bar click
|
||||
- dispatch-time resize-start fires on real SE-corner click
|
||||
- chromeless widget does NOT drag-start on top-area click
|
||||
- bounds_override survives drag-end (persists in window record)
|
||||
- point_in_any_panel respects bounds_override
|
||||
|
||||
Reference in New Issue
Block a user