fix(hero-card): render og headline in compact mode#4
Draft
Thanukamax wants to merge 1 commit into
Draft
Conversation
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.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
hero-cardog 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
Headlineblock already has acompactprop that caps the size at 72px —added exactly for tight formats — but
og.tsxwasn't passing it. One-line fix:Before / after
Before: headline overflows into the subtitle (reproducible with any short
hero-card og, including the shipped
drizzle-kv-adapterexample).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-appREADME banner, so that render is reproducible from this repo.
hero-card-ogsnapshot (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-adapterexample 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.