-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add more paragraph style attributes #104
Conversation
This commit adds several more attributes from the NSParagraphStyle properties, including the firstLineHeadIndent, headIndent, tailIndent, maximumLineHeight, minimumLineHeight, paragraphSpacing, and paragraphSpacingBefore properties. Unit tests have also been added to test these new properties.
@nuudles ❤️ ❤️ ❤️ for the time you're putting into this! I'm going to be very busy until just after the new year, so I won't be able to give this a good look until then - sorry for the wait. Two things jump out after a quick peek, though:
|
@ZevEisenberg Congrats dude! No worries on any delay, I know what it's like to plan one of those. I'll take a look at your initial feedback. Cheers! |
@nuudles this all looks great, aside from my earlier comments. |
Changing the paragraphSpacing to paragraphSpacingAfter to be clearer as to which paragraph spacing this affects.
@ZevEisenberg Sorry for the delay in taking a look at this. Work got away from me. I've updated the name of |
@nuudles A little inline documentation would be appreciated. And if you've got the time, a unit test to make sure that behavior stays consistent. Thanks for getting back to this - always appreciated! |
typedef BONChain * (^BONChainLineSpacing)(CGFloat lineSpacing); | ||
typedef BONChain * (^BONChainParagraphSpacing)(CGFloat paragraphSpacing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename the block typedef to match.
It now matches the renamed paragraphSpacingAfter property.
This test case attempts to cover the behavior when you have both the headIndent and indentSpacer set.
@ZevEisenberg I've tried to add initial tests and documentation as requested regarding the As a side note, going back to writing Obj C code after dealing with Swift for so long is harder than anticipated. |
@nuudles thanks. I'll take it from here if any additional changes need to be made. And I agree about writing Obj-C. I've only been doing Swift in a hobby project, but it's completely ruined me for remembering to put |
@nuudles I made a couple of tweaks (1aa95e3...f1dfff2 - nothing major) and merged. Thanks for your contribution! |
@ZevEisenberg That's great! Thanks for implementing the tweaks for me! |
This commit adds several more attributes from the NSParagraphStyle properties, including the firstLineHeadIndent, headIndent, tailIndent, maximumLineHeight, minimumLineHeight, paragraphSpacing, and paragraphSpacingBefore properties. Unit tests have also been added to test these new properties.