-
Notifications
You must be signed in to change notification settings - Fork 697
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
NigelBreslaw
wants to merge
44
commits into
master
Choose a base branch
from
nigel/figma-test-data
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3f12e9e
to
03e3c6a
Compare
If you clicked the buttons quickly it would do the export multiple times
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.
a873bd9
to
b43bb1a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To try this out instead of running
pnpm dev
runpnpm 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).