Skip to content

feat(configurator): fence preview-only controls in Components (follow-up) - #699

Merged
jackgranatowski merged 2 commits into
mainfrom
ux/configurator-components-preview
Aug 20, 2026
Merged

jackgranatowski merged 2 commits into
mainfrom
ux/configurator-components-preview

Conversation

@jackgranatowski

Copy link
Copy Markdown
Contributor

Follow-up #3 — Components: separate preview-only from exported controls

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

The Components panel mixed two kinds of controls that looked identical: the variant / style / size / state pickers (local preview state only) and the real token sliders (exported overrides). A user couldn't tell which choices actually change their theme.

Change

Both the Button and Card preview pickers are now wrapped in a dashed, labelled "Preview setup — not exported" band (eye icon), visually separated from the exported token controls (Base style / card tokens) below. Purely a clarity fence — the live sample still updates from the pickers, and no override behaviour changes.

Verification

  • npm run check 0 errors · npm run lint clean
  • npm run test: 285/285 · shell e2e green
  • Screenshot-verified the band on both Button and Card sections.

@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: 59 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: a2b38719-15a1-428b-ad1c-f4ac29d7b205

📥 Commits

Reviewing files that changed from the base of the PR and between 19edb39 and ec3868a.

📒 Files selected for processing (3)
  • configurator/src/App.svelte
  • configurator/src/components/CommandPalette.svelte
  • configurator/src/components/panels/ComponentsPanel.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 stacked PR substantially expands configurator navigation, token editing, import reporting, history handling, domain classification, and panel organization; its tip additionally fences Button and Card preview-only controls from exported token controls.

  • Adds labelled preview-only setup bands to the Components panel.
  • Introduces unified token value editing, token relationship metadata, and import migration/reporting.
  • Reworks domain routing and adds Changes, Depth, and Accessibility panel organization.
  • Adds command-palette deep links and coalesced undo history.

Confidence Score: 4/5

The ValueField cancellation defect should be fixed before merging because pressing Escape can still apply the edit.

The new ValueField synchronously blurs before its restored draft reaches the DOM, so the blur callback commits the stale edited value instead of cancelling it.

Files Needing Attention: configurator/src/components/inputs/ValueField.svelte

Important Files Changed

Filename Overview
configurator/src/components/panels/ComponentsPanel.svelte Clearly fences local Button and Card preview state from controls that mutate exported overrides.
configurator/src/components/inputs/ValueField.svelte Adds mode-based token editing, but Escape can commit the draft it is intended to cancel.
configurator/src/App.svelte Integrates import reporting, search deep links, and undo coalescing without another accepted defect.
configurator/src/lib/importOverrides.ts Centralizes CSS and JSON parsing, sanitization, migration, and user-visible import reporting.
configurator/src/lib/domains.ts Replaces overlapping substring classification with a shared namespace-based domain map.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Search[Command palette] --> Domain[Domain panel]
  Domain --> Controls[Curated controls]
  Domain --> Tokens[All tokens]
  Controls --> PreviewSetup[Preview-only setup]
  Controls --> Overrides[Exported overrides]
  Tokens --> ValueField[Value / Expression editor]
  ValueField --> Overrides
  Overrides --> Preview[Live preview]
  Overrides --> Export[Save / export]
Loading

Reviews (1): Last reviewed commit: "feat(configurator): fence preview-only c..." | Re-trigger Greptile

onblur={(e) => { editing = false; commit((e.target as HTMLInputElement).value); }}
onkeydown={(e) => {
if (e.key === "Enter") (e.currentTarget as HTMLInputElement).blur();
if (e.key === "Escape") { editing = false; draft = overrideValue ?? token.value ?? ""; (e.currentTarget as HTMLInputElement).blur(); }

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 Escape commits cancelled edits

When a user presses Escape after editing a Value or Expression, the handler resets draft and synchronously calls blur() before the restored state reaches the input. The blur handler therefore commits the stale edited DOM value through onSet, saving the override the user attempted to discard.

@jackgranatowski
jackgranatowski force-pushed the ux/configurator-components-preview branch 3 times, most recently from b2cd3af to 71756eb Compare August 20, 2026 12:50
… exported"

The Components panel mixed two kinds of controls that look identical: the
variant/style/size/state pickers (local preview state) and the real token
sliders (exported overrides). A user couldn't tell which choices actually
change their theme.

Both button and card preview pickers are now wrapped in a dashed, labelled
"Preview setup — not exported" band (eye icon), visually separated from the
exported token controls (Base style / card tokens) below. No behaviour change —
purely a clarity fence — so the live sample still updates from the pickers while
the exported controls stay clearly distinct.

check, lint, 285 unit tests and shell e2e pass; screenshot-verified the band on
both Button and Card.
@jackgranatowski
jackgranatowski force-pushed the ux/configurator-components-preview branch from 71756eb to ec3868a Compare August 20, 2026 17:19
@jackgranatowski
jackgranatowski merged commit ceaee41 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