Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge symbols (same-named) in symbol library #7

Closed
illustree opened this issue Jan 16, 2017 · 8 comments
Closed

merge symbols (same-named) in symbol library #7

illustree opened this issue Jan 16, 2017 · 8 comments

Comments

@illustree
Copy link

sometimes sketch creates duplicates of symbols in the library ... this usually happens when you copy-paste from different files. So my idea for your plugin is to somehow merge those duplicates in the library smartly so that in the library there would be NO same-named symbols ... or at least it would rename the “same-named” symbols and give them a number at the end of the name. thanks!

proposals would be:
A.
checkbox “clean symbol names” (description: same-named symbols will be renamed logically)

B.
checkbox “remove same-named-symbols” (identical and same-named symbols will be merged to one and also linked properly in the layout)

@sonburn
Copy link
Owner

sonburn commented Jan 17, 2017

This is in fact the next logical thing to tackle for this plugin, which I have thought about quite a bit. In the least, I could do option A relatively easily, and it would help when consolidating similarly named symbols into one (making them easier to decipher which is the "master" and which can be deleted after instances have been pointed to the master).

Option B however is a bit more tricky... I would want to verify that the contents of two symbols with the same name are identical. Without this validation, I could see this being inadvertently destructive.

Here are a couple situations that I would need to account for...

  • You inadvertently used the same name for two symbols, but the symbols are in fact very different. Option A would solve this at least.
  • Unbeknownst to you, you have two versions of the same symbol with the same name (typically after a copy/paste), and make a change to one expecting it to be propagated everywhere, not realizing that it hasn't been. Now one is slightly different than the other. Which one is right?

I plan to look for some ability to compare symbols, and if this can be done with confidence, I would implement something like option B, as I think this is the last glaring symbol issue this plugin could tackle.

As always, thanks for your continued use and feedback!

@illustree
Copy link
Author

A. would be already much appreciated! it is really often the case that there are e.g. icons with little changes and from the list preview you just can't recognise which is the correct one. I understand “B” could be really tricky ... thanks in advance for what ever you are going for

@sonburn
Copy link
Owner

sonburn commented Jan 19, 2017

I just committed an update which includes an option to sequentially rename duplicate symbols, as well as improves the appearance of the plugin. Please give it a spin!

@ghost
Copy link

ghost commented Jan 31, 2017

@sonburn Maybe you could allow the user to choose which layer should be deleted ? Manually ? So you don't really need to build the logic of comparing the items. You just leave it to the user.
A little bit like duplicated songs in iTunes ? Maybe ?

@sonburn
Copy link
Owner

sonburn commented Jan 31, 2017

@edwardbiz I feel like that's more possible, or easier, now with the sequential numbering of duplicate names. My perfect solution would be to do a symbol comparison, and to ensure only exact duplicates were being remapped and removed, with 100% accuracy... so this is what I will be striving for. Needless to say, I am still thinking about this one. :)

@illustree I am going to go ahead and close this issue as its been a couple weeks since I implemented your request. As always, thanks for the feedback and for using Symbol Organizer!

@sonburn sonburn closed this as completed Jan 31, 2017
@ZillieZephyr
Copy link

ZillieZephyr commented Apr 14, 2017

So I really wish you had let this stay open, as I think this is still something to consider. Honestly, if someone is using the same name for a symbol, then they aren't using symbols correctly. This was posted a year ago, and it's pretty much exactly what needs to exist.

https://www.designernews.co/stories/70330-new-sketch-symbols-and-version-controlwhats-your-teams-workflow

@sonburn
Copy link
Owner

sonburn commented Apr 14, 2017

@ZillieZephyr I would love to solve it, but it's a very difficult problem to solve (hence why nobody else has done it, not even Sketch itself)... but it does look like Sketch does have some quality of life Symbol management/duplicate avoidance stuff planned for the future. Until then, I personally will keep being diligent about avoiding duplicate symbols to begin with.

@sonburn
Copy link
Owner

sonburn commented Apr 19, 2017

@ZillieZephyr Latest version of Sketch supposedly fixes the annoying bug of symbol masters being duplicated when copying/pasting - https://cldup.com/7qydxgljPP.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants