Merging components without losing existing overrides

Hi and thanks in advance for anyone answering this question.

I have a library which currently has a dedicated set of buttons for desktop, and a dedicated set for mobile both of which are used in multiple files.

Moving forward I want one set, so I’m looking for the least destructive method to merge “mobile buttons” and “desktop buttons” without breaking designs or loosing text overrides anywhere. Any solutions or resources greatly appreciated!

1 Like

If you pick up the original components and merge them into a variant, then you should be able to update the sets and turn them into just one.

PS: This might still have some issues with layers not matching correctly in the variant format and reseting some overides like text labels, but everything else should be ok if your layers are named correctly.

1 Like

You can swap all instances of Mobile component to Desktop with my plugin Master! Here is a post explaining how it works in detail:

1 Like

Thanks I’ll test that out

Hi Gleb,

Thanks, your plugin did exactly what I needed. Great product!

1 Like

curious if this would work on a team library? for instance, if i make a change to the master button and push the updates, the text in the button gets overridden with whatever the master button text is. would the plugin need to be in the master? or do consumers of the library each need the plugin?

To be clear:

  1. You edit the button main component in the library file. (What do you edit in it specifically?)
  2. You publish updates to the library.
  3. You go to the file where instances of this button are used, accept updates, the text gets reset.

Is this what you are experiencing? It shouldn’t be this way unless you deleted the text layer and created a new one in the button. So you should probably report a bug to Figma support team via the support request form or support@figma.com. In this case Master plugin can help only in the following way:

  1. Make some breaking changes to the button, for example delete the text layer or create a new one.
    Note that wrapping the original text layer in the additional frame or group or simply moving it to a different place in the layers structure is not a breaking change (report a bug), and Master won’t be able to help here since the layers structure of objects you want to attach and component won’t match.

  2. Before accepting changes, find all instances of this button and detach them. You can use plugins like Select Similar or Similayer to find them.

  3. Accept changes, if any. Actually the notification about changed library components should disappear when you detach them all. Then use Master plugin to link them back to the main component. Go to the library, Pick the main component, then select some instances you detached and Link them to the picked main component.

1 Like