Skip to content

Redesign shared-lesson OG card: title-forward + play/soundform#638

Merged
mircealungu merged 3 commits into
masterfrom
audio-card-redesign
May 27, 2026
Merged

Redesign shared-lesson OG card: title-forward + play/soundform#638
mircealungu merged 3 commits into
masterfrom
audio-card-redesign

Conversation

@mircealungu
Copy link
Copy Markdown
Member

Why

At the size WhatsApp/iMessage render the card, the small ▶ 5 min · A1 · Conversation chips and the footer line were illegible and duplicated the og:description text shown right below. A preview card is read in <1s at thumbnail size — only what survives shrinking belongs on it.

What changed (card only; og:description unchanged)

Stripped the card to its essentials:

  • Title as hero, auto-sized (76→46px) to fit 1–3 lines and never collide with the audio cue.
  • " Audio Lesson" pill — states the category outright.
  • Brand elephant + Zeeguu wordmark.
  • A play button + full-width soundform as a wordless "listen" cue.

Removed from the card: the duration/level/type chips and the footer tagline — that detail already lives, legibly, in og:description ("A 5-min Romanian audio lesson at level A1. Listen to a real conversation and pick up the words.").

Also: drop the Topic: / Situation: prefix from the card title and og:title (clean_lesson_title) — it reads as clutter on a share ("Ordering coffee…" beats "Situation: Ordering coffee…").

Deploy notes

  • Cards are cached on disk per lesson_id. After deploy, clear the cache so existing lessons re-render with the new design:
    rm -f $ZEEGUU_DATA_FOLDER/og-images/shared-lessons/*.png
  • WhatsApp/etc. also cache previews per URL — already-scraped links keep the old card until their cache expires; a fresh share (or ?v=2) shows the new one immediately.

Verified by rendering long/short/x-long and a Situation: title via the real render_card.

🤖 Generated with Claude Code

The card is read at thumbnail size in chats, where the small chips
(duration/level/type) and footer were illegible and duplicated the og:description
below. Strip the card down to what survives shrinking:

- title as hero, auto-sized (76→46) to fit 1–3 lines without colliding
- "<Language> Audio Lesson" pill (states the category outright)
- brand elephant + Zeeguu wordmark
- a play button + full-width soundform as a wordless "listen" cue

Metadata (duration, level, type) stays in og:description, which is legible at
any size. Also drop the "Topic: " / "Situation: " prefix from the card title and
og:title (clean_lesson_title) — clutter on a share. og:description unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

ArchLens - No architecturally relevant changes to the existing views

mircealungu and others added 2 commits May 27, 2026 11:53
It names the category, so give it more presence (34→42px + padding). Verified it
still clears the wordmark for the longest language names (e.g. "Portuguese").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
"<Language> Lesson" instead of "<Language> Audio Lesson"; the card's play button
and soundform carry the "audio" meaning, so the word is redundant on the card.
(og:description text keeps "audio lesson" — no soundform next to it there.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mircealungu mircealungu merged commit 207ea30 into master May 27, 2026
3 checks passed
@mircealungu mircealungu deleted the audio-card-redesign branch May 27, 2026 09:58
mircealungu added a commit that referenced this pull request May 27, 2026
Mirrors the audio-lesson previews (#637/#638) for articles shared as
zeeguu.org/read/article?id=N. New public, no-auth endpoints in article.py:
- GET /shared_article_preview/<id>  → server-rendered OG/Twitter HTML
- GET /shared_article_image/<id>.png → a 1200x630 card

The card features the article's own photo full-bleed under a scrim, with the
title, source, reading time (word_count/200), and CEFR level — falling back to
the branded cream card when an article has no image (rendered by
og_image.render_article_card). A transient image-fetch failure serves the
fallback without caching it, so the photo card appears once the fetch succeeds.

nginx routing for /read/article is staged separately in the ops repo.

Co-authored-by: Claude Opus 4.7 (1M context) <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