Skip to content

feat(theme): add callout title/description size recipes matching toast - #315

Merged
alexgrozav merged 2 commits into
mainfrom
agent/mere/75a375fa
Jul 15, 2026
Merged

alexgrozav merged 2 commits into
mainfrom
agent/mere/75a375fa

Conversation

@alexgrozav

Copy link
Copy Markdown
Contributor

What

Add two callout sub-part recipes — useCalloutTitleRecipe (callout-title) and useCalloutDescriptionRecipe (callout-description) — that give the callout the same per-size type scheme the toast recipe lands with. The title tracks the size axis on the literal token (sm → sm, md → md, lg → lg); the description sits one token below at every step (sm → xs, md → sm, lg → md), default md. The size prop is wired through the callout title/description components so the size stories render the scaled type.

Why

The callout and toast are sibling feedback components and must read consistently. The callout title/description previously had no explicit per-size font axis — they inherited the callout root — while the toast recipe already carries the scheme. This copies the toast recipe's landed values exactly (title sm/md/lg, description one token below at xs/sm/md) so the two recipes cannot drift. Implements SF-17.

How verified

pnpm --filter @styleframe/theme test
# ✓ Test Files 305 passed (305) · Tests 3330 passed (3330)

pnpm --filter @styleframe/theme typecheck
# ✓ tsc --noEmit, no errors

pnpm --filter @styleframe/storybook build
# ✓ Storybook build completed successfully (virtual-module shims regenerated)

pnpm --filter @styleframe/storybook typecheck
# ✓ vue-tsc --noEmit, no errors

oxlint <changed theme + storybook files>
# ✓ no findings

Notes

  • Changeset added (@styleframe/theme minor — purely additive recipes).
  • Callout doc page updated: size table now shows Title/Description columns, the sub-part recipes table lists the two new composables, and the register/build snippets reference them.
  • Observed while copying the source: the toast title recipe's docstring still claims title and description render "equal in size," which contradicts the landed values (description is one token below) and the toast description docstring. The callout docstrings here are written to match the landed values. Flagging as a minor toast doc-comment cleanup, not touched in this PR.

Add useCalloutTitleRecipe (callout-title) and useCalloutDescriptionRecipe
(callout-description) so the callout carries the same per-size type scheme
the toast recipe lands with. Title tracks the size axis on the literal token
(sm/md/lg); description sits one token below at every step (xs/sm/md),
default md. Values copied from the toast recipe's landed source so the two
siblings cannot drift. Wires the size prop through the callout title and
description components, adds colocated tests, a changeset, and the doc size
table.
@changeset-bot

changeset-bot Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 965d60e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@styleframe/theme Minor
@styleframe/playground Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
styleframe-dev Ready Ready Preview, Comment Jul 15, 2026 6:28am
styleframe-dev-storybook Ready Ready Preview, Comment Jul 15, 2026 6:28am

Request Review

The playground consumes Storybook's Callout.vue via the @storybook-components
alias; that component now imports calloutTitle/calloutDescription from
virtual:styleframe, but the playground's own callout.styleframe.ts didn't
register or export them, so plugin-playground#build failed with MISSING_EXPORT.
Register useCalloutTitleRecipe/useCalloutDescriptionRecipe here to match the
Storybook registration.
@alexgrozav
alexgrozav merged commit 3e3c650 into main Jul 15, 2026
14 checks passed
@alexgrozav
alexgrozav deleted the agent/mere/75a375fa branch July 15, 2026 08:34
@github-actions github-actions Bot mentioned this pull request Jul 15, 2026

This branch was successfully deployed

2 active deployments
Preview – styleframe-dev — 965d60ef Deployed Jul 15, 2026 by vercel[bot]
Preview – styleframe-dev-storybook — 965d60ef Deployed Jul 15, 2026 by vercel[bot]
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