-
Notifications
You must be signed in to change notification settings - Fork 1
fix(configurator): truthful live previews, reorganized typography, usable token rows #632
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
Merged
jackgranatowski
merged 7 commits into
main
from
claude/configurator-controls-audit-zqi10q
Jul 18, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f1d4a28
fix(configurator): live var() previews everywhere; unified per-type t…
claude ffe96e0
refactor(configurator): reorganize typography into sorted, complete s…
claude 660fbea
fix(configurator): unique, self-describing labels in the fluid scale …
claude ed4017f
fix(configurator): stack TokenRow layout — name, description, full-wi…
claude 61a38c5
fix(configurator): reset buttons always visible when a token is overr…
claude c6926e9
fix(configurator): address PR review comments
claude d88c7f8
fix(configurator): drop tokens from the TypographyPanel call site
claude 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
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,43 @@ | ||
| <script lang="ts"> | ||
| /** | ||
| * TypeSpecimenRow — one row of the typographic scale preview. The "Aa" | ||
| * renders at the token's real, live font-size (`var(--sf-…)` resolved in | ||
| * this document, which loads the framework tokens plus live overrides), and | ||
| * the label reports the actually rendered size measured from the DOM — the | ||
| * preview can never disagree with reality. | ||
| */ | ||
| let { label, varName, family = "--sf-font-body" }: { | ||
| label: string; | ||
| varName: string; | ||
| family?: string; | ||
| } = $props(); | ||
|
|
||
| let el = $state<HTMLElement | null>(null); | ||
| let px = $state(0); | ||
| let rootPx = $state(16); | ||
|
|
||
| $effect(() => { | ||
| if (!el) return; | ||
| const node = el; | ||
| const measure = () => { | ||
| px = parseFloat(getComputedStyle(node).fontSize) || 0; | ||
| rootPx = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16; | ||
| }; | ||
| measure(); | ||
| // A font-size change resizes the span, so ResizeObserver re-measures on | ||
| // every token/override change and on viewport-driven fluid changes alike. | ||
| const ro = new ResizeObserver(measure); | ||
| ro.observe(node); | ||
| return () => ro.disconnect(); | ||
| }); | ||
| </script> | ||
|
|
||
| <div class="flex items-baseline gap-2"> | ||
| <span class="text-[9px] font-mono text-slate-400 dark:text-slate-600 w-6 shrink-0 text-right">{label}</span> | ||
| <span | ||
| bind:this={el} | ||
| class="text-slate-900/80 dark:text-white/80 font-medium leading-none" | ||
| style={`font-size: var(${varName}); font-family: var(${family})`} | ||
| >Aa</span> | ||
| <span class="text-[9px] font-mono text-slate-400 dark:text-slate-600 ml-auto shrink-0">{px ? `${(px / rootPx).toFixed(2)}rem` : ""}</span> | ||
| </div> |
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
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.