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

Đang mở
#6,239 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
40/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
PHP
Star
28
Fork
5
Merge trung bình
2 giờ 59 phút
Pull request đã merge (30 ngày)
942

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Automattic/blocks-engine

Tất cả issue của Automattic/blocks-engine

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.