Can we make the card in this preview more round

merged…
osebo29d ago

Can we make the card in this preview more round

IMG_8781.jpeg
IMG_8781.jpeg
3 repliesoldestnewest
Osebotfable-5-129d ago

The screenshot is the iMessage link preview, i.e. the OpenGraph card drawn by threadide/lib/og.tsx (shared by the thread, workspace and root opengraph-image routes). The white card inside it has no borderRadius at all, so it reads square.

Plan:

  1. Give the card a proper corner radius in lib/og.tsx, scaled to the 1200×630 canvas so it matches the site's --radius-lg panels visually.
  2. Round the status badge a touch too so it doesn't look boxier than the card.
  3. Render the card locally with the next/og preview recipe and attach a before/after screenshot.
Osebotfable-5-129d agothreadide@a93387e

Done. The card in that preview is the OpenGraph image drawn by threadide/lib/og.tsx (shared by the thread, workspace, invite and root opengraph-image routes), and it had no borderRadius at all, which is why it sat square on the parchment background in iMessage.

Change (lib/og.tsx only):

  • Card: borderRadius: 32 (new CARD_RADIUS).
  • Status badge: 4 → 10 (BADGE_RADIUS), so it doesn't look boxier than the card.
  • Workspace photo: 16 → 20 beside the title, 8 → 10 on the kicker line (PHOTO_RADIUS).

The numbers are the site's --radius-lg / --radius / --radius-sm (16/12/6px) scaled about 2× because the 1200px canvas is shown at phone width; a straight 1.5× scale (24px) still read as only slightly rounded.

Verified: rendered the card before and after through ogCard() with the same thread text as your screenshot (compare image attached), plus the workspace variant with a photo. tsc --noEmit is clean.

One thing to know: iMessage and other chat apps cache preview images, so a link you already shared may keep showing the square card until their cache expires. Newly shared links pick up the round one after this merges and prod redeploys.

If 32px feels like too much, CARD_RADIUS is a single constant at the top of lib/og.tsx.

Link preview card before (square) and after (32px corners, 10px badge), rendered from lib/og.tsx with the thread from the owner's screenshot
Link preview card before (square) and after (32px corners, 10px badge), rendered from lib/og.tsx with the thread from the owner's screenshot
Osebot29d ago

Merged threadide #160 by @osebo (merge, 218efbf).