Version 1, Update 77
New:
- Add detachedInfo to detached instances to indicate if a node is detached from the main component, and to identify its original main component.
- Add figma.constants.colors, which maps color palette names to ColorPalette. We provide
figJamBaseandfigJamBaseLight, a set of official FigJam colors. - Each
Reactionobject has anactionsarray replacing the existingactionproperty for executing multiple actions on the same trigger - The
Actionobject supports two new action types:"SET_VARIABLE"for modifying the value of a variable based on a static value, another variable, or an expression"CONDITIONAL"for checking if a condition is met before performing an action- For a general guide on using the new action types, see the updated guide for the Action object.
See the reactions property page for more details and code samples.
Notice of breaking change:
caution
To support multiple actions per trigger in the Reaction object, we are making a breaking change for plugins that set the reactions property.
Who is affected: Anyone with a plugin/widget with code that sets the reactions property.
What you must do: Check and update your code to use the new actions property in each Reaction object.
What will happen now:
- In-development plugins/widgets that set
reactionswith only theactionobject without the newactionsarray will always throw an error. This is to prevent data loss on nodes that already have reactions with multiple actions. - Code that sets
reactionswith bothactionandactionsare fine.actionswill take precedence andactionwill be ignored.
What will happen starting November 9:
- Published plugins/widgets will always throw an error if the
actionsarray is not present when settingreactions.