paintedbicycle / sketch-data-faker

A Sketch plugin providing 130+ types of smart placeholder content for your mockups from Faker.js and other sources.

Home Page:https://sketchfaker.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Concatenate Multiple Data

jimcipriani opened this issue · comments

I would really like to be able to build more complex random data strings. For example, I'm building sports data grid and have run into a few uses case I'd like to use this plugin for:

  • Creating Team Names: aker.address.city() + " " + random.word()
  • Creating Sample Scores: faker.random.number(7) + " - " + faker.random.number(7)
  • Creating Better Dates: faker.random.number(12) + "/" + faker.random.number(30) + "/2021"

Obviously, this changes the scope of the current plugin by adding simple JS phasing. Still, I would love to be able to build more complex phasing using layer names.

Thanks for the examples! Offering multiple date formats is something that I'll likely build in - giving the ability to choose the date format you'd like to see, because I agree the defaults aren't great. Good to know someone is interested in it too.

For the others, I believe this can be achieved by creating multiple text layers. In your first example you could have a text layer set to city and another text layer with the random word. Same with the other example, with a third text layer in between with the dash. Using Smart Layout to resize should make it work across different text lengths

I would love this too. I'd pay for the privilege of having someone else solve this for me. I create a lot of complex, data-heavy applications for my clients. The Faker implementation for Adobe XD actually handles this pretty well. You get a dedicated text field where you can enter Faker tokens and plain text to construct some very complicated placeholder text. As with everything else in XD, it's painfully clunky, but the syntax makes sense.

hey, thanks for this useful plugin! i'm sharing the same frustration as jimciprianifor the merging content. The Solution that you give is okay for a 1 liner, if i want to get multiple lines the breaks are going crazy. So pleeeeaaaase make it real !