Treat platform express-checkout buttons in a bound add-to-cart form as an evidenced removal, not content loss
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start by reading the #6492 changes and the existing accepted-removal path in SourceContentConservationReporter, then trace how commerce_add_to_cart_form is bound. Add or update fixtures for the nested Shopify payment widget and for the same widget outside a bound form. Done means the bound case emits one info removal record and no html_content_dropped finding, while the unbound case still reports content loss and the #6492 cases pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Since #6492, source text dropped before emitted blocks is reported as html_content_dropped and counts toward content_loss_count. On commerce storefronts, one drop recurs on every product page: the platform's dynamic-checkout / express-payment button. Conversion drops it on purpose, because the target store provides its own checkout. With no evidence attached, though, it counts as content loss and fails the import gate.
Evidence (real Shopify storefront, Dawn-family theme)
On an otherwise intact product page, #6492 reports one finding. The selector is … > product-form > form > div, with lost run ["Comprar ahora"] ("Buy it now"). The source:
<div class="product-form__buttons">
<button type="submit" name="add">Add to cart</button>
<div data-shopify="payment-button" class="shopify-payment-button">
<shopify-accelerated-checkout …>
<shopify-buy-it-now-button access-token="…" page-type="product" slot="button">
<button type="button" class="shopify-payment-button__button shopify-payment-button__button--unbranded">Buy it now</button>
</shopify-buy-it-now-button>
</shopify-accelerated-checkout>
</div>
</div>
The add-to-cart form itself converts and binds (commerce_add_to_cart_form). Only the platform payment widget is gone.
Proposal
When the add-to-cart form binds, treat a platform express-checkout widget nested in it as an evidenced removal, not silent loss:
- Recognise it from structural or platform evidence: a known payment custom element (
shopify-buy-it-now-button,shopify-accelerated-checkout, or thedata-shopify="payment-button"host), or a non-submittype="button"sibling of the bound submit inside a payment-button host. Don't match on the button's text. - Emit an info-level
commerce_platform_checkout_removedrecord (selector, platform, lost text) through the existing accepted-removal path inSourceContentConservationReporter. - It must not count toward
content_loss_count. - If the enclosing form does not bind, keep reporting the drop as content loss.
Acceptance
- A neutral fixture shaped like the snippet above yields 0
html_content_droppedfindings and 1 info removal record, with the bound form unchanged. - The same widget outside a bound commerce form still yields
html_content_dropped. - The existing #6492 negatives and positives stay green.
AI assistance: drafted by an AI agent (Claude) under operator direction.
- Lenguaje dominante
- PHP
- Estrellas
- 28
- Forks
- 5
- Merge medio
- 2 h 53 min
- PR fusionados (30 d)
- 938
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Automattic/blocks-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4943 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#4921 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Automattic/blocks-engine#775 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Automattic/blocks-engine#6503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/blocks-engine
Issues similares
-
not confirmed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Bug (unconfirmed) Documentation :books:
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
FreshRSS/FreshRSS#9577 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vigetlabs/wordpress-site-starter#331 ·
Los mantenedores suelen responder en 17 días
-
Site Kit emails are rejected when the administration email's domain has a strict DMARC policyAbiertoP1 Team S Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
google/site-kit-wp#14189 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día