-
Notifications
You must be signed in to change notification settings - Fork 62
DS 2.0 typography layer (wb-text-* roles) #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0b881a1
feat(ui): add DS 2.0 type role classes
librowski 1d2d20f
feat(sdk): bundle Inter for the UI/Code type role
librowski c06272f
docs: add the typography page to the UI Library section
librowski 6c90bbc
chore(ui): drop internal ticket reference from the provisional-block …
librowski 88ab1bb
fix(ui): typography review fixes
librowski 29fca06
feat(ui): ship Poppins and Inter with the ui package
librowski 38cb8ec
refactor(ui): rename the type-role classes to wb-text-*
librowski e2dbafe
docs(ui): prune paraphrase comments from the typography layer
librowski 5c41ed6
refactor(ui): move the provisional font-size primitives to their own …
librowski f4985c0
refactor(ui): underscore-prefix the provisional stylesheet
librowski a85e2b7
docs(sdk): move the wb-font-family lifecycle note to its definition
librowski 3f0d707
docs(ui): drop the wb-text section header
librowski 50f47a9
docs(ui): generalize the descendant-selector rationale
librowski 88c1606
docs(ui): drop the Regular-only comment
librowski b79afbb
chore: drop tracker ids from changeset filenames
librowski edcbb76
fix(ui): declare the fontsource dependencies the fonts entry imports
librowski 0c3e8d2
docs: deprecate the ax-public typography classes explicitly
librowski d28b093
refactor(ui): drop the descendant font selector from the code role
librowski 077dee3
docs(ui): tighten the fonts.css header to the two facts that matter
librowski 6c5addb
docs: drop the version label from evergreen prose
librowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@workflowbuilder/ui': minor | ||
| '@workflowbuilder/sdk': minor | ||
| --- | ||
|
|
||
| Add the Design System 2.0 type roles as `wb-text-{family}-{size}[-emphasized]` utility classes (39 styles: Display, Headline, Title, Body, Label, Node, UI/Code) in `@workflowbuilder/ui`, Poppins and Inter (for the `wb-text-code` role) now ship with `@workflowbuilder/ui` itself, so the classes work standalone; the SDK inherits the fonts through the UI package instead of bundling its own. Existing `ax-public-*` typography classes are unchanged. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| title: Typography | ||
| description: The type roles shipped by @workflowbuilder/ui as wb-text-* utility classes. | ||
| --- | ||
|
|
||
| `@workflowbuilder/ui` ships the type scale as utility | ||
| classes: one class per text style, named `wb-text-{family}-{size}` with an | ||
| optional `-emphasized` suffix. A class carries the complete style — family, | ||
| size, weight, and line-height — so text never hard-codes font values. | ||
|
|
||
| ```html | ||
| <h2 class="wb-text-headline-m">Workflow settings</h2> | ||
| <p class="wb-text-body-m">Configure how each node runs.</p> | ||
| <span class="wb-text-label-l-emphasized">Connection: active</span> | ||
| ``` | ||
|
|
||
| Two typefaces ship with `@workflowbuilder/ui` itself (via the root import; subpath-only consumers load them independently): **Poppins** for every UI role and | ||
| **Inter** for the `wb-text-code` role. Emphasized maps to SemiBold (600), | ||
| Regular to 400. | ||
|
|
||
| ## The scale | ||
|
|
||
| | Family | Used for | Classes (`wb-text-…`) | px | | ||
| | -------- | ------------------------------ | ---------------------------------------------- | ----------------- | | ||
| | Display | Hero moments, big empty states | `display-s` · `display-m` · `display-l` | 24 · 28 · 32 | | ||
| | Headline | Page titles, major sections | `headline-s` · `headline-m` · `headline-l` | 20 · 22 · 24 | | ||
| | Title | Card titles, group labels | `title-s` · `title-m` · `title-l` | 14 · 16 · 18 | | ||
| | Body | Running text, descriptions | `body-s` · `body-m` · `body-l` | 12 · 14 · 16 | | ||
| | Label | Buttons, chips, captions | `label-s` · `label-m` · `label-l` · `label-xl` | 10 · 12 · 14 · 16 | | ||
| | Node | Canvas node and port labels | `node-s` · `node-m` · `node-l` | 11 · 13 · 16 | | ||
| | UI/Code | Code, token names, IDs | `code` (Regular only) | 12 | | ||
|
|
||
| Every family except UI/Code doubles with an `-emphasized` variant | ||
| (`wb-text-title-m-emphasized`), for 39 styles total. | ||
|
|
||
| Which role to reach for: | ||
|
|
||
| | Context | Recommended role | | ||
| | ------------------------------- | -------------------------------- | | ||
| | Page / hero title | `display-*` or `headline-l` | | ||
| | Major section heading | `headline-s`/`-m` or `title-l` | | ||
| | Card or group title | `title-s`/`-m` | | ||
| | Running text and descriptions | `body-m` (`body-s` for dense UI) | | ||
| | Captions, helper text, metadata | `label-m`/`-l` | | ||
| | Buttons and chips | `label-l-emphasized` | | ||
| | Canvas node and port labels | `node-s`/`-m` | | ||
| | Code, token names, IDs | `code` | | ||
|
|
||
| ## Font-size tokens | ||
|
|
||
| Class font sizes reference the `--wb-font-size-*` primitives | ||
| (`wb/font-size/NNN` in Figma, where `NNN` ≈ px × 12.5, truncated; the CSS values are | ||
| rem). Until the token export ships them through | ||
| `@workflowbuilder/ui/tokens.css`, the classes define these primitives | ||
| themselves — the migration swaps the source without touching consumers. | ||
|
|
||
| The pre-2.0 `ax-public-*` typography classes are deprecated: components move | ||
| to `wb-text-*` as they are redesigned, and the old classes are removed in | ||
| 3.0.0. Do not adopt them in new code. |
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* PROVISIONAL — this whole file is scheduled for deletion. | ||
| Tokens the Figma token export does not ship yet, defined here so the | ||
| classes that consume them work today. When the export lands in tokens.css | ||
| its unlayered definitions override this layered block automatically; then | ||
| delete this file together with its two wire-ups (src/index.ts import and | ||
| the combine-css-bundle globals list) — both fail the build if forgotten. */ | ||
| @layer ui.base { | ||
| :root { | ||
| /* wb/font-size/NNN, NNN ≈ px × 12.5 (truncated). */ | ||
| --wb-font-size-125: 0.625rem; | ||
| --wb-font-size-137: 0.6875rem; | ||
| --wb-font-size-150: 0.75rem; | ||
| --wb-font-size-162: 0.8125rem; | ||
| --wb-font-size-175: 0.875rem; | ||
| --wb-font-size-200: 1rem; | ||
| --wb-font-size-225: 1.125rem; | ||
| --wb-font-size-250: 1.25rem; | ||
| --wb-font-size-275: 1.375rem; | ||
| --wb-font-size-300: 1.5rem; | ||
| --wb-font-size-350: 1.75rem; | ||
| --wb-font-size-400: 2rem; | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /* Bundled instead of CDN-fetched: strict CSPs, GDPR (pre-consent request), | ||
| and air-gapped deployments all rule a CDN out. Loaded via the root barrel | ||
| import — consumers importing only subpaths load the families themselves. */ | ||
| @import '@fontsource/poppins/latin-300.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-400.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-500.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-600.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-700.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-ext-300.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-ext-400.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-ext-500.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-ext-600.css' layer(ui.base); | ||
| @import '@fontsource/poppins/latin-ext-700.css' layer(ui.base); | ||
|
|
||
| /* Inter serves the UI/Code type role (wb-text-code), Regular only. */ | ||
| @import '@fontsource/inter/latin-400.css' layer(ui.base); | ||
| @import '@fontsource/inter/latin-ext-400.css' layer(ui.base); |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.