Skip to main content
Zach_Thomson
New Participant
June 28, 2024
Question

Auto Layout incorrectly sets container to hug instead of fixed

  • June 28, 2024
  • 16 replies
  • 1226 views

Desktop App version 124.1.16 (UI3)

When changing auto layout direction, it incorrectly sets the container to hug contents instead of fixed which causes the children (card) to be put to fixed causing unnecessary steps to fix.

These are the properties before changing the auto layout direction:
Figma_i7vpbQvK5j

This is the current result:
Figma_gSKmrn3BYn

What it should be:
Figma_zCCZYfwThO

This is an extremely annoying bug and makes working with auto layout more annoying than needed. This was fixed for a couple of months, but the recent updates have reverted it back for some reason.

This topic has been closed for replies.

16 replies

Gleb
Power Member
August 14, 2024

Not sure about any Figma’s ETAs, but it took me 10 minutes to make a plugin that fixes this: Switch Auto Layout Direction

Just bind it to a shortcut and use that instead of a default button in the right panel.

Here is how it works:

demo

https://www.figma.com/community/plugin/1405232661624022126/switch-auto-layout-direction

Josh_Beveridge
August 14, 2024

Just adding another bump to this issue - it’s impacting my workflow drastically. Having to go through every child item inside the parent when I change the flow direction is a nightmare.

Marc_Robinson
New Participant
August 23, 2024

When is this going to be fixed! I spend most of the day fixing frames that don’t work as they should.

  1. If you have a frame in fixed and you paste it inside another frame it changes to fill. So, you have to go back change it to fixed and set the value it had before.
  2. If you have an autolayout set to vertical with all the frames inside set to fill, and then you change the autolayout to horizontal, all the frames insides change to fixed! (still trying to figure out exactly when this happens)
  3. If you ungroup and autolayout text layers go from hug to fill so you have to fix them.

Why did they change it?

Zach_Thomson
New Participant
August 28, 2024

The main thing here is that it should only change the width & height properties when it needs to e.g. when you have a parent container set to hug & change the children’s elements to fill (not possible to have both at the same time). Changing auto layout direction is not one of those cases which is when this happens . I have been using the plugin from @Gleb and it is a huge timesaver

Zach_Thomson
New Participant
September 12, 2024

This issue seems to be fixed now. Thank you for helping out @dvaliao!

djv
Figmate
Community Support
September 12, 2024

Glad to hear this, @Zach_Thomson!

Our Auto Layout team is on standby, if you run into any further issues. Glad to hear the Gleb’s plugin has been a huge timesaver!