Code Monkey home page Code Monkey logo

merge-duplicate-symbols's People

Contributors

dolbyds avatar oodesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

merge-duplicate-symbols's Issues

Keep shared style override for merged symbols instances.

I have icons in 3 colors since times when overrides of shared styles where not there yet.
Now that we have it - I tried to merge 3 icons (symbol structure and naming is the same) but all instances had they shared style override switched to the style of merged symbol.
E. g. I had blue, black and grey icon (all 3 using shared styles for a single vector shape). After merging I had 1 symbol with blue color and instances that had grey or black shared style also became blue.
I think it may help people to improve library of long going projects if it's possible.

Merging Some Layer Styles Not Working

I have two sets of layer styles for our brand colors: Fills and Outlines
I was able to merge the two fills layer styles that I need to, but when I try to do the same with the outline versions I am seeing the issue in the below screenshot. This bug ultimately blocks me from being able to merge them.

Screen Shot 2019-07-01 at 10 43 00 AM

Plugin not working in 50.2

Plugin not working in 50.2
I know its an old sketch version, but im stuck with it cause i use Paddy.

Where can i download old versions?

Thanks

Merging resets overrides and size

When merging a symbol, it should try to keep the label overrides. In Sketch, if you change a symbol by switching it in the symbol dropdown, any override will be kept. The plugin should replicate that behavior.

Merge identical symbols regardless of name

We have cases where over time we've ended up with identical symbols with different names like: Button, Button Copy 1, Button Copy 1 Copy 1 etc which is pretty frustrating. It would be great if there was a way to find all of these cases where the symbols are 100% identical other than the name and merge them.

Feature Request: Display more information while merging

It would be super helpful to display more information per symbol in the merge dialog like:

  • artboard size
  • page name
  • creation date (if possible)

So we can differentiate on more indicators.
Would be really happy to see that!
Thanks for your work, best,
Boti

Nothing happens

Hi, when I click on the 'merge duplicate symbols' from the plugin menu, nothing happens. Does this plug-in require a specific sketch version? I'm on v.48.2 and can't update due to the company system set-up. Please let me know. Thanks.

Doesn't work with library symbols

You can only merge local symbols with library symbols when they have an instance already in the file. Ideally, merging allows includes library symbols regardless of whether they're already in the file.

A hacky way to do this would be to insert all the instances of synced symbols in a temporary page, run the merger, and then delete them.

When you go through merging process, it should show you which is a library symbols vs a local one.

Save overrided data while merging

Hey!

Please make this plugin save overidded data white merging, after that this plugin becomes the best in my collection :-D

Its because you notice duplicates after some time when all instances were overidded, and this plugin merging duplicates removes all data, like if I just replaced by.

Please, let me know what you think about that. Thanx!

Performance Issue and Crashing

Using Sketch v.46 Plugin 1.1.0

Great idea for a plugin! Sketch needs this so badly.

Unfortunately on my system with a fairly large file, there's some sort of memory leak/performance issue.

I tried to use this on a fairly large file (10 pages, 100+ artboards). Merged 2 symbols and chose to keep the one that was used across 99% of the artboards. Even though only one instance needed to be replaced, the plugin instantly consumes 100% of the CPU usage (according to activity monitor) and the memory slowly creeps up from 3GB to well over 16GB at which point things froze and I reset computer. Tried a couple more times with different symbols and had the same result, but force quit after passing about 14GB usage.

Tried on a smaller file and the plugin still shoots the Sketch CPU usage up to 100%, but it finishes the merge fairly quickly.

Crashes when merging our color swatch symbols

Our color symbols from the design system get re-used a TON throughout Sketch files.

screen shot 2018-06-25 at 12 06 38 pm

Here's one such example. It's not uncommon to have 50-100 instances of one of these colors. Reliably, the plugin crashes when attempting to merge them with over ~25-30 instances. This doesn't tend to happen with text symbols with many instances, or other components (pagination controls, whatever).

The symbol is nothing more than a 96x96 color rectangle. No layer style applied or anything like that.

Replacement Fails on Sketch 51

Plugin UI closes and replacement fails after clicking "OK." Using Sketch 51 and a fairly large file. Logs below :


default 16:12:56.176116 -0700 Sketch Beta Exception: TypeError: currentOverrides[keyIndex].allKeys is not a function. (In 'currentOverrides[keyIndex].allKeys()', 'currentOverrides[keyIndex].allKeys' is undefined)

default 16:12:56.176217 -0700 Sketch Beta TypeError: currentOverrides[keyIndex].allKeys is not a function. (In 'currentOverrides[keyIndex].allKeys()', 'currentOverrides[keyIndex].allKeys' is undefined)
line: 46
sourceURL: /Users/ninzucchi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript
column: 79

default 16:12:56.342440 -0700 Sketch Beta Error in command 3rdPartyPlugins Script at path /Users/ninzucchi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/FB SketchKit.sketchplugin/Contents/Sketch/Analytics/3rdPartyPlugins.cocoascript does not contain a handler function named: onRunPluginCommand.

Not able to run plugin

Hey guys,

For the last two weeks, I'm experience issues with this plugin.

  1. If I run the plugin at the start of my day, before I do anything else, it works fine when "merging duplicate symbols with the same name all over the document". However, it crashed after I merge the first 4 or 5.
  2. Then, I am not able to even run the option of "merging duplicate symbols with the same name all over the document". My cursor changes to the spinning rainbow wheel and then nothing happens.

I've tried:

  • uninstalling all plugins
  • reinstalling just this plugin
  • restarting sketch
  • restarting my computer
  • everything!

Super frustrating. Please advise and fix. No, I cannot offer a copy because it is protected under an NDA.

Merge duplicate error in sketch 56.2

In sketch 56.2 the latest version of plugin pay version 5.0.2 does not work
this is the log. thankyou

TypeError: null is not an object (evaluating 'context.plugin.urlForResourceNamed("icon.png").path')
at ShowExpiredWindow (/Users/stefanofois/Library/Application Support/com.bohemiancoding.sketch3/Plugins/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript:19:104)
at MergeSelectedSymbols (/Users/stefanofois/Library/Application Support/com.bohemiancoding.sketch3/Plugins/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript:69:22)

Merged symbols turn into a Red "x" box on all of my artboard

Hi, not really sure what is happening or what these red boxes mean on my file. I merged multiple copies of our navbar and they seem to have disappeared and replaced with a red box with a red dotted outline and a circle with a line through it in the middle. Not really sure what's happening or how to fix it. Thanks.

image

license key

where do i activate the plugin when i have a license key?

Overrides

Merged symbols lose all Override info.

Display Usage Counts

First of all, great plugin. Something I have been thinking of tackling with Symbol Organizer.

Enhancement idea, display usage counts next to each duplicate symbol, to help facilitate the choice of the one to keep. Personally, I am going to try and select the one that is used the most... the others are likely used once or twice.

Silently fails in some files

Some people already reported this. In some of my files (large projects with many pages), plugin wasn't doing anything without showing any error. I tried it both in a regular and a library file.

I narrowed the problem down to a symbol which was duplicated from 2 different libraries. So, I had a local symbol using a library symbol called "Color/Primary" from library A, and somewhere else, another symbol using a library symbol called "Color/Primary" from library B.

I didn't prepare a test file though because I managed to fix the code. It works, but I have no experience in Cocoascript and don't know what's the core issue, so I'll just paste it here in case it's helpful.

After running the plugin, I get this in Sketch dev tools:

TypeError: symbolID.localeCompare is not a function. (In 'symbolID.localeCompare(symbolMaster.symbolID())', 'symbolID.localeCompare' is undefined)
line: 113
sourceURL: /Users/tomoki/Library/Application Support/com.bohemiancoding.sketch3/Plugins/merge-duplicate-symbols-2.0/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript
column: 39
stack: FindOverrideSymbolID@/Users/tomoki/Library/Application Support/com.bohemiancoding.sketch3/Plugins/merge-duplicate-symbols-2.0/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript:113:39
getSymbolOverrides@/Users/tomoki/Library/Application Support/com.bohemiancoding.sketch3/Plugins/merge-duplicate-symbols-2.0/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript:98:24
FindSymbolOverrides@/Users/tomoki/Library/Application Support/com.bohemiancoding.sketch3/Plugins/merge-duplicate-symbols-2.0/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript:55:49
onRun@/Users/tomoki/Library/Application Support/com.bohemiancoding.sketch3/Plugins/merge-duplicate-symbols-2.0/MergeDuplicateSymbols.sketchplugin/Contents/Sketch/MergeDuplicateSymbols.cocoascript:302:49

I tried logging the symbolID right before that line:

<MOMethod: 0x60400b030a20 : target=0x60400cc3e9e0{
    symbolID = "A09CEDD4-44EC-4EB8-8BA3-1327DE7EF9F1";
}, selector=symbolID>

Turns out it's a function, not a string, so all I had to do was add this (in line 113):

if (typeof symbolID === 'function') {
    symbolID = symbolID()
}

It's super dirty, but at least it works. Hope it's helpful. :)

Possible to revert

Would be great to revert to last merged state. I mistakenly overwrote (had the same name, but different) a symbol I actually need.

Enlarge the window size of the plugin

image

Hello, could you please enlarge the window size of your pligin. Especially when merging Text Styles it's hard to see the full name of text styles with loger names.

Doesn't work anymore

HI! I've found this plugin super interesting and I've started using it a lot. :)
Unfortunately, it suddenly stopped working some days ago.
I've tried to uninstall and re-install it, but nothing changed: whan I launch the "Merge Duplicate Symbol" command from the menu (or via Sketch Runner), nothing happens - and I'm sure there are symbol in my file that can be merged.
How can I fix it??

Batch merging

With libraries, you're very likely to merge symbols in bulk.
It would be great to inspect all duplicate symbols in a list and select which version to keep like so:

duplicate symbol A

[x] version 1 - (library A)
[ ] version 2 - (library B)
[ ] version 3 - local
[ ] skip

duplicate symbol B

[x] version 1 - (library A)
[ ] version 2 - (library B)
[ ] version 3 - local
[ ] skip

... and so forth

License File

Do you have plans to add a license file? I would like to use this plug in at my place of business but a license is required to do so. Thanks!

Thank you for your work

Since I probably won't move to the paid plugin, I want to thank you for all the work you've done on this plugin in the past. I have loved using it.

Merging library symbols

Merging library symbols:

  • previews are not available
  • you can't tell which library the symbol is coming from, or whether it's a local symbol

bitmap

What does (EXT) mean?

I understand what (lib) means when I'm merging duplicate styles.

Now, after I enable "include all enabled libraries..." some items show with (ext) next to their names. What do they mean?

Too many symbols - don't fit on the screen

No scrollbar is present, neither the close button at the top of the dialog - restart of Sketch is needed (or pressing Enter which will confirm an action you may not want to go with).

[Improvement?] When merging duplicate symbols, apply changes to symbol overrides

Love the plugin, thanks so much for your work on it!

Suggested Improvement
As a user, when merging duplicate symbols I expect symbol overrides to be updated as well.

For example, I have multiple symbols that are all the same but some instances are used as symbol overrides. When merging symbols some overrides stay linked while others are now missing (and replaced by the red /// placeholder graphic)

Crashes when merging a specific symbol

Just started trying to use this plugin today. It seems to successfully get through several merges, but then always crashes Sketch on the same one (image attached).

image

Move symbol function

Thanks for a great plugin! Since you already have the code in place to replace one master symbol with another, how hard would it be to add a function to move selected symbol masters to another page?

idea: merge symbols with library file

hey,

is it possible to merge symbols with a library file?
it would be helpful to be able when splitting an older sketch file to seperate sub files.

thank you!

andré

Enter license code

Hi,

My boss purchased the plugin for me but there is no UI for me to enter the license code and start using the plugin. Can you help?

Thank you

Nested styles not merging

I have multiple styles listed like icon/dark/default and neither method of merge styles will merge them.

Text- & Layerstyles matching by values

Would be nice if similar Textstyles or Layerstyles are not only matched by name but also with the same values. In my case i have some similar styles which are exact the same in style but with different names.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.