Skip to content

chore(plugin): simplify plugin - #5466

Merged
mimarz merged 86 commits into
mainfrom
chore-rework-plugin-ui
Oct 9, 2026
Merged

mimarz merged 86 commits into
mainfrom
chore-rework-plugin-ui

Conversation

@mimarz

@mimarz mimarz commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

resolves #5470

Summary

Removed preview for themes focusing on just having a simple as possible (wip) export to figma plugin.

  • Default feature is now an import of Designsystemet to Figma.
  • Improved feedback during imports.
    • We give progress indicator during import and what parts of Figma is being updated
    • Import log at the end for those interested with which modes, collections, variables, text styles and shadows were created.
  • Improved error handling, such as aborting import if font-family in config does not exits in users Figma file (which includes system fonts) or if failed on updating other parts.
  • Cleaned up code and renamed several parts of the plugin code to better reflect what they are doing.

Work in progress

  • Added experiment for exporting config from Figma. Disabled/hidden under START_VIEW const.
  • Added experiment for importing multiple css files as config. Disabled under feat flag, FEAT_CSS_IMPORT

@changeset-bot

changeset-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b30d2f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

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

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

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.

Copilot review overview

🟡 Changes recommended

Notification accessibility, inaccurate warning counts, and overflowing status layouts need correction.

Review effort: Balanced
Findings: 5 Medium severity

Open (5)
What changed in this PR

Simplifies the Figma plugin into a direct configuration-to-export workflow with progress and result views.

Changes:

  • Removes theme previews and related dependencies.
  • Adds export progress, completion, and notification views.
  • Renames import terminology and adds plugin packaging support.
File Description
.gitignore Ignores plugin ZIP artifacts.
pnpm-lock.yaml Removes unused dependencies.
plugins/​designsystemet/​package.json Adds ZIP packaging and cleans dependencies.
plugins/​designsystemet/​src/​types.ts Defines the new message protocol.
plugins/​designsystemet/​src/​ui/​app.tsx Implements the new export workflow.
plugins/​designsystemet/​src/​ui/​app.css Styles status and notification views.
plugins/​designsystemet/​src/​ui/​border-radius.ts Removes preview-only logic.
plugins/​designsystemet/​src/​ui/​export-view.tsx Displays export progress.
plugins/​designsystemet/​src/​ui/​finished-view.tsx Displays successful completion.
plugins/​designsystemet/​src/​ui/​notifications-view.tsx Displays warnings, errors, and logs.
plugins/​designsystemet/​src/​ui/​paste-view.tsx Updates configuration instructions.
plugins/​designsystemet/​src/​ui/​post-to-plugin.ts Adds UI-to-plugin messaging.
plugins/​designsystemet/​src/​ui/​preview-view.tsx Removes the theme preview.
plugins/​designsystemet/​src/​plugin/​code.ts Runs validation and export in one operation.
plugins/​designsystemet/​src/​plugin/​token-export/​collection-specs.ts Adopts export terminology.
plugins/​designsystemet/​src/​plugin/​token-export/​effect-styles.ts Adopts the renamed export log.
plugins/​designsystemet/​src/​plugin/​token-export/​export-to-figma.ts Adds progress reporting and export naming.
plugins/​designsystemet/​src/​plugin/​token-export/​fonts.ts Updates export terminology.
plugins/​designsystemet/​src/​plugin/​token-export/​log.ts Renames the import log to export log.
plugins/​designsystemet/​src/​plugin/​token-export/​text-styles.ts Adopts the renamed export log.
plugins/​designsystemet/​src/​plugin/​token-export/​token-model.ts Updates preview-related messaging.
plugins/​designsystemet/​src/​plugin/​token-export/​variable-sync.ts Adopts export terminology.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

Comment thread plugins/designsystemet/src/ui/app.css Outdated
Comment thread plugins/designsystemet/src/ui/app.css Outdated
Comment thread plugins/designsystemet/src/ui/app.tsx Outdated
Comment thread plugins/designsystemet/src/ui/finished-view.tsx Outdated
Comment thread plugins/designsystemet/src/ui/views/notifications.tsx

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.

Copilot review overview

🔵 Needs a closer look

It substantially changes the message protocol, UI state machine, and destructive Figma export workflow without dedicated plugin tests.

Review effort: Balanced
Findings: None

Resolved since last review (5)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

@mimarz
mimarz marked this pull request as ready for review October 2, 2026 12:58
@mimarz
mimarz marked this pull request as draft October 5, 2026 10:31
@mimarz
mimarz force-pushed the chore-rework-plugin-ui branch 2 times, most recently from 2960963 to 36a3fbe Compare October 6, 2026 12:08
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployments for this pull request:

storybook - 9. Oct 2026 - 11:55

@mimarz
mimarz marked this pull request as ready for review October 6, 2026 13:41
@mimarz
mimarz requested a balanced review from Copilot October 6, 2026 13:41

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.

Copilot review overview

🟡 Changes recommended

The manifest changes the deployed plugin identity, and plugin-only pull requests will not trigger the newly configured tests.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread plugins/designsystemet/manifest.json
Comment thread test/vitest.config.mjs Outdated
Comment thread packages/cli/src/tokens/config-colors.ts Fixed
@mimarz
mimarz added this pull request to stack #5476 October 7, 2026 18:29
@mimarz
mimarz requested a balanced review from Copilot October 7, 2026 18:29

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

Config export mishandles prototype-named themes and semantic step names, causing data loss or silent omissions.

1 open finding
2 resolved since last review
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

🧠 Review effort: Balanced

Comment thread plugins/designsystemet/src/plugin/export/export-config.ts Outdated

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

Same-collection aliases can export values from the wrong Figma mode.

1 open finding
1 resolved since last review
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

🧠 Review effort: Balanced

Comment thread plugins/designsystemet/src/plugin/export/export-config.ts Outdated
@mimarz
mimarz force-pushed the chore-rework-plugin-ui branch from 065af22 to 7bf6a1b Compare October 8, 2026 07:40
@mimarz
mimarz requested a balanced review from Copilot October 8, 2026 09:11

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

File validation breaks CSS and some JSON uploads, while __proto__ CSS themes are silently lost during import.

2 open findings
1 resolved since last review
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread plugins/designsystemet/src/ui/views/import.tsx Outdated
Comment thread plugins/designsystemet/src/plugin/import/config-from-css.ts
@mimarz
mimarz force-pushed the chore-rework-plugin-ui branch from 3d9e542 to 705fd64 Compare October 9, 2026 06:35
@mimarz
mimarz requested a balanced review from Copilot October 9, 2026 06:39

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.

🔵 Needs a closer look

Experimental config export can silently omit a completely deleted color scale without warning, producing a lossy config.

0 open findings

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

🧠 Review effort: Balanced

@mimarz
mimarz merged commit 9ac526c into main Oct 9, 2026
21 checks passed
@mimarz
mimarz deleted the chore-rework-plugin-ui branch October 9, 2026 10:35
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.

Decide how to handle existing values when syncing to Figma

4 participants