Skip to content

chore(plugin): move figma variable scopes - #5387

Open
mimarz wants to merge 1 commit into
plugin-shared-css-variable-names-for-code-syntaxfrom
plugin-better-scopes-handling
Open

mimarz wants to merge 1 commit into
plugin-shared-css-variable-names-for-code-syntaxfrom
plugin-better-scopes-handling

Conversation

@mimarz

@mimarz mimarz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

moved figma variables scopes to variables-sync so that its done in the correct context and not and after loop which needed more logic to handle


Stack created with GitHub Stacks CLIGive Feedback 💬

@mimarz
mimarz added this pull request to stack #5358 September 18, 2026 10:35
@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ae69ece

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mimarz
mimarz force-pushed the plugin-better-scopes-handling branch from ecd7b75 to 07cd293 Compare September 18, 2026 10:38
@mimarz mimarz changed the title chore(plugin) move figma variable scopes chore(plugin): move figma variable scopes Sep 18, 2026
@mimarz
mimarz force-pushed the plugin-better-scopes-handling branch from 07cd293 to ae69ece Compare September 18, 2026 10:55
@mimarz
mimarz requested a balanced review from Copilot September 18, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Scope assignment failures can now abort the main import and leave it partially applied.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Moves Figma scope derivation into collection specs and applies scopes during variable synchronization.

Changes:

  • Derives and stores scopes in variable specs.
  • Synchronizes scopes alongside WEB code syntax.
  • Removes the post-import scope pass.
File summaries
File Description
collection-specs.ts Adds scope derivation and drift logging.
variable-sync.ts Applies scopes during synchronization.
scopes.ts Exposes reusable scope helpers.
importer.ts Removes the post-import scope pass.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +121 to +127
if (
normalizeScopes(desired.scopes) !==
normalizeScopes(variable.scopes ?? [])
) {
variable.scopes = desired.scopes;
scopesUpdated++;
}
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