Open vgpena opened 5 years ago
Hi @vgpena! Thanks for the detailed ticket! 🙏
This is definitely reproducible and a common issue. Are you able to share your source? That will help me to identify the issue.
I think the problems causing this issue are probably in the core html-sketchapp
dependency, and the error you're seeing occurs under a variety of circumstances where html-sketchapp
is failing to convert the markup to sketch nodes for various reasons. Unfortunately those failing cases haven't been documented yet.
I've set up #60 to track this since I don't want to pollute your ticket with too much information.
Just diving in here in case anyone else experiences this.
I have an Angular storybook which uses storybook-dynamic-app-root
at the base. As this is a custom component, HTML treats it as inline and it has no inherent width/height (renders as 0x0 in the browser).
I added some css to set it to display: block;
and that has stopped it outputting width and height as null and fixed the sketch import.
Hope that helps someone!
@gavmck This solved my issues of importing. I am also using an Angular Storybook (5.3.8), and it seems to do the trick for all my stories
I needed to solve a couple issues to solve this:
html-sketchapp
was giving them a border of thickness null
. Changing the thickness to 0
solved that issue.By making those 2 changes I was able to get imports to work correctly. Hopefully this is helpful 🙂
Hi! I've been testing this out an am running into export/import issues with my generated layers.
story2sketch version: 1.4.0 storybook/react version: 4.0.7 Sketch version: 52.5
When I run
story2sketch
, story2sketch finds my stories (1 component, 2 stories) and generates mobile/desktop for each, for 4 layers total. This all looks correct:But when I import the file into Sketch, I get this error:
I have been looking at the JSON output some and one important part seems to be my frame dimensions:
Changing these
null
values to actual numbers allows the layers to be imported, but they still don't have any contents.I have tested with this sample Storybook I found linked in another issue in this repo and I am able to export/import this one correctly, with all layers and content.
Other things I've tested:
@storybook-knobs
decorator and re-runPlease let me know if this is a known issue and/or reproducible on your end. Thanks!