non core block: layout-shell@div[data-bg-effect-name][data-has-ssr-src][data-image-info][data-motion-part]

Abierto
#4,887 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #4910 de @chubes4 — fusionado

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php, wordpress
Área
backend

Línea de trabajo

Start with the PHP transformer in the blocks-engine checkout and reproduce the finding using the reduced page and predicate command in the issue. Trace how the wow-image element is transformed and identify a core-block representation that preserves its rendering. The issue considers the defect fixed when the page uses core blocks and renders with pixel parity; the collateral gate is referenced as emits.mjs and gates/collateral.mjs.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Finding

editability/non_core_block on layout-shell@div[data-bg-effect-name][data-has-ssr-src][data-image-info][data-motion-part], seen in 2 route/width cell(s) of an imported site:

route width evidence
/about/ 1440 {"route":"/about/","count":3,"of":129}
/ 1440 {"route":"/","count":1,"of":339}

Reduced page (507 bytes)

Reduced from 448939 bytes in 88 predicate calls.

<!DOCTYPE html><html><head></head><body><wow-image data-image-info="{&quot;displayMode&quot;:&quot;fit&quot;,&quot;imageData&quot;:{&quot;width&quot;:138,&quot;height&quot;:26,&quot;uri&quot;:&quot;/media/c837a6_1f682fef9fae4fe6974f26e1d8173148-mv2.png&quot;,&quot;name&quot;:&quot;logo&quot;,&quot;displayMode&quot;:&quot;fit&quot;}}" data-motion-part="BG_IMG undefined" data-bg-effect-name="" data-has-ssr-src=""><img src="/media/c837a6_1f682fef9fae4fe6974f26e1d8173148-mv2.png"></wow-image></body></html>

Reproduce

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

PREDICATE_TARGET='{"subject":"layout-shell@div[data-bg-effect-name][data-has-ssr-src][data-image-info][data-motion-part]","route":"/about/","width":1440,"evidence":{"route":"/about/","count":3,"of":129}}' \
  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: 8d00ff44daea


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.

Lenguaje dominante
PHP
Estrellas
25
Forks
3
Merge medio
2 h 23 min
PR fusionados (30 d)
942

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Automattic/blocks-engine

Todos los issues de Automattic/blocks-engine

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.