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

Spacings / Tokens sometimes do not get applied when first Grouping, then applying Auto Layout

Open Blyawon opened this issue 4 years ago • 3 comments

Describe the bug Sometimes spacings and other tokens are not getting applied when using the native Figma App. When clicking on a token nothing happens. In Chrome it works perfectly fine with the same file. Same issue over multiple devices and users.

Expected behavior Consistent behaviour of applying tokens

Blyawon avatar Feb 08 '22 12:02 Blyawon

Can you try to reproduce it or describe a scenario where we could try to reproduce that? Haven't heard of that before.

six7 avatar Feb 08 '22 20:02 six7

I think I found out why this is happening.

A user in Slack reported that they're unable to apply Auto Layout tokens when the layer was first grouped, then auto layout applied

So, to reproduce:

  1. Select two rectangles
  2. Press Cmd + G
  3. Press Cmd + A
  4. Apply a spacing token

Nothing happens.

The cause for this is that we currently check the type of a Node when Figma sends a selectionchange event. However, as the user uses keyboard commands (or the context menu) to convert to Auto Layout, we are not aware of that change.

We'll fix this by making sure to re-evaluate the selected nodes directly before we update it.

six7 avatar Jul 08 '22 19:07 six7

Setting this to blocked as this is a Figma issue. Reported it in the Figma Plugin developers Slack.

six7 avatar Aug 11 '22 18:08 six7

@six7 proposing we archive this one as its stale

SamIam4Hyma avatar Mar 20 '24 20:03 SamIam4Hyma