Details
-
Task
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
None
-
QDS Berlin - 2024 Week 45/46, QDS Berlin - 2024 Week 47/48
Description
Groups in Figma work differently compared to majority of node types.
So, currently, Figma plugin exports Groups as Items with x, y, width and height, but without rotation or flips.
It allows us to position children of Groups mostly correctly, but the Group item itself seems to be misplaced.
We have multiple ways of forward here.
We've considered or discussed the following options:
1. Leaving it as is. - Group looks misplaced, items end up mostly outside of it, visuals look right but the structure and code are confusing
2. Completely skip the Groups and export their children without them. - Doesn't seem to be optimal since it changes structure of the generated code and might break some of the advanced logic that is assigned by user to the Group node via plugin metadata.
3. Bounding Box approach - export Groups without rotation or Flip but changing the geometry of the Group to include all children. - Seems to cause the same issues as the 1st approach - confusing properties, also requires us to recalculate positions of the Group children.
The decision right now is to try to mimic Figmas approach - export Groups with rotation and flip. - Seems to be the best approach for the end-user. Requires us to be more aware of the node context (parent type), recalculate position and diff transformation for the children due to the way Groups work and apply properties.
Probably requires additional research for handling nested Groups?