fix: bind backgroundBlur radius as Figma variable instead of raw value#3899
fix: bind backgroundBlur radius as Figma variable instead of raw value#3899akshay-gupta7 wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 073ad0a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Figma plugin’s background blur application so that the blur radius can be bound to a Figma Variable (when variable/style application mode is enabled) instead of always applying a computed raw numeric radius.
Changes:
- Updated
setBackgroundBlurOnTargetto optionally bindBACKGROUND_BLUR.radiusto a Variable resolved from the token name. - Updated background blur application flow to pass the token name through and await the blur application.
- Added unit tests covering variable binding behavior and the updated apply function behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/tokens-studio-for-figma/src/plugin/setBackgroundBlurOnTarget.ts | Adds optional variable binding for BACKGROUND_BLUR radius and makes the helper async. |
| packages/tokens-studio-for-figma/src/plugin/setBackgroundBlurOnTarget.test.ts | Adds test coverage for the new variable-binding behavior. |
| packages/tokens-studio-for-figma/src/plugin/applyBackgroundBlurValuesOnNode.ts | Passes the backgroundBlur token name into the blur setter and awaits it. |
| packages/tokens-studio-for-figma/src/plugin/applyBackgroundBlurValuesOnNode.test.ts | New tests ensuring correct invocation and guarding behavior for background blur application. |
|
Commit SHA:64a4d5393370004c50a333192b7a435421856c48 Test coverage results 🧪
|
|
🛡️ Hyma Compliance Check ✅ No compliance findings — 0 findings across reviewed files. Categories checked: ROPA · Subprocessor · Access Control · AI Provider Routing · Secrets/Credentials · Policy Gap Assessment: Binds background blur radius as a Figma variable (
|
|
🛡️ Hyma Compliance Check ✅ No compliance-relevant changes detected 5 file(s) scanned · 0 findings Changes add Figma variable binding for background blur tokens (
|
|
🛡️ Hyma Compliance Check ✅ No compliance-relevant changes detected Files changed in this PR were reviewed against the compliance taxonomy (ROPA, Subprocessor, Access Control, AI Provider Routing, Secrets/Credentials, Policy Gap). No findings were identified.
|
|
🛡️ Hyma Compliance Check ✅ No compliance-relevant changes detected 2 file(s) scanned · 0 findings
|
|
🛡️ Hyma Compliance Check ✅ No compliance-relevant changes detected Files scanned · 0 findings No new external calls, personal data processing changes, or authentication/authorization modifications detected. No compliance action required.
|
|
🛡️ Hyma Compliance Check ✅ No compliance-relevant changes detected 5 file(s) scanned · 0 findings
|
Why does this PR exist?
Closes #3886
Background blur tokens applied the radius as a raw number instead of binding it as a Figma variable. Box shadow already handled this correctly via
setBoundVariableForEffect— background blur was missing the same logic.What does this pull request do?
figma.variables.setBoundVariableForEffecton the blur radius when a variable reference exists, matching box shadow behaviour insetEffectValuesOnTargetapplyBackgroundBlurValuesOnNode→setBackgroundBlurOnTargetto enable the variable lookupapplyBackgroundBlurValuesOnNodeand extendssetBackgroundBlurOnTargettests to cover variable binding and fallback casesTesting this change
blur.background = 12)Additional Notes (if any)