Skip to content

feat(configurator): inline detached-scale notices for radius/border/motion (follow-up) - #701

Merged
jackgranatowski merged 3 commits into
mainfrom
ux/configurator-scale-detach
Aug 20, 2026
Merged

jackgranatowski merged 3 commits into
mainfrom
ux/configurator-scale-detach

Conversation

@jackgranatowski

Copy link
Copy Markdown
Contributor

Follow-up #5 — detached-scale notices for radius, border-width & motion

Stacked on #691 → … → #700. Merge those first; this branch includes their commits.

Type and Spacing already warn when concrete per-step overrides shadow their generated scale (making the source knob inert). Radius, border-width and motion had the same invisible failure mode — the audit flagged the gap.

Change

Reuse the existing ScaleShadowNotice, fed by tokenModel.scaleShadows():

  • Shape — a notice above Radius (pinned --sf-radius-* steps) and in Border widths (pinned --sf-border-width-*).
  • Motion — a notice in Durations (absolute --sf-duration-* overriding the global --sf-motion-scale).

Each offers "Clear them and use the scale" to restore the generated ladder. No new logic — the generalised detection already shipped in tokenModel (and powers the Changes panel); this surfaces it inline where the knobs live.

Verification

  • npm run check 0 errors · npm run lint clean
  • npm run test: 285/285 · shell e2e green
  • e2e + screenshot verified the radius & motion notices and that "use the scale" clears the pinned steps.

Scope

The broader migration of every panel SliderRow to the explicit Inherit/Value/Expression editor remains a separate follow-up: the generic All-tokens/Changes editor already uses ValueField, and SliderRow already offers a variable/raw escape hatch — so the highest-risk, audit-flagged part (invisible detachment) is what this lands.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jackgranatowski, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 639d4629-13eb-4eba-bd14-150fa1a0025a

📥 Commits

Reviewing files that changed from the base of the PR and between ceaee41 and f2d2006.

📒 Files selected for processing (4)
  • configurator/src/App.svelte
  • configurator/src/components/CommandPalette.svelte
  • configurator/src/components/panels/BordersPanel.svelte
  • configurator/src/components/panels/MotionPanel.svelte

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown

Greptile Summary

The PR broadens the configurator redesign and adds inline detached-scale notices for radius, border width, and motion. It also centralizes token-domain classification, adds token relationship and change-management UI, improves import/history behavior, and restructures navigation.

  • Adds generated-scale shadow notices and bulk restoration actions.
  • Introduces token roles, dependency relationships, state classification, and a Changes panel.
  • Replaces substring domain matching with namespace-based classification.
  • Adds explicit Inherit, Value, and Expression editing modes.
  • Reorganizes navigation into Shape, Depth, Accessibility, Changes, and project-oriented destinations.

Confidence Score: 4/5

The PR should not merge until scale notices stop treating live expression overrides as fixed pinned values; the stale editor-mode display is non-blocking but should also be corrected.

The new radius, border-width, and motion notices can misrepresent var() or scale-dependent calc() overrides and lead users to remove intentional relationships, while ValueField can display a mode that no longer matches the current override.

Files Needing Attention: configurator/src/lib/tokenModel.ts, configurator/src/components/inputs/ValueField.svelte

Important Files Changed

Filename Overview
configurator/src/lib/tokenModel.ts Adds the central token relationship and scale-shadow model, but key-presence-only shadow detection misclassifies expression-based step overrides.
configurator/src/components/inputs/ValueField.svelte Adds explicit editing modes, though a manually selected mode remains stale after external override changes.
configurator/src/components/panels/BordersPanel.svelte Surfaces radius and border-width shadow notices and moves focus-ring controls to Accessibility.
configurator/src/components/panels/MotionPanel.svelte Adds the duration-scale shadow notice using the shared token model.
configurator/src/lib/domains.ts Centralizes deterministic namespace-based token-domain classification with explicit exceptions.
configurator/src/App.svelte Integrates coalesced history, validated imports, search deep links, and full-width tool screens.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  O[Active overrides] --> S[scaleShadows]
  S --> B[Shape notices]
  S --> M[Motion notice]
  B --> C[Clear affected steps]
  M --> C
  O --> T[tokenState]
  T --> P[Changes panel and token rows]
Loading

Reviews (1): Last reviewed commit: "feat(configurator): inline detached-scal..." | Re-trigger Greptile

Comment on lines +241 to +243
for (const family of SCALE_FAMILIES) {
const shadowedSteps = family.steps.filter((s) => s in overrides);
if (shadowedSteps.length === 0) continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Live expressions marked as pinned

When a radius, border-width, or duration step contains a var() relink or scale-dependent calc(), scaleShadows treats the override as a fixed shadow solely because its key exists. The notice then falsely labels a live relationship as pinned and offers to clear the user's intentional expression.

Comment on lines +19 to +20
let manualMode = $state<ValueMode | null>(null);
let mode = $derived<ValueMode>(manualMode ?? detectMode(overrideValue));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Manual mode remains stale

After a user selects Value or Expression, an external reset, undo, import, or theme application can change overrideValue while the keyed component retains manualMode. The editor then displays Value or Expression as active for a token that is currently inherited, misleading the user about its state.

…width

On the lifecycle/reference tools — Changes, Presets, Install & export, Reference
— the live preview sat there showing an irrelevant Color gallery over half the
screen while the operation (export CSS, browse classes, review overrides) got a
cramped 360px column.

These screens now hide the preview entirely and let the panel take the full
width (the CSS output, class catalogue and change list all benefit). The mobile
Controls/Preview fold bar is hidden there too, since there's nothing to fold to.
Accessibility deliberately keeps its preview — the contrast checker reads the
rendered colours from the iframe.

check, lint, 285 unit tests and shell e2e pass; screenshot + e2e verified the
full-width tool layout and that token/Accessibility screens still show the preview.
…width & motion

The Type and Spacing panels already warn when concrete per-step overrides shadow
their generated scale (making the scale knob inert). Radius, border-width and
motion had the same failure mode with no warning — the audit flagged this gap.

Reuse the existing ScaleShadowNotice, fed by tokenModel.scaleShadows():
- Shape: a notice above the Radius section (pinned --sf-radius-* steps) and in
  the Border widths section (pinned --sf-border-width-* steps).
- Motion: a notice in the Durations section (absolute --sf-duration-* values
  that override the global --sf-motion-scale).
Each offers "Clear them and use the scale" to restore the generated ladder.

No new logic — the generalised detection already shipped in tokenModel (and the
Changes panel); this surfaces it inline where the knobs live. check, lint, 285
unit tests and shell e2e pass; screenshot + e2e verified the radius and motion
notices and that clearing restores the scale.

Note: the broader migration of every panel SliderRow to the explicit
Inherit/Value/Expression editor remains a separate follow-up — the generic
All-tokens/Changes editor already uses ValueField, and SliderRow already
supports a variable/raw escape hatch.
Plain domain navigation (sidebar, mobile nav, and the palette's no-token
branch) left a previous search's focusRequest active, so returning to that
domain later re-triggered a stale token focus/scroll. Clear focusRequest on
those paths. Also gate the palette's "Go to" heading on navCount > 0 so a
token-only result set no longer shows an empty "Go to" section.
@jackgranatowski
jackgranatowski force-pushed the ux/configurator-scale-detach branch from 45e6172 to f2d2006 Compare August 20, 2026 17:39
@jackgranatowski
jackgranatowski merged commit f8718ad into main Aug 20, 2026
13 checks passed
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.

2 participants