non core block: authored-input

Đang mở
#6,168 3 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
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
html, javascript, node.js, php, wordpress
Lĩnh vực
frontend, tooling

Hướng nghiên cứu

Start from tools/import-loop/predicates/non_core_block.mjs in a static-site-importer checkout at 4be4e5ec; run it with reduced.html against <blocks-engine>/php-transformer as the command shows, and read emits.mjs/gates/collateral.mjs for the pass condition. Then trace where php-transformer turns the reduced input into an authored-input block and find the core-block equivalent. Done means the predicate no longer exits 0 on this page and the pixel-parity gate still passes.

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

Mô tả

Finding

editability/non_core_block on authored-input, seen in 1 route/width cell(s) of an imported site:

route width evidence
/advisor/ 1440 {"count":1,"of":22}

Reduced page (364 bytes)

Reduced from 101635 bytes in 37 predicate calls.

<!DOCTYPE html><html><head></head><body><input data-blocks-engine-capture-native-control-state="{&quot;version&quot;:1,&quot;kind&quot;:&quot;input&quot;,&quot;type&quot;:&quot;text&quot;,&quot;value&quot;:&quot;&quot;,&quot;defaultValue&quot;:&quot;&quot;,&quot;checked&quot;:false,&quot;defaultChecked&quot;:false,&quot;indeterminate&quot;:false}"></body></html>

Reproduce

The predicate exits 0 while the defect reproduces (checked against blocks-engine trunk 3d3f7d6ad). Run it from a static-site-importer checkout at 4be4e5ec, with the reduced page saved as reduced.html:

PREDICATE_TARGET='{"subject":"authored-input","route":"/advisor/","width":1440,"evidence":{"count":1,"of":22}}' \
  WORDPRESS_PATH=<wordpress with static-site-importer active> WP_CLI='studio wp' \
  node tools/import-loop/predicates/non_core_block.mjs <blocks-engine>/php-transformer reduced.html
predicates/non_core_block.mjs
// Exit 0 while the Blocks Engine output of a page still emits the generated
// block <prefix>/<subject>, a block outside WordPress core. An editor can only
// change its structure through the importer's own block, not with core tools.
// The defect is gone when the same content is built from core blocks and the
// page renders exactly as before; the acceptance gate holds the whole import to
// pixel parity (see emits.mjs, gates/collateral.mjs).
import { exitWhileEmitted } from './emits.mjs';
exitWhileEmitted();

Loop signature: d48272d9ff75


AI disclosure: filed by the static-site import findings loop (Homeboy workflow on the Lab). The finding, reduction, and body are generated by deterministic scripts; Claude (Anthropic) wrote those scripts with Chris Huber.

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.