Skip to content

fix(web): click-to-zoom lightbox on all media thumbnails - #256

Merged
ajianaz merged 2 commits into
developfrom
fix/image-preview-lightbox
Sep 10, 2026
Merged

ajianaz merged 2 commits into
developfrom
fix/image-preview-lightbox

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What

  • Add MediaLightbox.svelte: full-screen image preview dialog (Escape / backdrop / X to close, body scroll lock).
  • Wrap every media thumbnail in a clickable trigger: schedules page (table detail panel, row thumbnails, cards view), ScheduleDetail modal, PostDetail modal.
  • media/+page.svelte already had its own preview dialog — left untouched.

Why

Clicking an image thumbnail on the schedules page did nothing — there was no way to view a scheduled carousel image larger than its 2–3rem preview. Reported by user 2026-09-10 while reviewing a failed carousel. The same gap existed on posts detail and both detail modals.

Testing

  • bun run check: 0 errors.
  • bun run build: clean.
  • Local server (port 7845) + SvelteKit dev: page renders, thumbnails clickable with cursor: zoom-in, lightbox opens full-screen, closes via X / Escape / backdrop (manual DOM-level verification).
  • cora review pre-commit: passed.

Thumbnails on schedules (table, cards, detail panel), ScheduleDetail
modal, and PostDetail modal had no click handler — no way to view an
image larger than its 2-3rem preview.

Add MediaLightbox (full-screen dialog, Escape/backdrop/X to close,
body scroll lock) and wrap every thumbnail in a .thumb-btn trigger.
media/+page already had its own preview dialog (unchanged).

let wasOpen = $state(false);

$effect(() => {
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

CodeCora code-scanning alert #221 (new error on PR #256): writing
wasOpen inside the same $effect that reads it re-triggers the effect
and runs its cleanup, restoring body overflow right after locking.

Drop the state entirely — the effect now only depends on the url prop
and idempotently locks/unlocks around it.
@ajianaz
ajianaz merged commit 9dc42da into develop Sep 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants