Skip to content

Commit 40ea278

Browse files
docs(hub-client): changelog entry for Plan 2D body container + title block
1 parent 3b06447 commit 40ea278

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

hub-client/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ be in reverse chronological order (latest first).
1515

1616
### 2026-05-10
1717

18+
- [`3b064478`](https://github.com/quarto-dev/q2/commits/3b064478): Plan 2D q2-preview body container + title block. `PreviewDocument.tsx` now emits the `<div id="quarto-content"><main class="content">` wrapper mirroring `template.rs:185-247`, applies `body-classes` imperatively to `document.body`, and re-implements the Rust `title-block` transform's minimal-mode `<h1>` synthesis React-side (the transform itself stays in `Q2_PREVIEW_TRANSFORM_EXCLUDED`). Iframe `document.title` now tracks `meta.pagetitle ?? meta.title`. New `q2-preview/custom/PreviewTitleBlock.tsx` mirrors `template.rs:211-240` byte-for-byte and is registered under the synthetic `__title_block__` registry key; user TSX overrides can full-replace or compose via the `__Q2_PREVIEW_RENDERER__.PreviewTitleBlock` exposure. Phase 6.0 framework extraction lifts `inlinesToPlainText` / `blocksToPlainText` to `framework/plainText.ts` and adds `framework/meta.ts` (`extractMetaString` / `extractMetaBool` / `extractMetaStringList`); `FormatRegistry` gains typed optional entries for both synthetic keys. The slide renderer's private `extractMetaString` is replaced by the framework helper (deliberate behavior change for inline-markup in slide titles, locked by a regression test); `meta.format` extraction in `ReactRenderer.tsx` and `getQ2Format.ts` consolidates onto the same helper. Tests: 27 framework unit, 18 PreviewDocument integration, 17 PreviewTitleBlock integration (incl. composition idiom), explicit synthetic-key assertion closing a pre-existing `__fallback__` gap; 11 smoke-all q2-preview fixtures (body-container + body-classes + title-block).
1819
- [`c8a684bd`](https://github.com/quarto-dev/q2/commits/c8a684bd): Fix bd-3gtn: WASM artifact-flush loop in `wasm-quarto-hub-client/src/lib.rs` was overwriting user-uploaded image bytes with empty content on every render. `ResourceCollectorTransform` produces manifest-only entries via `Artifact::from_path` whose absolute path collapsed via the absolute-replace rule of `Path::join` onto the user's VFS upload location. Both flush loops now skip empty-content artifacts, preserving manifest semantics for downstream consumers while keeping produced bytes (theme CSS, fonts, future engine-generated images) flowing. Discovered during Plan 2A review (2026-05-07) and routed-around by Plan 2B until now; the test in `assetManifestProject.wasm.test.ts` was reverted to its natural lifecycle (binary upload BEFORE render) for a bug-then-fix walk-through.
1920
- [`d91150c4`](https://github.com/quarto-dev/q2/commits/d91150c4): Plan 2B Phase 5.2 and 5.3: smoke-all `q2-preview/image-with-attrs.qmd` fixture (with a 1x1 PNG sibling) and the `assetManifestProject.wasm.test.ts` WASM-bridge safety net. The smoke fixture asserts the parent-side asset walker mints a blob URL, propagates the width attribute, and round-trips alt text. The WASM test mirrors `themeFingerprint.wasm.test.ts` and renders a `_quarto.yml`-rooted project doc with a project-relative Image, then exercises the walker against the parsed AST and project-relative `currentFilePath`. Catches default-project resolution bugs analogous to the Plan 2A theme path mismatch (commit e6381abd). 82/82 WASM tests pass.
2021
- [`25d98df5`](https://github.com/quarto-dev/q2/commits/25d98df5): Plan 2B Phase 3 and 5.1: built-in registry of Pandoc-base leaves. q2-preview ships 14 Block components and 20 Inline components, replacing the empty Plan 2A registry. Image is a pure AssetManifestContext consumer (no VFS access in the iframe). Math is a near-verbatim port of Elliot Math leaf with two divergences: direct ESM `import katex` (window.katex is only set after LOAD_CUSTOM_COMPONENTS) and an explicit raw-LaTeX fallback on KaTeX error. Note is the JS-side number-with-tooltip-body fallback for `reference-location: block` and `section` (the default `document` configuration runs through FootnotesTransform upstream). New `q2-preview/utils.ts` ships `lookupAssetUrl`, `inlinesToPlainText`, `blocksToPlainText`. New stub `q2-preview/quartoClasses.ts` covers section, footnotes, and appendix constants. The framework dispatch table gains 5 new renderChildrenRegistry entries for Underline, Strikeout, Superscript, Subscript, SmallCaps. Plan 2A empty-registry tests are replaced by 21 new q2-preview integration tests (Pandoc base rendering, gap-fill components, Image edge cases, atomic CustomNode read-only, recursion-contract bypass, class-compatibility); q2-debug gains a parity test for the atomic gate. 688 unit + 112 integration tests pass.

0 commit comments

Comments
 (0)