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

Symbol instances #183

Merged
merged 6 commits into from
Apr 22, 2020
Merged

Symbol instances #183

merged 6 commits into from
Apr 22, 2020

Conversation

kig
Copy link
Contributor

@kig kig commented Apr 21, 2020

Tracking work on completing symbol instances support.

  • Creates an overrideValue for each value that differs between the SymbolMaster and the symbol instance JSON from html2sketch.

Creates an overrideValue for each value that differs between the
symbol master and the symbol instance json from html2sketch.
@kig
Copy link
Contributor Author

kig commented Apr 22, 2020

I ran a diff between a broken export (button labels don't show up) and a working one. The working one was created by changing the button symbol master font size to 14 and then back to 16 in Sketch.

The issue seems to be that the group frame of the text is set to width: 0, height: 0. The nested text layer does have the correct width and height.

@kig
Copy link
Contributor Author

kig commented Apr 22, 2020

The broken frame is coming from html2asketch. The button shadow DOM slot-element returns a zero getBoundingClientRect. Workaround is to use a selection-based BCR if the node BCR is empty in html-to-sketch nodeTreeToSketchGroup.

@eeegor
Copy link
Collaborator

eeegor commented Apr 22, 2020

@kig looking good, thanks!

@eeegor eeegor merged commit 3974510 into telekom:development Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants