Skip to content

fix(hero-card): render og headline in compact mode#4

Draft
Thanukamax wants to merge 1 commit into
BitByBit-B3:mainfrom
Thanukamax:fix/hero-card-og-compact-headline
Draft

fix(hero-card): render og headline in compact mode#4
Thanukamax wants to merge 1 commit into
BitByBit-B3:mainfrom
Thanukamax:fix/hero-card-og-compact-headline

Conversation

@Thanukamax

Copy link
Copy Markdown
Collaborator

What

The hero-card og template rendered its headline at full auto-sized scale.
A short headline hits the largest tier (up to 128px) and overflowed the 630px
og frame, so the subtitle rendered on top of the headline.

The Headline block already has a compact prop that caps the size at 72px —
added exactly for tight formats — but og.tsx wasn't passing it. One-line fix:

- {Headline({ text: data.headline })}
+ {Headline({ text: data.headline, compact: true })}

Before / after

Before: headline overflows into the subtitle (reproducible with any short
hero-card og, including the shipped drizzle-kv-adapter example).
After: headline sits at ≤72px and the subtitle clears it.

Also included

  • examples/create-b3-cf-app.json — the brief behind the create-b3-cf-app
    README banner, so that render is reproducible from this repo.
  • Re-baked hero-card-og snapshot (hash + reference PNG).

Verification

  • pnpm test ✅ 104 passed (incl. brand-guard, catalog:check, all snapshots)
  • pnpm typecheck

Known follow-up (not in this PR)

Headlines long enough to wrap to two lines still overlap the subtitle in the
tight formats — Satori under-measures wrapped-text height. The
drizzle-kv-adapter example trips this even with compact. That's a separate,
deeper layout fix; single-line headlines are clean after this PR. Happy to take
the wrap case in a follow-up if you want.

Draft for review.

The og hero-card passed the headline through at full auto-sized scale, so a
large (short) headline rendered at up to 128px and overflowed the 630px frame,
colliding with the subtitle. The Headline block already exposes a `compact`
flag (caps size at 72px) intended for tight formats — the og template just
wasn't using it. Pass compact: true so the headline fits.

Also adds examples/create-b3-cf-app.json (the brief used for the
create-b3-cf-app README banner).

Snapshot for hero-card-og re-baked. All 104 tests + typecheck pass.

Known follow-up (not fixed here): headlines long enough to WRAP to two lines
still overlap the subtitle (Satori under-measures wrapped text height) — e.g.
the drizzle-kv-adapter example. Separate issue; single-line headlines are clean.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0aad93a7-5126-4c66-ba7a-26a29148c41a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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