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

Sketch Symbol instances won't export correctly to SVG #1239

Closed
callumacrae opened this Issue Jan 17, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@callumacrae

callumacrae commented Jan 17, 2017

Sometimes I get the following output:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Avocode 0.4.0 - http://avocode.com -->
<svg height="NaN" width="NaN" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 NaN NaN">
    <image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" height="26" width="76" y="0" x="-1" />
</svg>

(that's the google logo)

It looks like it happens when there's only only later and it's an <image> - the width and height are NaN.

@rychlis

This comment has been minimized.

Show comment
Hide comment
@rychlis

rychlis Jan 17, 2017

Member

Hey, thanks for the report! Does this error happen for a specific layer or randomly?

Also what version of Avocode are you using?

Member

rychlis commented Jan 17, 2017

Hey, thanks for the report! Does this error happen for a specific layer or randomly?

Also what version of Avocode are you using?

@callumacrae

This comment has been minimized.

Show comment
Hide comment
@callumacrae

callumacrae Jan 17, 2017

Happens for a few specific layers. I'll see if I can get a document to replicate it in.

Using 2.12.3 - will update and try again.

EDIT: happening in 2.12.4, too.

callumacrae commented Jan 17, 2017

Happens for a few specific layers. I'll see if I can get a document to replicate it in.

Using 2.12.3 - will update and try again.

EDIT: happening in 2.12.4, too.

@rychlis

This comment has been minimized.

Show comment
Hide comment
@rychlis

rychlis Jan 17, 2017

Member

OK. It would help us a lot if you could send us such document. You can send the file to our support email team@avocode.com if you don't want to upload it publicly here at github

Thanks!

Member

rychlis commented Jan 17, 2017

OK. It would help us a lot if you could send us such document. You can send the file to our support email team@avocode.com if you don't want to upload it publicly here at github

Thanks!

@callumacrae

This comment has been minimized.

Show comment
Hide comment
@callumacrae

callumacrae Jan 17, 2017

Sketch file (GitHub doesn't allow Sketch file uploads 😞): Test.zip

Avocode: https://manager.avocode.com/view/220ccb328b8f4880a20f5ad90ec946a8/

Trying to export the google layer results in a broken SVG, for me.

callumacrae commented Jan 17, 2017

Sketch file (GitHub doesn't allow Sketch file uploads 😞): Test.zip

Avocode: https://manager.avocode.com/view/220ccb328b8f4880a20f5ad90ec946a8/

Trying to export the google layer results in a broken SVG, for me.

@rychlis

This comment has been minimized.

Show comment
Hide comment
@rychlis

rychlis Jan 17, 2017

Member

Thanks a lot for the document, we are now able to reproduce the issue :)

The problem happens when exporting symbol instances in sketch documents, we will try to fix the issue in the upcoming release. In the meanwhile as a workaround you can export the SVG by opening the Symbol definition (by double-clicking the layer, the symbol definition Artboard must be synced by Avocode Plugin) and export all the layers there - the "Google" layer group in this case:

google-group

Member

rychlis commented Jan 17, 2017

Thanks a lot for the document, we are now able to reproduce the issue :)

The problem happens when exporting symbol instances in sketch documents, we will try to fix the issue in the upcoming release. In the meanwhile as a workaround you can export the SVG by opening the Symbol definition (by double-clicking the layer, the symbol definition Artboard must be synced by Avocode Plugin) and export all the layers there - the "Google" layer group in this case:

google-group

@rychlis rychlis changed the title from Some SVGs won't export to Sketch Symbol instances won't export correctly to SVG Jan 17, 2017

@callumacrae

This comment has been minimized.

Show comment
Hide comment
@callumacrae

callumacrae Jan 17, 2017

amazing, thanks!

callumacrae commented Jan 17, 2017

amazing, thanks!

@rychlis rychlis added onGitlab and removed sketchPlugin labels Jan 18, 2017

@jakubzitny jakubzitny added this to the 2.15.1 milestone Sep 11, 2017

@jakubzitny jakubzitny modified the milestones: 2.15.5, 2.16.0 Sep 28, 2017

@jakubzitny

This comment has been minimized.

Show comment
Hide comment
@jakubzitny

jakubzitny Oct 11, 2017

Member

Hi guys. Symbol instances should be finally exportable to SVGs correctly in 2.16.0, please update and let us know if you have any other problems with Avocode 😉

Please note, that since the symbol overrides are not inspectable in Avocode yet, the contents of SVG will be bitmap, not vector.

We're working hard on bringing the ability to inspect symbols with overrides in-place inside the document though and it should be ready soon. For now, please vote for the feature on our UserVoice.

Member

jakubzitny commented Oct 11, 2017

Hi guys. Symbol instances should be finally exportable to SVGs correctly in 2.16.0, please update and let us know if you have any other problems with Avocode 😉

Please note, that since the symbol overrides are not inspectable in Avocode yet, the contents of SVG will be bitmap, not vector.

We're working hard on bringing the ability to inspect symbols with overrides in-place inside the document though and it should be ready soon. For now, please vote for the feature on our UserVoice.

@jakubzitny jakubzitny closed this Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment