-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
2837 20 unable to create variable collections from sets #2844
2837 20 unable to create variable collections from sets #2844
Conversation
|
@@ -30,6 +30,18 @@ export default async function createLocalVariablesWithoutModesInPlugin(tokens: R | |||
|
|||
const checkSetting = !settings.variablesBoolean && !settings.variablesColor && !settings.variablesNumber && !settings.variablesString; | |||
if (!checkSetting) { | |||
const themesToCreateCollections = selectedSets.reduce((acc: ThemeObject[], curr: ExportTokenSet) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you not be able to re-use the themeContainer
const on line 45 for this? I think thats what it was intended for?
const { collection, modeId } = findCollectionAndModeIdForTheme(set.set, set.set, collections); | ||
|
||
if (!collection || !modeId) return; | ||
|
||
const allVariableObj = await updateVariables({ | ||
collection, mode: modeId, theme: themeContainer, tokens: setTokens, settings, filterByTokenSet: set.set, | ||
collection, mode: modeId, theme: themeContainer, tokens, settings, filterByTokenSet: set.set, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this PR exist?
Current plugin does not create local variable collections based on selected token sets. Because the
createNecessaryVariableCollections
function does not accept the parameter structure in case of selected sets.Closes #2837
What does this pull request do?
Updated
createLocalVariablesWithoutModesInPlugin
function to send parameters with the structure whichcreateNecessaryVariableCollections
function can accept to proceed.Testing this change
Additional Notes (if any)
20240611_203716.mp4