Skip to content

fix(markdown): prevent image links from trapping users - #6695

Merged
rebelchris merged 5 commits into
mainfrom
eng-2110-feedback-ux-issue-user-cannot-close-or-navigate-back-after
Sep 22, 2026
Merged

rebelchris merged 5 commits into
mainfrom
eng-2110-feedback-ux-issue-user-cannot-close-or-navigate-back-after

Conversation

@rebelchris

@rebelchris rebelchris commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prevent markdown image taps and image-target links from navigating away from the app shell by opening the shared image lightbox instead.
  • Preserve badge-style linked images by allowing image anchors that point to non-image pages to follow the link once.
  • Add image URL classification coverage for file extensions, query/fragment URLs, relative/protocol-relative URLs, and daily.dev media/Cloudinary hosts.

Verification

  • NODE_ENV=test corepack pnpm --filter @dailydotdev/shared exec jest src/components/Markdown.spec.tsx src/lib/image.spec.ts --runInBand
  • corepack pnpm --filter @dailydotdev/shared exec eslint src/components/Markdown.tsx src/components/Markdown.spec.tsx src/lib/image.ts src/lib/image.spec.ts --max-warnings 0
  • corepack pnpm typecheck:strict:changed
  • NODE_ENV=test corepack pnpm --filter webapp test

Issue: https://linear.app/dailydev/issue/ENG-2110/feedback-ux-issue-user-cannot-close-or-navigate-back-after-clicking-on

Closes ENG-2110


Created by Huginn 🐦‍⬛

Preview domain

https://eng-2110-feedback-ux-issue-user.preview.app.daily.dev

@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Sep 22, 2026 6:59am UTC

Request Review

Network mocks can finish before React commits the recovery modal. Await the modal heading in positive assertions so the shared test suite does not fail depending on render timing.
Require the image path for extensionless daily media URLs so video links remain navigable. Leave modified and non-primary clicks to the browser. Cover video classification and link navigation in regression tests, using detached containers to avoid the test harness's global link cancellation.
@rebelchris
rebelchris merged commit 993e6b2 into main Sep 22, 2026
7 of 11 checks passed
@rebelchris
rebelchris deleted the eng-2110-feedback-ux-issue-user-cannot-close-or-navigate-back-after branch September 22, 2026 06:58
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