Skip to content

feat(ui): add shared media lightbox with zoom controls - #7840

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/chat-image-lightbox
Sep 15, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
codex/chat-image-lightbox

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Open composer and sent-message image thumbnails in a shared emcn lightbox.
  • Add bottom zoom controls and reuse the file viewers' trackpad pinch and scroll handling, preserving click-to-close and Escape dismissal.
  • Reuse the same viewer in docs and landing content, with existing platform styling.

Type of Change

  • Feature

Testing

  • Tested composer and sent-image previews, trackpad gesture events, 25–400% zoom, scrolling, reset, dismissal, focus restoration, and mobile sizing in the browser.
  • All eight cleanup passes complete; full-repo lint and 46 ship audits pass.
  • Sim, docs, and emcn type checks pass; 64 focused lightbox, wheel, and modal tests pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 15, 2026 2:14am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previous testing gap is addressed and no new actionable failure remains.

Summary

This PR consolidates image and video previews across docs, landing content, workspace attachments, and file viewers around a shared EMCN lightbox.

  • Adds shared image/video lightbox rendering with modal dismissal and focus restoration.
  • Adds 25–400% toolbar and trackpad zoom with pointer anchoring.
  • Moves reusable wheel handling into the EMCN package.
  • Migrates existing consumers and removes their local lightbox implementations.
  • Adds focused interaction and wheel-helper coverage.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Docs media] --> L[Shared EMCN Lightbox]
  B[Landing images] --> L
  C[Composer attachments] --> L
  D[Sent-message images] --> L
  L --> M[EMCN Modal]
  L --> Z[Zoom controls]
  L --> W[Shared wheel helper]
  W --> F[Existing file viewers]
Loading

Reviews (2) · Last reviewed commit: "fix(ui): share file viewer trackpad zoom..."

Comment thread packages/emcn/src/components/lightbox/lightbox.tsx
Comment thread apps/sim/app/(landing)/components/content-image/content-image.tsx
Comment thread packages/emcn/src/components/lightbox/lightbox.tsx
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1
waleedlatif1 merged commit 183175b into staging Sep 15, 2026
54 of 56 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/chat-image-lightbox branch September 15, 2026 02:18
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.

1 participant