DWilliames / Google-sheets-content-sync-sketch-plugin

Sync content within a Google Sheets document, to text layers — based on their names. Edit and collaborate on your content in Google Sheets, then sync in back to your sketch files.
292 stars 24 forks source link

Sync random row #14

Open HYPD opened 6 years ago

HYPD commented 6 years ago

Love the plugin. Makes my life so much easier when working with large data sets. That being said, some of the datasets I work with have ~100,000 rows. Have you thought about adding the ability to randomly select a row?

Usecase: I'm designing an dashboard of some sort. I've imported a bunch of data into a google sheet. Now I want to test that real data through my design. The data has lots of different currencies, and positive and negative changes. What I'm trying to discover is obvious layout issues. What would help would be to randomly select rows from my dataset.

Instead of looking through the dataset to find a row that might work or break the layout, and instead of adding .1 or changing it to .2 (because you wouldnt do this 10,000 times on 17 layers), it would help if the plugin randomly selected a row, so I could keep generating instances quickly and understand what's going wrong.

How I've set things up so that I can test multiple rows quickly:

screenshot 2017-11-23 21 06 06

Thoughts?

DWilliames commented 6 years ago

@HYPD Thanks for the idea! I actually just pushes an update about 2 days ago that should be able to do this. To be honest, I'm not sure how the performance will go with 10,000 rows.

Make sure you're using the latest version of this plugin: 1.2

Try using either a .x or .n instead of a specific number such as .2. And that should select a random row.

Let me know how you go :)

HYPD commented 6 years ago

That's fantastic. I'm running it through a dataset of ~5000 rows at the moment, and it's running really quickly.

I think I phrased my request wrongly, Is there any way to sync with a whole row instead of multiple rows? For example, now it's randomizing each row for each layer, but can it choose a row and apply it to all layers?

Naming your layers #product.x, #colour.x, #price.x, #sale-price.x and syncing could currently result in this result:

product colour price sale-price
1 Vase Pink €16.99 €8.99
2 Bowl Blue $34.99 |$15.99`

An additional function I'm suggesting for working with rows with stronger relationships. For example, when designing with multiple languages in mind – having a whole row in english, french, etc. Or when designing with multiple currencies: #product.y, #colour.y, #price.y, #sale-price.y - This could probably also be done on the sheet level.

product colour price sale-price
1 Vase Pink €16.99 €8.99
2 Bowl Blue $34.99 $15.99

Take it or leave it, love your work!

HYPD commented 6 years ago

@DWilliames just incase you missed this one. Is this in the cards at all?