utom / sketch-measure

Make it a fun to create spec for developers and teammates
http://utom.design/measure
MIT License
6.92k stars 596 forks source link

Spec Export Fails with Sketch 53 #536

Open pbanta81 opened 5 years ago

pbanta81 commented 5 years ago

Progress bar hangs when attempting to export an artboard containing a symbol. Suspect the updates to how overrides are handled is the culprit.

Export retains functionality when exporting artboards with no symbols.

rayshan commented 5 years ago

Same problem:

screen shot 2019-02-06 at 12 20 23 am

cc @ellunium who saved us last time 🙏

ellunium commented 5 years ago

@pbanta81 @rayshan you can give a try to the latest found in the fork: Download latest Let me know if it works for you.

meecasso commented 5 years ago

Was having the same issue. Latest fork from @ellunium worked. Make sure to restart Sketch ;)

rmax209 commented 5 years ago

It worked for me too. thank you!

pbanta81 commented 5 years ago

@ellunium works, thanks so much!

pbanta81 commented 5 years ago

@ellunium we do have one error that's popping up

The dialog box reports "Error: undefined" on a specific symbol on an artboard. Upon failure, it leaves a detached artifact of the symbol on the artboard, effectively duplicating that thing.

There isn't anything we can see that is unusual about that specific symbol but it fails to export every time.

Outside of this, export appears to be functioning as expected.

ellunium commented 5 years ago

@pbanta81 interesting!

Do you think it would be possible to share with me an example file? Doesn't need to be your whole design file, only couple elements that you know I can reproduce the problem on my end?

pbanta81 commented 5 years ago

@ellunium Yes! See attached

broken-export.sketch.zip

ellunium commented 5 years ago

Thanks a lot! I'll take a look at it soon.

rayshan commented 5 years ago

@ellunium latest works for me, you rock 🙏

wmetellus commented 5 years ago

@ellunium I installed the latest but simply get an Error: undefined when I try to export.

bduffley commented 5 years ago

@ellunium - thanks. the fork works after restarting sketch.

idsampaio commented 5 years ago

Hi,

@ellunium I think I have the same problem as @pbanta81 , in a project with symbols and links it does not let me export, it hangs at that step, and duplicates me the layer of that file in my project. attached here some prints.

captura de ecra 2019-02-07 as 08 56 11 captura de ecra 2019-02-07 as 08 47 24 "maqueta - detalhe 1 - header" - it is a symbol.

Very grateful, excellent work.

Best Regards

ellunium commented 5 years ago

Yeah, the test file show me the same problem. Symbols with overrides are the problem somehow. I didn't have much time to look at it since yesterday and today I won't have time once again, maybe tomorrow I can take a look and figure out a solution, because I also depend on the plugin ;)

pbanta81 commented 5 years ago

Thanks for staying with this @ellunium

ellunium commented 5 years ago

No worries.

I just pushed a change to the code trying to fix the undefined problem.

It worked for me, I'm curious to know if you could give it a try on one of your working files, maybe a more complex one would be best to cover more scenarios.

Remember to uninstall the plugin, restart sketch and install the downloaded version, just to make sure there's no cached plugin information.

Download the latest zip file from the fork

Please let me know how it goes!

pbanta81 commented 5 years ago

Export succeeded on the test file we worked with yesterday. Sending it to a teammate to go a bit deeper as his file was the original we were struggling with. Will report back.

ellunium commented 5 years ago

Thanks! I'm looking forward to their feedback.

CVSccorpus commented 5 years ago

Having this issue as well. detaching all symbols before exporting seemed to fix it, although thats a headache in itself

wmetellus commented 5 years ago

@ellunium confirming the latest worked for me! Thank you!

pbanta81 commented 5 years ago

Still have some testing to do but things are lookin good so far! Thanks @ellunium

idsampaio commented 5 years ago

Excellent job @ellunium ... It already exports without a bug, but I noticed that now the page that has the symbol does not let you check the properties. Who knows, in a next rectification, thank you.

ellunium commented 5 years ago

@idsampaio I don't really work with symbols so I didn't know what's expected. I must have broken something then.

Basically, the plugin should go through each layer/symbol/etc and detach all the symbols (while keeping their overrides) to export their properties? So, that way, although you're using symbols you can actually inspect each layer.

Correct?

idsampaio commented 5 years ago

Yes, I think it's a better option. Because when we select the artboards to export we do not need to attach the page of the symbols. Thank you, @ellunium

brandbrilliance commented 5 years ago

I'm not able to export a design at the moment, because it hangs at one specific symbol.

screenshot 2019-02-08 at 15 44 50
gridexagm commented 5 years ago

I have the same issue. My file is using symbols from an external library file..., the progress bar hangs from the very beginning. @ellunium

xieminjie commented 5 years ago

The nest symbols cannot be exported, I believe this is affected by the changes from the latest version of sketch, could you please have a look? Thank you~@ellunium

huxiangcc commented 5 years ago

thank you. The latest version (2.7.9) worked.

gridexagm commented 5 years ago

Where can I get version 2.7.9, seems 2.7.7 is the only one available...

ellunium commented 5 years ago

I'm trying to take a look at it. I also need it fixed on my side :) But I didn't have any time to stop and focus on this since last week, I hope I find same time this week. Cheers!

ellunium commented 5 years ago

2.7.9 basically works, but ignores symbols altogether, sorry, that's my bad.

One workaround is to create a new document and detach your symbols from there, then export. But that's not scalable, I will try to fix this because other people that work with me they are heavy symbol users and need the plugin working as it usually does.

Maybe @utom is looking at this already?

pbanta81 commented 5 years ago

@ellunium thanks for continuing to look at this, symbols and nested symbols are critical parts of many workflows.

rosydaqbar commented 5 years ago

Thanks @ellunium for some of my project your version is work pretty well, but it comes error on the project that have a lot of screen and page. i think the best solution right now if you're still need sketch measure is to us the older sketch version.

brandbrilliance commented 5 years ago

Yeah. The symbols are not parsed as individual objects, so they all export as 1 "group" e.g. headers, footers, and other symbol with multiple objects inside. So developers can't see the details inside these headers, footers and symbols to understand how to make them. You currently have to detach all the symbols, which would be an insane amount of work just for a spec export. I understand this is a free tool, so we have to wait patiently for a fix.

I'm thinking Sketch should start to integrate this features into it's core.

bkdimri commented 5 years ago

this is what i am currently doing the specs to export in symbols. Duplicating art board which need to be exported > unlocking layers in duplicated artboards using sketch automate > selecting all symbols using sketch automate > recursive detaching all symbols ( alt + detach in sketch 53) > unlocking layers in detached symbols (if any) > spec export

tedious but work fine till the issues are fixed .

ellunium commented 5 years ago

Alright, so I just pushed a fix for not exporting symbols.

Could you all please test it out with the more complex files you might have?

Thanks in advance!

Remember to uninstall the plugin, restart sketch and install the downloaded version, just to make sure there's no cached plugin information.

Download the latest zip file from the fork

Please let me know how it goes!

You can also give it a try to the version I created with a little bit more features, like:

  • added a check in case CSSAtributes() gets fixed and they add back radius-border property
  • added fix to show Library and Local styles, also added a check for sharedStyleID
  • added backward compatibility for notes marked with older versions of the plugin
  • added support to show radius even on masked items
  • expanded radius support to handle multiple radius values on mark and export
  • added support for oval, path, triangle, star and polygon shapes
alexandwich commented 5 years ago

@ellunium It worked! Thanks a lot!

rosydaqbar commented 5 years ago

it works! thanks @ellunium

idsampaio commented 5 years ago

Exporting symbols it worked! Thanks @ellunium . With this version the overlay marking and sizes conflict. Sketch version: 53.1 (72631).

file_sample.zip sample

ellunium commented 5 years ago

Nice feedback @idsampaio There's indeed something strange there, I'll take a look.

ellunium commented 5 years ago

Okay, pushed a new change to fix the marking.

Could you all please test it out with the more complex files you might have?

Remember to uninstall the plugin, restart sketch and install the downloaded version, just to make sure there's no cached plugin information.

Download the latest zip file from the fork

Please let me know how it goes!

You can also give it a try to the version I created with a little bit more features, like:

  • added a check in case CSSAtributes() gets fixed and they add back radius-border property
  • added fix to show Library and Local styles, also added a check for sharedStyleID
  • added backward compatibility for notes marked with older versions of the plugin
  • added support to show radius even on masked items
  • expanded radius support to handle multiple radius values on mark and export
  • added support for oval, path, triangle, star and polygon shapes
idsampaio commented 5 years ago

Great job @ellunium . Thanks, it works perfectly.

bkdimri commented 5 years ago

thanks @ellunium . Noticed that locked layers on art-board or inside a symbol (to prevent from showing as overrides) cannot be inspected. Not sure if this is the intended behavior.

sarthakpranit commented 5 years ago

HUGE HUGE THANKS @ellunium ! 🍡

ellunium commented 5 years ago

@bkdimri: I'm afraid that's the way the plugin has been created initially.

During spec export, If the layer is locked and it is not a slice layer, then just don't add it to the inspection.

edwardsdesign commented 5 years ago

@ellunium So far the sketch-measure-latest is working as expected but I have noticed a bug with Masks. When trying to inspect any child layer within a masked layer, only the masked layer is able to be inspected.

To better clarify the masking issue:

SM WILL NOT Inspect a symbol - If the symbol is within a mask layer SM WILL inspect a symbol - If the symbol is within a plain layer group that is within a mask layer SM WILL inspect - Any other non symbol object within a mask layer

Here is my test Sketch File and Measure Output: Mask-Symbol-Group.zip

Thank you for your great plugin!

ellunium commented 5 years ago

@edwardsdesign nice catch! By the way, the plugin is not mine, it's @utom's, I'm just a contributor :)

I think I introduced this myself as part of a bugfix :D

I just pushed a fix for masked symbols in the sketch-measure-latest repository.

Could you please give it a try?

Remember to uninstall the plugin, restart sketch and install the downloaded version, just to make sure there's no cached plugin information.

Download the latest zip file from the fork

Please let me know how it goes!

edwardsdesign commented 5 years ago

@ellunium It appears your fix has worked. Thank you!

@utom SM is by far one of the most useful plugins in our workflow. Your export/inspect sets you apart for teams that have a very strict IT policy that does not allow use of cloud based services. PS, your donation link is broken.

wearebeta commented 5 years ago

Sketch 53.1 (72631) works. How can I tip you?

ellunium commented 5 years ago

@edwardsdesign noice! :)

@edwardsdesign @wearebeta Seems like the donate link is broken on @utom's website. Maybe connect with @utom on social media to ask how can you buy him a coffee? 👍 ☕️

https://twitter.com/utom https://www.instagram.com/utom/

Have a nice day everyone!