Skip to main content
Solved

Smart Animate when using Component Overrides


andre

Hi! I’m not sure if this is a current limitation or intended behaviour. But it would be really nice if you could Smart Animate when using Component Overrides.

For example, if I have a ‘Modal View’ component with a nested Progress Bar (using % as variants). While prototyping it will highlight both layers as if they’re going to animate.

But it doesn’t seem to work as intended:

It only works if I detach the Parent Component:

Any ideas on how to workaround this issue? Or if I’m doing something wrong? 😅

Best answer by andre

I was able to get nested progress bars to work with Smart Animate using another hack (Using an Auto Layout gap). Apparently Smart Animate doesn’t support nested variant overrides, maybe due to how the naming works internally. 🤔

Thanks for all the help!

View original

13 replies

Steven
  • 122 replies
  • January 26, 2021

You just have to make sure you have the same name everywhere (make the layers match), so that the system understands that it’s the same element that changes state. That’s the secret with the smart animate.


Rinker_Todd

I’ve run into something similar with text changes … If a text layer name follows its content, Smart Animate won’t work for me as intended (a label I just want to change text gets pushed of the off the screen and replaced, for example), so I have to ensure to commonly ‘hard name’ all text layers that I don’t want effected by a transform.

I’m not sure how that works within an instance of a complex component, but I guess you’d just name whatever visible layer you’d want to show with a common name, as mentioned by Steven above


andre
  • Author
  • 11 replies
  • January 26, 2021

That’s the part that doesn’t seem to work when using Nested Components and overriding them. It will highlight both layers on the Editor (while using the same name), but it won’t animate between them. (Unless you detach everything) 🧐


Steven
  • 122 replies
  • January 26, 2021

Can you share a little video ?


andre
  • Author
  • 11 replies
  • January 26, 2021

Sure! As you can see from this video, both layers have the same name and match according to the editor, but Smart Animate only works when detaching the parent component.


Shaunak
  • 11 replies
  • January 26, 2021

As @Steven also mentioned, I think the names of your frames are different inside. Not just the parent but also the one with actual progress. Have you tried naming them all the same?


andre
  • Author
  • 11 replies
  • January 26, 2021

Hi @Shaunak! Yes, both layer have the same name and hierarchy. (Modal > Navbar > Progress Bar > Progress)


Shaunak
  • 11 replies
  • January 26, 2021

hmm… 🙃
that is weird indeed… I’ll try to replicate this at my end and check for a solution…


andre
  • Author
  • 11 replies
  • January 26, 2021

Here’s a link to the file if you want to take a look. 👀

PS: I accidentally moved a layer when you entered. It’s fixed now.

Figma – 26 Jan 21

Shaunak
  • 11 replies
  • January 26, 2021

Thanks! Just a heads up: I am able to go to your Components file through this and duplicate it. Don’t worry, I won’t look but since this is a public forum, you might want to limit that.


andre
  • Author
  • 11 replies
  • January 26, 2021

Thanks! 😳


andre
  • Author
  • 11 replies
  • Answer
  • February 2, 2021

I was able to get nested progress bars to work with Smart Animate using another hack (Using an Auto Layout gap). Apparently Smart Animate doesn’t support nested variant overrides, maybe due to how the naming works internally. 🤔

Thanks for all the help!


Bruno_Barreto

Hey @andre, yesterday my Figma updated and now my nested and overrides components are working well with auto animate!


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