Skip to content

feat(post): article view improvements (lightbox, action bar, modal shell)#6224

Open
tsahimatsliah wants to merge 4 commits into
mainfrom
claude/elegant-sammet-973b0a
Open

feat(post): article view improvements (lightbox, action bar, modal shell)#6224
tsahimatsliah wants to merge 4 commits into
mainfrom
claude/elegant-sammet-973b0a

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jun 21, 2026

Copy link
Copy Markdown
Member

What

Reading-focused improvements to PostFocusCard and the post-modal shell, across all redesign post types (article, video, share/freeform/welcome, collection) on both the modal and the page — plus reuse of the new shared image lightbox in the profile workspace-photos grid.

Image lightbox

  • Cover image and in-article (markdown) images open a full-screen, viewport-centered viewer (max-h/max-w object-contain, dark blurred backdrop, X pinned to the screen corner) instead of navigating away. New ImageModal registered as LazyModal.ImageView; the extension companion falls back to a new tab.
  • Expands from the clicked thumbnail with a smooth, uniform-scale FLIP (the corner radius stays a constant ~16px throughout — no distortion or radius snap), and a zoom-in cursor on clickable images. Closes on backdrop / X / Esc (Esc scoped so it doesn't also close the post modal) and locks background scroll while open (with scrollbar compensation so the page doesn't shift).

Focus card

  • Engagement bar moved above the "Share your thoughts" composer; restyled as a floating pill (translucent surface-float, blur, soft shadow) and sticky at both edges, tablet and up. Surfaces upvote/comment/award counts + the "…" menu when pinned; analytics icon dropped (redundant with the stats-row link).
  • Read post button moved under the title; three-dots menu moved to the card header.
  • Comment sort is now a flush-left text link (no "Sort:" label).

Modal shell

  • Hide the duplicate top-strip "…" menu in the redesign via a new hideOptions prop wired through navigationRedesign on the Article/Collection/Share modals.
  • Backdrop pinned to a fixed ::before layer so it no longer scrolls away; overscroll-behavior: contain stops scroll chaining to the feed.

Tooltips

  • Profile hover cards use a fixed Popper strategy + viewport preventOverflow/flip so they're no longer clipped by the modal's overflow: clip.

Profile workspace photos

  • The bespoke inline lightbox in ProfileUserWorkspacePhotos is replaced by the shared LazyModal.ImageView, so both surfaces share one implementation (FLIP entrance, Esc handling, scroll-lock, onError fallback) and can't drift.

Notes

Verification

  • node ./scripts/typecheck-strict-changed.js ✅ · eslint on changed files ✅ · ImageModal + workspace-photos jest specs ✅ · full CI green

🤖 Generated with Claude Code

Preview domain

https://claude-elegant-sammet-973b0a.preview.app.daily.dev

…ell)

Reading-focused improvements to PostFocusCard and the post-modal shell,
across all redesign post types (article, video, share/freeform/welcome,
collection) on both the modal and the page.

- Image lightbox: cover + in-article images open a full-screen, viewport-
  centered viewer (ImageModal / LazyModal.ImageView) that expands from the
  clicked thumbnail (FLIP), with a dark blurred backdrop and a corner close.
  Closes on backdrop / X / Esc (Esc scoped so it doesn't also close the post
  modal) and locks background scroll. Companion falls back to a new tab.
- Engagement bar: moved above the comment composer, restyled as a floating
  pill, sticky at both edges (tablet+); surfaces counts + "…" menu when
  pinned. Read-post button moved under the title; three-dots menu moved to the
  card header. Comment sort is a flush-left text link.
- Modal shell: hide the duplicate top-strip "…" menu in the redesign
  (navigationRedesign -> hideOptions); pin the backdrop to a fixed layer so it
  no longer scrolls away; contain overscroll.
- Tooltips: profile hover cards use a fixed Popper strategy + viewport
  preventOverflow/flip so they're no longer clipped by the modal's overflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jun 21, 2026 12:14pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jun 21, 2026 12:14pm

Request Review

- Extract getImageOriginRect (in ImageModal) and use it from both the Markdown
  in-article images and the PostFocusCard cover image, instead of duplicating
  the getBoundingClientRect → originRect shape at each call site.
- Add an onError fallback on the lightbox image: with an origin rect it starts
  opacity-0 and is only revealed by the FLIP on load, so a failed image load
  would otherwise leave an empty full-screen overlay — reveal it so the
  broken-image/alt state shows instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The FLIP entrance scaled the image with independent x/y factors and a fixed
corner radius, so the image warped mid-flight and its rounded-16 corners
rendered near-square at the small start scale before snapping round — reading as
a glitch.

- Use a single uniform scale (contain within the thumbnail) so the aspect ratio
  is preserved and the image never distorts.
- Grow from the thumbnail's center (transform-origin + center-aligned translate)
  instead of the top-left corner.
- Pre-divide the corner radius by the scale and transition it, so the rendered
  radius stays a constant ~16px for the whole animation instead of snapping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
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