refactor(profile): use shared ImageView lightbox for workspace photos#6227
Merged
tsahimatsliah merged 1 commit intoJun 21, 2026
Merged
Conversation
Replace the bespoke inline lightbox in ProfileUserWorkspacePhotos with the shared LazyModal.ImageView (ImageModal), so both surfaces share one implementation and can't drift. The shared modal adds a FLIP zoom-from-thumbnail entrance, capture-phase Escape handling, body scroll-lock with scrollbar compensation, and an onError fallback. - Open the lightbox via useLazyModal().openModal with the clicked thumbnail's bounds (getImageOriginRect) so it expands from the photo. - Thread the click event through WorkspacePhotoItem's onClick to capture those bounds. - Drop the selectedPhoto state, the inline dialog markup, the Esc listener, and the now-unused CloseButton/useEventListener imports. - Update the spec to assert the click delegates to LazyModal.ImageView (the lightbox's own close/Esc behavior is covered by ImageModal.spec). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
Folded into #6224 (the workspace-photos refactor commit now lives on that branch), so there's a single PR for the team to review. Closing this one. |
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
Replace the bespoke inline image lightbox in
ProfileUserWorkspacePhotoswith the sharedLazyModal.ImageView(ImageModal), so the workspace-photos viewer and the post image lightbox share one implementation and can't drift.The shared modal is strictly more capable: FLIP zoom-from-thumbnail entrance, capture-phase Escape handling, body scroll-lock with scrollbar compensation, and an
onErrorfallback.Changes
useLazyModal().openModal({ type: LazyModal.ImageView, props: { src, alt, originRect: getImageOriginRect(el) } })so it expands from the clicked photo.WorkspacePhotoItem'sonClickto capture the thumbnail bounds.selectedPhotostate, the inline dialog markup, the Esc listener, and the now-unusedCloseButton/useEventListenerimports.LazyModal.ImageView(the lightbox's own close/Esc behavior is covered byImageModal.spec.tsx).Notes
claude/elegant-sammet-973b0a): depends ongetImageOriginRect/LazyModal.ImageView, which land there. Retarget tomainonce feat(post): article view improvements (lightbox, action bar, modal shell) #6224 merges.Verification
node ./scripts/typecheck-strict-changed.js✅ ·eslinton changed files ✅ · updated spec ✅🤖 Generated with Claude Code
Preview domain
https://claude-workspace-photos-imagevie.preview.app.daily.dev