Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Symbol Instances don't use Containers unless wrapped in a Group or column/row layout generates layout #130

Closed
SuperGNUS opened this issue Oct 21, 2020 · 3 comments
Labels
enhancement New feature or request Fidelity Issues relating to the exactness of the design export. High Priority High Priority issue that should be prioritized

Comments

@SuperGNUS
Copy link
Contributor

If you add a Symbol instance to an art board, it doesn't inject a Container, which it should if there is no layout already wrapped. The symbol has box constraints for this.

When more than one item is on the page a Flexible() is wrapped that generates the constraints for the Symbol.

If you just add a single symbol on the page, no Flexible layout is used. Also if you specify -c stack it won't generate Containers for the symbol instances.

Work around (which should be documented on the wiki, is to Group the symbol by itself will inject a container for the symbol. This should be unnecessary.

Also, the Symbol Master has a top level Container() that is redundant, since the constraints are passed in. Not a big deal, just isn't needed.

@siliconivan
Copy link
Member

Just to add some clarity here, and this is completely from my understanding from our Discord chat about this. But the reason why a SymbolInstance needs to be wrapped in a container where no other VisualNode needs to be is because of sizing. In Sketch you can resize a SymbolInstance that's different from the original SymbolMaster. Luckily, @GeniusVentures created a way for Symbols to use LayoutBuilder which allows it to scale based on the parent containers size (I believe).

@siliconivan siliconivan added enhancement New feature or request Fidelity Issues relating to the exactness of the design export. High Priority High Priority issue that should be prioritized labels Oct 21, 2020
@SuperGNUS
Copy link
Contributor Author

This never got done, so it's showing up for Ivan now.

@siliconivan
Copy link
Member

I think this changed and should be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Fidelity Issues relating to the exactness of the design export. High Priority High Priority issue that should be prioritized
Projects
No open projects
Fidelity Improvements
Awaiting triage
Development

No branches or pull requests

2 participants