sonburn / symbol-swapper

Swap the selected symbols and/or symbol instances to a master of the same name in a library.
MIT License
188 stars 11 forks source link

Feature Request #7

Closed clabap closed 6 years ago

clabap commented 6 years ago

Any possibility of adding support for swapping nested libraries? Example: Let's say a components library is using few themes (colors) libraries. On my project file I use the components library but I'm able to swap between the nested themes library. Doable?

sonburn commented 6 years ago

@clabap Unfortunately it's not doable considering the way symbols work with libraries. For example, if you have a swatch symbol in Library A, which is used in a component symbol in Library B, the swatch symbol is actually added to Library B as an imported symbol. Then, if you use that component symbol in your working document, it's actually importing the component symbol and the swatch symbol from Library B. If the swatch is changed in library A, the only way to reflect that in your working document is to accept the update in library B, and then accept the update in your working document.

Now, with Symbol Swapper, you can change the imported swatch symbol from Library B with whatever you want, from whatever library you want, but that has the potential to be lost if your component from Library B is ever modified.

I hope that sheds some light on things, and thank you for using Symbol Swapper!

clabap commented 6 years ago

Got it. Unfortunately that's a big constrain for synced design system libraries with multiple color themes. Thanks anyway. Your plugin is the best, amazing work.