Slice 1 (ADR 0006): collapse geometry-neutral wrappers from box-tree evidence, keep author CSS
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
Direzione di ricerca
Start with ADR 0006 and the box-tree/v2 sidecar schema, then read WrapperCoalescer to see where wrappers are currently folded and where selector survival is checked. The new evidence reader parses box-tree/<route>.json and classifies each node as neutral, inset_only or load_bearing by data-blocks-engine-node-id. Run cd php-transformer && composer test for the green baseline, and composer topology-diff to see whether tools/topology-diff/baseline.json moves; done means the contract tests plus the Wix/Squarespace A/B thresholds in the acceptance section pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
Slice 1 of ADR 0006 (PR linked below): remove neutral single-child wrappers on the default path, decided from captured box-tree/v2 geometry evidence rather than selector survival. Author CSS keeps shipping.
Measured ceiling (frozen captures, from box-tree/ sidecars)
| Site | Visible single-child source wrappers | Collapsible (neutral or constant inset) | Max source depth if removed |
|---|---|---|---|
| Wix demo (sdnunca) | 445 | 235 | 27–28 → 22–23 |
| Squarespace demo (Bedford) | 1071 | 610 | 17–21 → 13–15 |
Published trunk baseline: Wix 225 single-child groups / 369 groups / max depth 13; Squarespace 576 / 906 / 16.
Required behaviour
- Evidence reader. One class reads the capture's
box-tree/<route>.json(schemablocks-engine/box-tree/v2) and maps nodes to source elements bydata-blocks-engine-node-id. It answers, per element:neutral,inset_onlyorload_bearing, plus a reason. No evidence for a node meansload_bearing. Capture identity attributes stay out of compiled output, as today. - Neutral, at every captured viewport:
- visible (
displaynotnone, width > 0); - paints nothing: transparent
background-color,background-image: none, zero ornoneborders,box-shadow: none,outlinestylenone,opacity: 1, andtransform,filter,mask-image,clip-path,backdrop-filterallnone;overflow-xandoverflow-yvisible; position: static, orrelativewithtop/right/bottom/leftautoand noabsoluteorfixeddescendant whose containing block is this wrapper;float: none,z-index: auto,animation-name: none;- the single element child's border box equals the wrapper's (tolerance 0.5 px).
- visible (
- Collapse. In
WrapperCoalescer, a neutral wrapper folds into its child even when selector survival fails. Every rule whose match on a surviving descendant changes when the wrapper is removed is restated on that descendant as an engine-owned rule. Reuse #7420's identity-transfer guards: id transfer only off shells, landmarks and anchor targets; data guards only on consumed attributes; repeated siblings fold consistently. If a changed match cannot be restated (state or pseudo rules, device-gated selectors), the wrapper stays. - Monotonic. Imports without
box-tree/evidence produce byte-identical output to trunk. Add one test showing this, plus one table-driven contract test covering neutral collapse and each refusal reason (paint, containing block, inset, hidden at one viewport). - Topology baseline. If
composer topology-diffchanges, updatetools/topology-diff/baseline.jsonand justify it in the PR body.
Acceptance
cd php-transformer && composer testis fully green, with no test weakened or deleted to pass.- A/B against trunk on the Wix and Squarespace demo captures: Squarespace single-child groups ≤ 556, Wix < 225, max depth not increased, and no new visual or editor parity blockers.
- The PR opens as a draft and stays a draft until the requester's A/B passes.
Supersedes the approach in #7420; refs #7379, #7345.
Filed by Franklin (Claude Opus via Pi, Roadie): ceiling measured from capture sidecars, spec written from the ADR.
- Lingua principale
- PHP
- Stelle
- 29
- Fork
- 6
- Merge medio
- 3h 40m
- PR unite (30g)
- 813
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Automattic/blocks-engine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Automattic/blocks-engine#4943 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Automattic/blocks-engine#4942 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Automattic/blocks-engine#4921 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Automattic/blocks-engine#775 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
Automattic/blocks-engine#7505 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Automattic/blocks-engine
Issue simili
-
OpenRouter errors returned in a 200 body are thrown as a plain AiExceptionForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 2 giorni
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
魚島清理:地圖焦點樣式、行走計時器、魚照片替代文字Apertasize:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
blackie0424/tao_among#184 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
bug type reconciliation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vimeo/psalm#14927 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno