You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tokens): add editorial typography family (#1940)
* feat(tokens): add editorial typography family
Adds a Sora-based editorial typography token family for brand-themed
surfaces (empty states, hero moments, announcements) that need the
marketing-site type system rather than the utility scale.
- New `fontFamily.sora` with Inter fallback
- New `fontSize.editorial.{14..80}` rungs (pixel-named to match size
primitives; avoids style-dictionary CSS font-shorthand emitter
mis-tokenizing 4-digit rung names)
- New `fontWeight.editorial.{medium,semibold,bold}` namespace
- New unitless `lineHeight.editorial.{tight,snug,close,default,relaxed}`
- New top-level `letterSpacing` group with `editorial.*` sub-namespace
(consumers apply alongside the typography shorthand since CSS font
shorthand does not include letter-spacing)
- 7 new `text.editorial.*` compositions: display, h1, h1-alt, h2, h2-alt,
h2-medium, h3 — Sora-only; Söhne mixins deferred pending licensing
- Adds `size.30` and `size.50` primitives required by the new scale
Source of truth: `_typography.scss` and `Text/index.tsx` DEFAULT_WEIGHT
map in launchdarkly-nextjs/ai-refresh.
Phase 2 (gonfalon Sora global preload + fairytale rollout) lands in a
separate PR — see Editorial Typography Tokens proposal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(tokens): split typography story into Utility and Editorial sections
Replaces the single Typography story with two stories so each section
renders with its own heading and description above its own canvas.
Custom docs page (Title + Description + Stories with includePrimary
and no section title) skips the default Primary canvas and removes
the "Stories" separator heading.
Editorial label rendering: getDisplayText now handles editorial keys
by expanding h1/h2/h3 to "Heading 1/2/3" with alt and medium kept as
variant suffixes. Component description mentions the two type sets
and links to the Utility & Editorial Type System proposal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(tokens): load Sora in Storybook + fix editorial heading tags
Storybook now demonstrates the actual Sora editorial type instead of
silently falling back to Inter: the Editorial specimens render with
font-family var(--lp-font-family-sora) ("Sora, Inter, ..."), but no
Sora webfont was loaded in the preview, so they rendered in Inter.
- preview-head.html: load Sora from Google Fonts (OFL) for Storybook
specimens only. The in-product @font-face/preload ships in Phase 2
(gonfalon), so this stays scoped to the docs surface.
- typography.stories.tsx: map editorial-h1/h2/h3 to real h1/h2/h3 tags
in getSemanticElement (previously fell through to a generic div);
drop a stray per-token console.log.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(box): flatten fontSize/fontWeight/lineHeight token groups; add changeset
The editorial typography tokens nest an `editorial.*` sub-namespace under
fontSize, fontWeight, and lineHeight. Box's rainbow-sprinkles passed these
groups straight into defineProperties, which expects a flat
Record<string, string>, so the nested objects broke its overload typing —
cascading into BoxProps and every <Box> consumer (preview, stories, specs)
failing Type Check.
Flatten those three groups via `flat` (the same treatment the `font`
typography group already gets), so editorial.* tokens become flat keys and
defineProperties typing holds. Also adds the missing changeset for the
@launchpad-ui/tokens + @launchpad-ui/box changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a Sora-based editorial typography token family for brand-themed surfaces (empty states, hero moments, announcements). Adds `fontFamily.sora` (with an Inter fallback), pixel-named `fontSize.editorial.*`, `fontWeight.editorial.*`, unitless `lineHeight.editorial.*`, a new top-level `letterSpacing.editorial.*` group, seven `text.editorial.*` compositions, and `size.30`/`size.50` primitives. All values mirror the `ai-refresh``_typography.scss` source of truth. Existing utility `text.*` compositions are unchanged.
7
+
8
+
Box's `rainbow-sprinkles` now flattens the `fontSize`, `fontWeight`, and `lineHeight` token groups (matching how the `font` typography group is already handled) so the nested `editorial.*` sub-namespaces don't break `defineProperties`' flat-record typing.
'Typography tokens for the LaunchPad design system. For components using these tokens, see [Text](/docs/components-content-text--docs), [Heading](/docs/components-content-heading--docs), [Label](/docs/components-content-label--docs), and [Code](/docs/components-content-code--docs).',
15
+
'Typography tokens for the LaunchPad design system. Our typography is split between two type sets: Utility and Editorial. For components using these tokens, see [Text](/docs/components-content-text--docs), [Heading](/docs/components-content-heading--docs), [Label](/docs/components-content-label--docs), and [Code](/docs/components-content-code--docs). For the full framework, see the [Utility & Editorial Type System for LaunchPad](https://launchdarkly.atlassian.net/wiki/spaces/~712020490f77e4363240f1888e975e52e895be/pages/4939022523/) proposal.',
constUTILITY_DESCRIPTION=`The foundation of the LaunchDarkly product. Inter for text, SF Mono for numeric content where vertical alignment matters. Designed to feel invisible: when it's working correctly, users don't notice it. Used across navigation, forms, tables, modals, settings, and any task-driven surface.`;
214
+
215
+
constEDITORIAL_DESCRIPTION=
216
+
'Carries the LaunchDarkly brand voice into the product by using Sora for display headings. Used on first-time onboarding empty states, in-app banners, feature announcements, and educational moments where the user has paused. Should feel intentional and slightly different from the rest of the UI.';
0 commit comments