Skip to main content
Solved

Bad resizing of component children


Lukas_Bendik

We use our own design system in which we have a set of components. We also use these components for design. We have components designed to allow dimensional changes. Now this has stopped working for some reason. The descendant of the component behaves badly when resized.

Best answer by tank666

Figma – 5 Mar 21
View original

10 replies

Lukas_Bendik

Any ideas? We can’t use components because they only work if they’re detached. It’s frustrating. 😢


tank666
  • 4859 replies
  • March 5, 2021

@Lukas_Bendik, If you provide more data or an example file, I think your problem will be solved faster.


Lukas_Bendik

Here is example Figma


tank666
  • 4859 replies
  • March 5, 2021

Use a frame instead of the “Icon” group.


Lukas_Bendik

I tried that, but it doesn’t work. I tried to take out the whole group/frame. We’ve been using this component for a long time and it worked fine. It stopped working sometime this/last week without our modifications.


tank666
  • 4859 replies
  • Answer
  • March 5, 2021

Dimitri_Otero

Hey Lukas. So the structure you had is a little difficult to predict. I made a test file and wanted to provide some suggestions.

  1. Auto-layout everything. It helps keep structure and allows the component to grow and shrink as it needs.
  2. Keep text at its original line-height. It allows for the text to grow properly.
  3. I noticed you had a random frame floating around there for some reason. It didn’t look necessary.

Test: Figma


Lukas_Bendik

Thanks a lot. Figma may have changed group/frame behavior. I had to change the group to frame and reset the constraints. The bad thing is, we probably have it like this in a lot of components.


Lukas_Bendik

Thank you for your help. These components were created when Figma couldn’t do autolayout. We are already using it for new components. So far, there was no reason to change the original components when they functioned as requested.


Dimitri_Otero

Ah okay. That makes sense. I wonder if it had to do with grouping. Typically, groups respond a little unpredictably. Glad you found the answer!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings