DWilliames / google-sheets-sync-figma

80 stars 8 forks source link

Repeating groups with Auto Layout causes the last element to get wrong values #176

Open daniel-deme opened 1 year ago

daniel-deme commented 1 year ago

Describe the bug When applying Google Sync to a container layer with Auto Layout property and a Group nested into it, it does the duplication but fails to apply the correct data to the last element.

To Reproduce

I have a table with 6 rows and 5 columns in it. The first 3 columns are texts and the last two are size (width) values.

image

On the Figma side, I have the Auto Layout container layer with two layers grouped together in it.

image image

When I hit Fetch&Sync it duplicates the groups and syncs the text data and sets the width for each duplicant except the last one. The last one gets the data of the first row.

image

Instead of "DEB" and "TS" and "9999" with 50px and 50px widths, the last element is the same as the first one.

Expected behavior My goal here is to have 2 separately sized instances duplicated as many time as many rows I have in the table with the correct data.

Additional context If I just use 1 instance without the grouping it's works like a charm.

image image

I really appreciate this plugin, without real data it would be nearly impossible to design this software. It would be nice to somehow get this working. I'm open to any workarounds here.

Thank you!

jackmates commented 1 year ago

I have exactly the same issue on the web and in the app on mac m1. just about to hand off to client and realised that all last elements are not importing correctly but rather taking from first row

image
jackmates commented 1 year ago

Describe the bug When applying Google Sync to a container layer with Auto Layout property and a Group nested into it, it does the duplication but fails to apply the correct data to the last element.

To Reproduce

I have a table with 6 rows and 5 columns in it. The first 3 columns are texts and the last two are size (width) values.

image

On the Figma side, I have the Auto Layout container layer with two layers grouped together in it.

image image When I hit Fetch&Sync it duplicates the groups and syncs the text data and sets the width for each duplicant except the last one. The last one gets the data of the first row.

image

Instead of "DEB" and "TS" and "9999" with 50px and 50px widths, the last element is the same as the first one.

Expected behavior My goal here is to have 2 separately sized instances duplicated as many time as many rows I have in the table with the correct data.

Additional context If I just use 1 instance without the grouping it's works like a charm.

image image I really appreciate this plugin, without real data it would be nearly impossible to design this software. It would be nice to somehow get this working. I'm open to any workarounds here.

Thank you!

did you find a solution to this issue?

jackmates commented 1 year ago

i found that if i create a single level component and use that then this does not happen @DWilliames @daniel-deme

image