dataliterate / data-populator

A plugin for Sketch and Adobe XD to populate your design mockups with meaningful data. Goodbye Lorem Ipsum. Hello JSON.
MIT License
1.67k stars 113 forks source link

Support Prefix & Suffix #260

Open desktopofsamuel opened 2 years ago

desktopofsamuel commented 2 years ago

Which version of the plugin are you using? [x] Data Populator for Sketch [ ] Data Populator for Adobe XD

Is your feature request related to a problem? Please describe. Currently unit only appear after the value, however, I deal with financial data a lot and I need manually add dollar signs ($) in front of the value manually in order to solve this problem.

Describe the solution you'd like Therefore, It would be great if Data Populator can support prefix or suffix format (or making unit configurable to display in front or after the value) (Syntax could be "string" {value} )

garrytaulu commented 2 years ago

I just discovered the plugin today and I ran into the same limitation straight away. It's helpful generating random prices for a data table but then I had to go in and manually add the currency symbol.

Perhaps the syntax for the layer name could be something like $ + commerce.price which would output something like $234.43

nitrada commented 2 years ago

@desktopofsamuel @garrytaulu have you tried the "Unit" filter described here? Please note it's currently "suffix only", but maybe if you ask @drosen-appneta, who contributed this filter amongst others, very kindly he might be able to help