Add surface-bg macro UI controls to configurator - #561
Conversation
The --sf-surface-bg-* input set (color/image/overlay/size/position/ repeat/attachment/animation) landed in core but was never wired into the configurator's control panels. It routed inconsistently too: --sf-surface-bg-color fell into the colors domain (matched 'color') while its siblings fell into layout (matched '-bg-'), so the group was split across two panels and had no dedicated knobs anywhere. - Route the whole surface-bg group to the macros domain (add 'surface-bg' to domain-patterns), so it groups with the sibling .sf-surface macro tokens and appears in the Macros 'All tokens' tab. - Add a 'Background surface' control section to MacrosPanel: text inputs for the free-form tokens (color/image/overlay/animation) and preset button grids for the enumerable ones (size/position/repeat/ attachment), plus a live .sf-surface-bg preview. All-tokens and cheatsheet already picked these up via the api sync.
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoConfigurator: add .sf-surface-bg controls to Macros panel
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
12 rules 1.
|
- Persist the raw input value for the surface-bg free-form fields and only use the trimmed value to decide set-vs-reset, so space-separated CSS shorthands (e.g. animation) can be composed without trailing spaces being stripped on every keystroke. Matches the accepted EffectsPanel pattern. - Include background-attachment and animation in the .sf-surface-bg preview swatch so it composes the same properties the macro does.
Summary
Adds configurator panel controls for the
.sf-surface-bgmacro, enabling live editing of background surface tokens (color, image, overlay, sizing, positioning, repeat, and animation).Changes
MacrosPanel.svelte: Added new "Background surface" collapsible section with:
domain-patterns.json: Registered
surface-bgmacro in the patterns list for proper token recognitionImplementation details
url("/hero.avif"),var(--sf-scrim-gradient)) to guide users on expected CSS syntaxcover,center,no-repeat,scroll)https://claude.ai/code/session_012kb3APvfsvJCegeRTRhHyT