GettEngineering / Prism

Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
https://prism.tools
MIT License
361 stars 21 forks source link

Support `textStyle.lineSpacing` #42

Closed freak4pc closed 4 years ago

freak4pc commented 4 years ago

Resolves #41

freak4pc commented 4 years ago

@crysxd Would be happy if you have a few moments to test this branch :)

codecov[bot] commented 4 years ago

Codecov Report

Merging #42 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #42   +/-   ##
=======================================
  Coverage   98.71%   98.71%           
=======================================
  Files          19       20    +1     
  Lines        1555     1559    +4     
=======================================
+ Hits         1535     1539    +4     
  Misses         20       20           
Impacted Files Coverage Δ
...rismCore/TemplateParser/TemplateParser+Token.swift 100.00% <100.00%> (ø)
Sources/ZeplinAPI/Models/TextStyle.swift 100.00% <100.00%> (ø)
Tests/TemplateParserSpec.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4726cb6...cabeca2. Read the comment docs.

crysxd commented 4 years ago

I'll give it a shot in 5 minutes. As this new property mirrors the Android property, calling it lineSpacingExtra would be more accurate I think!

crysxd commented 4 years ago

@freak4pc Works flawlessly!

<item name="android:lineSpacingExtra">{{% textStyle.lineSpacing %}}sp</item>

results in

<item name="android:lineSpacingExtra">3.2sp</item>
freak4pc commented 4 years ago

Nice, glad to hear! I'll cut a release soon:)

About the name, I don't mean for it to directly mirror Android and it seems the more common term is simply line spacing (in print, design, CSS and other platforms) so I think sticking with this would be more generic.

Thanks for the great feedback, though!

crysxd commented 4 years ago

Thanks a lot! That really solved the last issue we had with prism! :) Incredibly fast response! :)

freak4pc commented 4 years ago

Happy to help! Let me know if you bump into anything else ;-)

freak4pc commented 4 years ago

This is part of 0.5.0 :)

crysxd commented 4 years ago

Thanks! Your speed is truly impressive :D Installed the new version from Homebrew and it works like a charm :)