Repository navigation
fix(web): click-to-zoom lightbox on all media thumbnails - #256
Merged
Merged
Conversation
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(() => { |
🔍 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
MediaLightbox.svelte: full-screen image preview dialog (Escape / backdrop / X to close, body scroll lock).ScheduleDetailmodal,PostDetailmodal.media/+page.sveltealready 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.cursor: zoom-in, lightbox opens full-screen, closes via X / Escape / backdrop (manual DOM-level verification).