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

Different type treatment with substitute #54

Closed RustyGoodman closed 7 years ago

RustyGoodman commented 8 years ago

If a symbol has two fields in one text box, the type is styled differently if a substitute is used. With a substitute is the prefered styling. Without, the second word of the first field uses the second field's styling.

screenshot 2016-04-11 10 07 39
nitrada commented 8 years ago

Unfortunately, you cannot use several styles within one text layer with data populator.

RustyGoodman commented 8 years ago

@nitrada But I have in the example above and it works. bottom left is a populated version of top left. If there is substitute content in the curly brackets it styles correctly. If there is not, it does not style correctly. It'd be great for both to work consistently like the version on the left.

nitrada commented 8 years ago

ah it's with the new symbols – sorry, things have changed here :) we'll investigate.

nitrada commented 8 years ago

can you elaborate a bit more please. i'm not sure if i get you 100%. maybe also show the error case (as the example on the right looks also correct although there's no substitute… or do i still get you wrong?

RustyGoodman commented 8 years ago

The bottom left is the top left version once it has been populated. The word Goodman is in the same styling as Russ. The bottom right is the populated version of the top right. The word Mazza has not continued the styling of the word frank. Having substitute text in place is the difference. It seems that without substitute text only the first word of {name} gets the styling applied to the tag, and the rest of the text gets the styling used after the tag, which seems to be a bug to me.

nitrada commented 8 years ago

@r-ss-ll on my machine, the substitutes don't work at all (see https://github.com/preciousforever/sketch-data-populator/issues/58), can you upload the file you showed in this issue so we can investigate?

@lukasondrej here's a related substitute issue.

nitrada commented 7 years ago

@russgoodman can you try this with the current version of the plugin?