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

Fill in random order: do not fill recurring keys randomly #47

Open
habenbam opened this issue Aug 1, 2022 · 1 comment
Open

Fill in random order: do not fill recurring keys randomly #47

habenbam opened this issue Aug 1, 2022 · 1 comment

Comments

@habenbam
Copy link

habenbam commented Aug 1, 2022

Scenario

I create the design for an item detail page of an e-commerce shop in Figma. Some information, such as the brand name of a product, is used in several places on the page. I have a JSON file with different products. I now want to fill the page with a random article from the JSON file. Suppose there is a key brandName in the JSON and all the layers in Figma that should display the brand name are named after this key.

Problem

When I select the option Populate in random order to populate the page with a random item, I have a different brand name for each layer named brandName. However, all occurrences of brandName should be given the same brand name, chosen at random. The problem then also occurs for all other keys. As a result, the information no longer fits together.

Possible solution

If the keys are selected randomly (Populate in random order), I can decide whether the randomly selected key from the JSON should apply to all matching layers in Figma. Maybe this is helpful for others as well? I'm not sure if the wording in the UI is appropriate.

👉 Please see my (forked) feature branch.

👇 An example where the key "name" is used twice. Using this json-test-file.

jsontofigma-merge.mov

Thank you for developing this plugin 🙏

@PavelLaptev
Copy link
Owner

PavelLaptev commented Jan 16, 2023

@habenbam thank you for your issue. I'm currently rewriting the plugin and this will be really helpful. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants