You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0938106
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: skills/html2wp/references/repair.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,7 @@ merely moved is only the symptom.
112
112
|---|---|---|
113
113
| a class missing in WP (`.in`, `.is-visible`, `spa-in`), opacity 0 / translateY left | a source script that runs in the original never runs in WordPress | §6, the reveal incidents |
114
114
| the editor only (the page's frontend rows green): a rule matches on the frontend that the editor draws otherwise, with the same classes in the source | a listed script wraps or re-parents text (a `spring-scale`, split-text or per-letter wrapper), and a rule such as `.strip span` matches that wrapper. The editor runs no script, so it never gets the wrapper | the script's DOM writes (`createElement`, `innerHTML`, `.wrap`). Lever: `contract.editorStyles` with the settled values (§6, the script-wrapped text incident). Stop (§5) if the page's frontend row is red too, or the box is one the runtime owns |
115
+
| the editor only (the page's frontend rows green): a video box, the poster in the editor and another frame of the video on the frontend | a listed script seeks the player and leaves it there (a scroll video under reduced motion: `currentTime = duration -0.05`, its last frame). The editor runs no script, so it shows the poster | the script's writes to `currentTime`, and `video.currentTime` / `video.duration` read on the frontend at rest under the gates' capture conditions (reduced motion). Lever: the settled-frame flag on the block's proposal, `h2wpSettledFrame` (§6, the scroll video incident). Stop (§5) if the page's frontend row is red too |
115
116
| margin / padding / gap differs, same classes | cascade: a WordPress layout rule or a reset outranks the source rule (layers, `revert-layer`, flow-layout margins, `blockGap`) | the WordPress rule that wins: DevTools "computed → rule" on the WP side |
116
117
| font-family / colour differs | a stylesheet missing or out of cascade order on that page (a per-page sheet, an inline `<style>` between links) | the page's `<head>` order on both sides |
117
118
| an image blank on one side | not decoded (lazy image outside the viewport) or a request failed | the gate's `failedRequests` / `behavior.images` |
@@ -211,7 +212,9 @@ forbidden (§1) or a converter gap (§5).
211
212
**Gutenberg block plan (`block-plan/`)**
212
213
- Page proposals (`block-plan/pages/<key>.json`, the owning worker's file):
213
214
block choice, `className`, `h2wp/field``name`s, a page's own `styles[]`
214
-
(at most 20, source order) and its own scripts.
215
+
(at most 20, source order) and its own scripts; a `core/video`'s settled
216
+
frame (`attributes.h2wpSettledFrame`, canvas only, §6 the scroll video
217
+
incident).
215
218
- `contract.scripts[]` (dist `.js`/`.mjs`) and `contract.headScripts[]`: only
216
219
**reviewed source scripts**. The planner extracts every inline source script
217
220
to `assets/gutenberg-script-<hash>.js` and names that file in the
- **Causes:** invalid blocks (a proposal the compiler accepts but the editor
391
394
re-serializes differently); content a page script reveals, which the editor
392
395
shows in its hidden state; text a page script wraps on the frontend (a
393
-
wrapper span a rule then matches); per-page sheets outside the source layer; canvas
396
+
wrapper span a rule then matches); a video a page script leaves on a frame
397
+
the editor never seeks to (it shows the poster); per-page sheets outside the source layer; canvas
394
398
width against the content column; a box-less region (`display:contents`)
395
399
measured by the union of its descendants.
396
400
- **Lever:** `contract.editorStyles` for a settled script state (a reveal's
397
401
end state, or the typography of script-wrapped text, measured on the
398
-
frontend); the proposal for invalid blocks.
402
+
frontend); for a video a script leaves on a frame, the settled-frame flag
403
+
on its `core/video` proposal (`attributes.h2wpSettledFrame`, measured on the
404
+
frontend, §6); the proposal for invalid blocks.
399
405
- **Stop:** layering, width, height instability, the drop zone → the canvas
400
406
runtime's to fix → report (§6).
401
407
@@ -480,6 +486,7 @@ for the report's reader.
480
486
| A component form's email input with neither `name` nor `id` (finalize `field-name`; HTML: an empty submission) | A field the browser does not name is never submitted. The form's only unnamed email/tel/url field is named by its type. Anything ambiguous stays a finding | HTML: stage 2.65 `normalize-form-fields.py --apply`. Gutenberg: set the `h2wp/field``name` in the proposal (what a mail handler expects: `email`, `phone`, `message`…) and resolve with the name chosen | coordinator (auto-naming: df6f4df) |
481
487
| A source's inline reveal script never runs in WordPress, so `.reveal` never gets `.in` and sections stay hidden (G-front, e.g. clara `/index_v5/` 1.4%) | A behaviour the source's OWN script performs does not happen unless that script is shipped. The planner extracts it and blocks on `source-runtime`. Review the file and list it; then the editor, which runs no script, needs the settled state as canvas CSS | `contract.scripts` += the reviewed `assets/gutenberg-script-<hash>.js`; `contract.editorStyles` += a sheet setting the revealed end state (e.g. `.reveal{opacity:1;transform:none}`); resolve `source-runtime` naming the file and what it does | coordinator |
482
488
| A strip of names drawn in the editor as authored, not as the frontend showed it: the page's script wrapped each name in `<span class="spring-scale">`, which `.press-logos span` (uppercase, sans, letter-spaced) then matched on the frontend, while the canvas, which runs no script, showed the `:nth-child(even)` rule as written (italic serif, 3 px taller) (G-editor 3.9-9.9% on the front page only; G-front green) | A structure a listed script adds exists only on the frontend. The canvas gets its settled state as CSS only when all of these hold: the page's frontend rows are green (frontend matches source); the cause is traced to a script in `contract.scripts` and its named DOM write; the sheet expresses nothing but that settled state; it styles no box the runtime owns. Anything else is a converter gap (§5) | `contract.editorStyles` += the settled typography of the wrapped text, with values from `getComputedStyle` of the wrapper on the frontend at 1440, 820 and 390 (§2.4), never copied from the authoring sheet (`clamp()`, `var()`); resolve `source-runtime` naming the script, the wrapper it adds, the rule that matches on the frontend, the values on both sides and the width. Then prove it canvas-only: the page's frontend rows are unchanged and green, and `theme-report.json` has no stale-CSS warning for the sheet | coordinator |
489
+
| A scroll video drawn as its poster in the editor while the frontend showed its last frame: under reduced motion the page's script seeks `.scroll-video` to `duration - 0.05` and leaves it there, and the canvas, which runs no script, keeps the poster (G-editor 1.1-1.3% on the front page only; G-front green) | The canvas seeks a video only to a frame the coordinator declares, and only when all of these hold: the page's frontend rows are green (frontend matches source); the cause is traced to a script in `contract.scripts` (or the page's `scripts`) and its named seek; the frame declared is the one the frontend rests on under the gates' capture conditions (reduced motion, loaded, not playing), never a frame mid-scrub or mid-play, even when the page shows those to a visitor without reduced motion. Anything else is a converter gap (§5) | in `block-plan/pages/<key>.json`, on the video's `core/video` node, `attributes.h2wpSettledFrame`: `{"from": "end", "seconds": s}` for a script that counts back from the end (s = `duration - currentTime`), `{"from": "start", "seconds": t}` for one that seeks to a time (t = `currentTime`; 0 is the first frame). Read both on the frontend at rest under reduced motion (Playwright `reduced_motion='reduce'`, `networkidle`, then `video.currentTime` and `video.duration` once `video.seeking` is false); write the script's own constant when it states one (`0.05`), else the measured value rounded to the millisecond. The canvas seeks to exactly that. Resolve `source-runtime` naming the script, its seek, the measured `currentTime`/`duration` and the value declared. Then prove it canvas-only: the frontend markup and rows are unchanged and green, and the page's editor rows are green | coordinator |
483
490
| Reveal margins guessed after the first 16 components, so a late component waited as deep as another it resembled (G-front, a scroll step late) | Every component's reveal margin is measured. One with no margin reveals on entry | re-run stage -1 once the build carries it | fixed in the converter (e1fd04a) |
484
491
| A fast scroll, an anchor jump or a 700 px capture step carried a reveal past the viewport between two frames, and it never played (B/G-front: an image 40 px low on one run in two) | A reveal the page has scrolled past, or one on screen at the end of the document, plays | none; a reveal stuck at its start offset on a current build → report | fixed in the converter (7da8bd5) |
485
492
| Smooth scrolling (`scroll-behavior: smooth`) turned a gate's 700 px scroll-through into animations the next step retargeted: an image near its reveal depth photographed revealed on one run and 40 px low on the next (gate B) | Every scroll-through sets `scroll-behavior: auto` for its walk and restores it after | none in the gates; do the same in any scroll you script | fixed in the converter (2aa098c) |
0 commit comments