HS-plan: log hide strategy done +3 partial
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,7 @@ Each cluster below is one commit. Order is rough — a loop agent may skip ahead
|
||||
|
||||
10. **[done (+1)] `swap` variable ↔ property** — `swap / can swap a variable with a property` (1 test). Swap command doesn't handle mixed var/prop targets. Expected: +1.
|
||||
|
||||
11. **[in-progress] `hide` strategy** — `hide / can configure hidden as default`, `can hide with custom strategy`, `can set default to custom strategy`, `hide element then show element retains original display` (4 tests). Strategy config plumbing. Expected: +3-4.
|
||||
11. **[done (+3) — partial, `hide element then show element retains original display` remains; needs `on click N` count-filtered event handlers, out of scope for this cluster] `hide` strategy** — `hide / can configure hidden as default`, `can hide with custom strategy`, `can set default to custom strategy`, `hide element then show element retains original display` (4 tests). Strategy config plumbing. Expected: +3-4.
|
||||
|
||||
12. **[pending] `show` multi-element + display retention** — `show / can show multiple elements with inline-block`, `can filter over a set of elements using the its symbol` (2 tests). Expected: +2.
|
||||
|
||||
@@ -158,6 +158,9 @@ Many tests are `SKIP (untranslated)` because `tests/playwright/generate-sx-tests
|
||||
|
||||
(Reverse chronological — newest at top.)
|
||||
|
||||
### 2026-04-24 — cluster 11 hide strategy (partial +3)
|
||||
- **beb120ba** — `HS: hide strategy config (+3 tests)`. Three parts: (a) `runtime.sx` hs-hide-one!/hs-show-one! consult a new `_hs-hide-strategies` dict (and `_hs-default-hide-strategy` override) before falling through to the built-in display/opacity/hidden cases. Strategy fn is called directly with (op, el, arg). New setters `hs-set-hide-strategies!` and `hs-set-default-hide-strategy!`. (b) Generator `_hs_config_setup_ops` recognises `_hyperscript.config.defaultHideShowStrategy = "X"`, `delete …default…`, and `hideShowStrategies = { NAME: function (op, el, arg) { if … classList.add/remove } }` with brace-matched function body extraction. (c) Pre-setup emitter handles `__hs_config__` pseudo-name by emitting the SX expression as-is. Suite hs-upstream-hide: 12/16 → 15/16. Remaining test (`hide element then show element retains original display`) needs `on click N` count-filtered event handlers — separate feature. Smoke 0-195: 162/195 unchanged.
|
||||
|
||||
### 2026-04-24 — cluster 10 swap variable with property
|
||||
- **30f33341** — `HS: swap variable with property (+1 test)`. Mock `El` class in `tests/hs-run-filtered.js`: `dataset` is now a `Proxy` that forwards property writes to `attributes["data-*"]`, and `setAttribute("data-*",...)` populates the backing dataset with camelCase key. That way `#target.dataset.val = "new"` updates the `data-val` attribute so the swap command can read+write the property correctly. Suite hs-upstream-swap: 3/4 → 4/4. Smoke 0-195: 162/195 unchanged.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user