ADR 0005 slice 4: collapse neutral boxes on engine-styled routes

Aperta
#6,239 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
40/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php
Ambito
backend, testing

Direzione di ricerca

Read ADR 0005 (#6160), then inspect HtmlCompilation and how it consumes the classifier's per-node disposition on engine-styled routes. Check the slice 3 result and the box-tree v2 dependency (#6238) before changing the emission path. Done means a neutral chain collapses, a painting sibling remains, the reported group counts and depth metrics meet acceptance, and desktop/mobile parity has no regression.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Slice 4 of ADR 0005 (#6160). Depends on slice 3 (#6233, PR #6236) and box-tree v2 (#6238).

Goal: on routes where the engine owns the styles, a source box classified as neutral (equal-child-geometry: same border box as its only child at every captured viewport, no paint, clip, multi-child layout, containing block, semantics or interaction) emits no block. Its child takes its place in the parent.

Design:

  • Decide in HtmlCompilation before the wrapper turns into a core/group. The classifier's per-node disposition is the only authority; the existing WrapperCoalescer selector-survival heuristic doesn't apply on evidence routes, because no author selectors ship.
  • The child keeps its own engine rule. The removed box's rule is dropped, since its geometry equals the child's by construction.
  • Routes without evidence are untouched.

Acceptance (sdnunca Lab capture):

  • Emitted core/group count per route drops by at least the neutral structural boxes the classifier reports (Home 109, About 44 on trunk today).
  • Report max group depth and groups per leaf, measured on emitted blocks.
  • Desktop and mobile parity against the slice 3 result shows no regression.
  • One contract test: a fixture with a neutral chain collapses, and a sibling that paints is kept.

AI disclosure: written by Franklin (Claude Opus via Pi, Roadie).

Lingua principale
PHP
Stelle
28
Fork
5
Merge medio
2h 59m
PR unite (30g)
942

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/blocks-engine

Tutte le issue di Automattic/blocks-engine

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.