Skip to main content
ashygee
Mar 25, 2021 6:31 PM UTC

Preserve overrides in instances swapped inside component

Hi folks! I’ve seen the posts regarding text overrides with nested interactive components but I’m seeing a similar issue with non-interactive components as well.

In the example below, I’ve set my text layers to all use the same layer name and have the same hierarchy structure but if I swap one of the nested components it resets everything. Everything works perfectly if each atom component is used individually and not nested in another component though so I’m left 🤔. Any thoughts?

30 replies

Gleb
Power Member
Mar 26, 2021 12:19 AM UTC

This is expected behavior. Figma doesn’t preserve overrides this way. I’m working on the improvements for my plugin Master which would allow you to do that in the future. I’m wondering why are you using text styles as components instead of, you know, text styles?

ashygee
ashygeeAuthor
Mar 26, 2021 12:23 AM UTC

@Gleb we’re using text components so that there is a much more user friendly format for our team to work with text without needing to know which utility to use. On a maintainer level we are still applying text styles but are working to remove this layer of abstraction from our team in order to simplify their experience within Figma.

Since this is expected behavior it would be great to see this type of override carryover in the future. Having the capability in the future for nested components to preserve overrides would not only be great but would help us to make more powerful components.

Gleb
Power Member
Mar 26, 2021 12:28 AM UTC

Thanks for the detailed explanation, that makes sense!

cupps
Apr 15, 2021 3:31 AM UTC

Chiming on this as something I would also very much like to see! I have started running into this often, as I have am finding nesting components within my variants helps cut down on edits. (I create a core component that I then create instances of to build a variant. This helps if I ever update the layout or a core element of the design, I can just update the core component and it applies to all the variants instead of needing to update each variant.)

Might be worth adding this as a post under Product Ideas as well. 🤔

ashygee
ashygeeAuthor
Apr 15, 2021 10:31 PM UTC

Will do @cupps ! I’m glad another person resonates with this.

Gleb
Power Member
Apr 25, 2021 9:44 AM UTC

I recently released an update to Master plugin that would allow you to do that now when you swap components with it! Here is a small demo:

twitter.com

Try it out and let me know if you have any questions.

I also renamed this topic for clarity and moved this topic to #product-feedback so anyone can vote for this feature to be implemented natively.

ashygee
ashygeeAuthor
Jul 27, 2021 10:41 PM UTC


@cupps I think that Figma has fixed this!

ashygee
ashygeeAuthor
Jul 27, 2021 10:47 PM UTC

ack no nevermind i wasn’t showing the same instance. apologies for the jump start excitement.

Ode
Sep 8, 2021 3:02 AM UTC

Can someone explain why this is “expected” behavior? It’s very common for me to use a variant of a button (or any UI control) in a component. And after I have created a bunch of instances of that component (and overridden their content), I go back to the master and change the button to another variant, which causes all the overrides to reset. 😦

Is this not a common use case for everybody?

Thanks, -Ode

Joseph_Astorga
Feb 8, 2022 3:44 PM UTC

I don’t know if this answer the question or solve something. But i also had som issues with variations of a checkbox that doesn’t keep the override if i for example change state from default to selected.

I experimented a bit and noticed that when i changed all the names of the label text layer to “Label” instead of them having unique layer names i noticed that the override works when i change between variants.

Skärmavbild 2022-02-08 kl. 16.53.55