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

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

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

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

callumacrae opened this issue Jan 17, 2017 · 7 comments
Assignees
Labels
Milestone

Comments

@callumacrae
Copy link

@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
Copy link
Member

@rychlis 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
Copy link
Author

@callumacrae 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
Copy link
Member

@rychlis 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
Copy link
Author

@callumacrae 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
Copy link
Member

@rychlis 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 Some SVGs won't export Sketch Symbol instances won't export correctly to SVG Jan 17, 2017
@callumacrae
Copy link
Author

@callumacrae 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
Copy link
Member

@jakubzitny 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.