-
Notifications
You must be signed in to change notification settings - Fork 149
MediaAttachment: Encapsulating Draw Methods! #850
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
Conversation
|
@diegoreymendez @SergioEstevao ready for review gentlemen!. The Travis CI issue is related to a breaking UI test, non related to these changes. PS: It'll probably be easier to check the code by means of Kaleidoscope! Thanks in advance! |
diegoreymendez
left a comment
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.
Check out my comments, then merge.
|
|
||
| /// The margin apply to the images being displayed. This is to avoid that two images in a row get | ||
| /// glued together. | ||
| /// The margin apply to the images being displayed. This is to avoid that two images in a row get glued together. |
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.
Missing "to" after "margin".
| var padding = (textContainer?.lineFragmentPadding ?? 0) * 2 | ||
| if let storage = textContainer?.layoutManager?.textStorage, | ||
| let paragraphStyle = storage.attribute(.paragraphStyle, at: charIndex, effectiveRange: nil) as? NSParagraphStyle | ||
| { |
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.
Brace on previous line for consistency.
|
Comments addressed, thanks for the review Diego!! |
Description:
In this PR we're:
if returnclauses withguard. Why? Because we reduce the indentation level, it's easier to read, and looks beautiful.To test:
2.1. Verify that the progress bar works properly
2.2. Verify that during the upload OP, there's an overlay
3.1. Verify that an overlay gets displayed
3.2. Verify that there's an asset rendered at the center of the image
3.3. Verify that below the center's asset, there's a text label!
I was in the neighborhood, and needed to change few things. This PR will be followed up by another one, in charge of rendering Figure / Figcaption elements.
cc @diegoreymendez @SergioEstevao
Thanks in advance!