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
figJamBase
andfigJamBaseLight
, a set of official FigJam colors. - Each
Reaction
object has anactions
array replacing the existingaction
property for executing multiple actions on the same trigger - The
Action
object 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
reactions
with only theaction
object without the newactions
array will always throw an error. This is to prevent data loss on nodes that already have reactions with multiple actions. - Code that sets
reactions
with bothaction
andactions
are fine.actions
will take precedence andaction
will be ignored.
What will happen starting November 9:
- Published plugins/widgets will always throw an error if the
actions
array is not present when settingreactions
.