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
* test(repro): Image.astro src resolution for migrated nodes (#1404 render follow-up)
* test(repro): faithful container render of migrated image node (#1404 render follow-up)
Renders the real RAFYC image node through astro-portabletext via the production
dispatch (type.image -> Image.astro), default vs delegating override vs no-locals.
All three emit a valid src: the override receives the full node intact and
delegation to <Image> does NOT render empty. Confirms alignment is dropped.
* feat(image): honor image alignment + surface display size for migrated images (#1404)
Renderer (core/Image.astro): add alignment to the PT image node props and
emit an emdash-image--align-{left,right,center,wide,full} figure class with
default CSS (floats wrap text; wide/full span the column).
Editor (admin): thread alignment through the PortableText<->TipTap serializer
(both directions), the TipTap image node attribute/commands, and add an
alignment selector to ImageDetailPanel. Also relax the Display Size gate from
(width && height) to (src) so migrated WordPress images, which carry only
displayWidth/displayHeight and no original dims, can still be resized; the
aspect-ratio lock and reset-to-original now degrade gracefully when originals
are unknown.
Repro test asserts the renderer now emits the alignment class.
* feat(image): reflect alignment in the editor node view (#1404)
Float left/right (text wraps) and size center/wide/full in the TipTap image
NodeView so the editor preview matches the published <Image> output.
* style: format
* chore: add changeset for image alignment fix (#1404)
* test: genericize #1404 repro comments (drop downstream references)
* feat(image): un-float aligned images on narrow screens (#1404)
Add a max-width:640px media query so left/right-aligned images drop to
full-width blocks on phones instead of staying floated and cramped.
* test(core): stop render tests breaking the plain-node unit run
The #1404 follow-up added tests/repro/*.render.test.ts (which import
.astro components) plus vitest.repro.config.ts (Astro Vite plugin), but
never wired the runner up. The default vitest.config.ts swept the render
test into its plain-node run, which cannot transform .astro, so the whole
core suite failed to load (0 tests collected).
- vitest.config.ts: exclude tests/repro/**/*.render.test.ts (needs Astro)
- package.json: add test:repro script (mirrors test:smoke/test:integration)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: run repro render tests in the Tests job
5c26f31 split the Astro render test out of the plain-node test:unit
run (vitest.repro.config.ts + test:repro script) but the CI invocation
was never committed, so the #1404 alignment/display-size render
coverage would not execute in CI.
Run the repro config right after test:unit in the Tests job.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(core): address review — drop fake repro test, de-number titles
Per @ascorbic review on #1406:
- delete tests/repro/image-render.test.ts: it only exercised local
reimplementations (buildRenderMediaUrl), not the real component; the
real coverage lives in image-render.render.test.ts.
- strip the 1./2./3. numbering from the render test titles.
- drop the throwaway #1404-follow-up header line.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Matt Kane <mkane@cloudflare.com>
Honor image alignment from WordPress imports at render and in the editor, and surface display-size controls for migrated images.
6
+
7
+
The Gutenberg to Portable Text importer already captured image `alignment`, but it was dropped by the renderer and not editable. `Image.astro` now emits `emdash-image--align-*` classes (left/right float, center, wide/full), the admin editor threads `alignment` through the PortableText/TipTap serializer and image node and adds an alignment control that reflects in the node view, and the Display Size panel now shows for migrated images that carry only display dimensions.
0 commit comments