When do overrides get reset when changing symbols?

I’ve been wondering about this for a while: sometimes when I switch between symbols all overrides get reset, sometimes they are preserved. I thought his could have something to do with layer names (i.e. Sketch will transfer overrides if the layer name remains the same) but it doesn’t appear to be the case.

This becomes especially painful when I make tests and will have 10 different variants of the same symbol, and Sketch will reset all overrides whenever I switch between those instances.

Could someone explain the intended behavior here? Is there a way to make sure overrides get transferred when switching between symbols?

Hi @samvermette,

Apologies about the late reply. Reading from your report I think you could refer to the scenario where you create an instance of say, a button, and override it with some text. Then you take that overriden instance and use it to create a new symbol, so the overridden symbol instance is nested in the new symbol.

If you then swap that nested button for a variant to show an active state, the text seems to be lost and replaced by the default label of the active button.

When you nest an overriden instance to create a new symbol, that symbol becomes the new default, so when you swap it, the overrides seem to be lost, but the app sees no overrides, because it’s nested and acts as the new default.

Of course, I can perfectly see your point and this can definitely improve. Here’s a video that illustrates the scenario mentioned above. Let me know if this is what you meant:

Let me know if this is what you refer to or if I missed anything.

Im getting this same issue with images instead of texts. I have a really complex design system, with hundreds of componentes and screens and I wanted to create some pre-made content strips that could be used on multiple files and updated with new contents easily when necessary.

The way to achieve this is by having:

1 A focosed and Unfocused state symbols
2 An strip symbol with includes these focused and unfocused states
3 An pre-madre strip which includes only the previous strip but with the correct images override

Changing status symbols on 2 works fine and the override images are keeped, but it doesn’t happen the same in 3, where the symbol override is reset every time I change a state.

I can see with your video @dfmedrano the logic of why this happens, but I don’t think it makes any sense from a user point of view. I think overrides should be inherited and keeped through nested instances.

1 Like

Hi @pinker ,

Yeah, I can perfectly see your point and we’re aware that this can definitely improve. We also made some progress exploring solutions, and we realized there’s more ground to cover. Same structure symbols like the buttons on the video are pretty straightforward, but more complex symbols with different structures and levels of nesting bring new questions.

We are listening and we’re aware of this. I’ve re-shared this with the team and thanks for reaching out :pray:

1 Like

Why would someone who assigns overrides to all nested symbols in the nested parent symbol want them to reset to the original state of the nested symbol when the state is changed and not to the override that was assigned in the nested parent symbol?

This simply makes for horribly tedious extra work and is a. Potential source of error.

Sorry that I opened a separate thread here:

I didn’t realise that the topic was discussed here ONE YEAR ago and there is still no solution :face_with_raised_eyebrow:

Hey @Xhaust ,

I know this is behavior is unexpected and the team is aware that it causes friction, but, for what it’s worth, here’s a bit of why it happens.

When you swap Symbols, Sketch will preserve any overrides that it can match with the target. This is why text seems to “reset” but, under the hood, nothing was reset, because there were no overrides, you were swapping one default Symbol with another.

Take this icon bar for example, this is my default, its a Symbol where each icon is also a nested symbol:

I place an instance of it but this time, I need to swap the third Symbol from the left with an avatar Symbol, so the end result is this

In this context it works fine, no surprises. The same logic applies to all Symbols, but it happens that with text it’s very straightforward to say: I’ll take my Label default, override the text and make a new symbol from it and, in this particular context it makes sense to preserve the text. It just happens that to the current implementation, there’s nothing to preserve because you’ve create a new default with the new symbol.

There are workardounds, the one I sometimes use is to separate the style from the text, so instead of swapping the whole symbol, I swap Styles.

Of course, I’m not saying that’s the ideal way. We know this can improve and releasing a fix requires us considering different scenarios. For instance, there’s no limit in nesting, you can have a Symbol that goes 10 levels deep and in that setup, what to keep and what not to can get complex fast.

1 Like

Hi @dfmedrano ,

thank you for your reply.

It doesn’t make any sense to me why the behaviour of symbols nested in symbols is the opposite of that of symbols nested in groups. Please watch the video.

In 99.9% of cases, the current behaviour leads to the opposite of what I expect and want. It should work the same way as in groups.

Thank you for suggesting your workaround, but I’m not happy with having to replace font styles to get the functionality I expect to work as expected.

This still bugs me, because your workaround doesn’t work, because it doesn’t retain the overwrite when an overwrite has actually been set. So really, what can we do about that ?

It’s so basic problem, I don’t understand.


The result

Hi, @victor

Welcome to the Forum, thanks for taking the time to share this.

The workaround I mentioned needs you to change how the symbol is built, so you can swap styles instead of symbols. I know it’s not ideal, but it can help in some cases.

If you swap symbols and those symbols do not have overrides you’ll get the new symbol in its default form, which can result in this lost overrides unwanted result. One important thing to mention is that the overrides need to be done on the instances, not in the symbol source. Any nested symbols inside a symbol source become the new default.

So here I am applying a green overrides on the instance of the symbol, but when I change symbol, the overridess is not remembered and simply switch color to default setting. What am I missing, please… ?

Hey @victor,

The screenshot shows that you’re making overrides on an instance inside a symbol source, and this is the key. Any instances inside a symbol sources become the new default. When you insert an instance of /Level 1/Default TEST the instance will have no overrides, the word “Section” will be the default, not an override, and if you swap that instance the “Section” text will be lost, because the instance has no overrides.

I made this video, I hope it helps and please let me know if you have any questions. I had to post a link due to the video size :grimacing:

Am I right in assuming that the bug (yes I call it a bug) of resetting overrides of symbols that are nested in other symbols will be fixed soon?

I have numerous changes to make to numerous instances of a tab bar. And every time I change the state (is a separate symbol instance) the component is completely reset. (As described above, in groups everything behaves as expected without a reset).

I am totally annoyed by this additional and unnecessary work.

When will this be fixed? This is a real dealbreaker for productivity! :face_with_steam_from_nose:

Hi @Xhaust,

I understand the friction this causes in your workflow. However, we don’t have yet a defined date to work on this. We’ve looked into this and it’s not a trivial change. The team is aware, but it’s not something we can tackle yet, sorry. :folded_hands:

Just a final note: it works with groups because you’re not nesting the symbol into another one, so you do have an overridden instance with this setup, and that override is kept when you swap the symbol.