figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Consolidate `createLocalVariables` functions into one

Open six7 opened this issue 8 months ago • 0 comments

Having two different files called updateVariables is a little confusing.

controller.ts -> asyncHandlers.updateVariables – this is a different function to updateVariables which is called in createLocalVariablesInPlugin.ts. controller.ts -> asyncHandlers.createLocalVariables asyncMessageHandlers/createLocalVariables.ts -> createLocalVariablesInPlugin(...) createLocalVariablesInPlugin.ts -> updateVariables

In a future refactor it could be worth reducing the number of functions re message handling and reuse more code. Moving between many different files/functions makes it harder to track the data flow.

Originally posted by @macintoshhelper in https://github.com/tokens-studio/figma-plugin/pull/2568#discussion_r1611720464

six7 avatar May 26 '24 07:05 six7