Skip to content

Figma test system and micro conversion system #8674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

NigelBreslaw
Copy link
Member

To try this out instead of running pnpm dev run pnpm dev:testdata.

Only when run like this will 2 new buttons show in the floating panel.

'Get Test Data' zips up a json export of all the data from the Figma variables api.
'Export Slint' is a super fast flat exporter of variables to Slint. Creating a single file called 'example.slint' with a totally flat struct for each mode in a collection. When tested on the Figma file from hell (Open Bridge) it takes 600ms (vs 12 seconds) to do a full export and creates a file of just 11,000 lines (vs 36000).

@NigelBreslaw NigelBreslaw marked this pull request as draft June 12, 2025 12:53
@NigelBreslaw NigelBreslaw force-pushed the nigel/figma-test-data branch 3 times, most recently from 3f12e9e to 03e3c6a Compare June 16, 2025 06:22
NigelBreslaw and others added 18 commits June 16, 2025 19:13
This is a new approach that first creates the main data. It then scans this data for variable references that point to deleted variables and/or variable collections. Figma then lets you get those collections and variables via another api and we then insert them back into the data.

This means the converter can be simplified in a later refactor as there was complexity in the logic to handle this problems after it was given the data. Now the data is complete the convertor can be simpler.
@NigelBreslaw NigelBreslaw force-pushed the nigel/figma-test-data branch from a873bd9 to b43bb1a Compare June 16, 2025 16:14
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.

1 participant