-
Notifications
You must be signed in to change notification settings - Fork 149
Remove gridicons references from the main Aztec pod. #559
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "info" : { | ||
| "version" : 1, | ||
| "author" : "xcode" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "idiom" : "universal", | ||
| "filename" : "gridicons-image.pdf" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "version" : 1, | ||
| "author" : "xcode" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "idiom" : "universal", | ||
| "filename" : "gridicons-play.pdf" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "version" : 1, | ||
| "author" : "xcode" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import Foundation | ||
| import Gridicons | ||
| import UIKit | ||
|
|
||
| class HTMLNodeToNSAttributedString: SafeConverter { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import Foundation | ||
| import UIKit | ||
|
|
||
| class Assets { | ||
|
|
||
| public static var playIcon: UIImage { | ||
| let bundle = Bundle(for: self) | ||
| let playImage = UIImage(named: "play", in: bundle, compatibleWith: nil)! | ||
| return playImage | ||
| } | ||
|
|
||
| public static var imageIcon: UIImage { | ||
| let bundle = Bundle(for: self) | ||
| let playImage = UIImage(named: "image", in: bundle, compatibleWith: nil)! | ||
| return playImage | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| import XCTest | ||
| import Gridicons | ||
| @testable import Aztec | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import Foundation | ||
| import Aztec | ||
| import Gridicons | ||
| import UIKit | ||
|
|
||
| class TextViewStubAttachmentDelegate: TextViewAttachmentDelegate { | ||
|
|
||
|
|
@@ -17,11 +17,11 @@ class TextViewStubAttachmentDelegate: TextViewAttachmentDelegate { | |
| let placeholderImage: UIImage | ||
| switch attachment { | ||
| case _ as ImageAttachment: | ||
| placeholderImage = Gridicon.iconOfType(.image, withSize: imageSize) | ||
| placeholderImage = UIImage() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test file. |
||
| case _ as VideoAttachment: | ||
| placeholderImage = Gridicon.iconOfType(.video, withSize: imageSize) | ||
| placeholderImage = UIImage() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one. |
||
| default: | ||
| placeholderImage = Gridicon.iconOfType(.attachment, withSize: imageSize) | ||
| placeholderImage = UIImage() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test File. |
||
|
|
||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| import XCTest | ||
| @testable import Aztec | ||
| import Gridicons | ||
|
|
||
| class TextViewTests: XCTestCase { | ||
|
|
||
|
|
@@ -25,13 +24,13 @@ class TextViewTests: XCTestCase { | |
| // MARK: - TextView construction | ||
|
|
||
| func createEmptyTextView() -> Aztec.TextView { | ||
| let richTextView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: Gridicon.iconOfType(.attachment)) | ||
| let richTextView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: UIImage()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test file. |
||
| richTextView.textAttachmentDelegate = attachmentDelegate | ||
| return richTextView | ||
| } | ||
|
|
||
| func createTextView(withHTML html: String) -> Aztec.TextView { | ||
| let richTextView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: Gridicon.iconOfType(.attachment)) | ||
| let richTextView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: UIImage()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test file. |
||
| richTextView.textAttachmentDelegate = attachmentDelegate | ||
| richTextView.setHTML(html) | ||
|
|
||
|
|
@@ -40,7 +39,7 @@ class TextViewTests: XCTestCase { | |
|
|
||
| func createTextViewWithContent() -> Aztec.TextView { | ||
| let paragraph = "Lorem ipsum dolar sit amet.\n" | ||
| let richTextView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: Gridicon.iconOfType(.attachment)) | ||
| let richTextView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: UIImage()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test File |
||
| richTextView.textAttachmentDelegate = attachmentDelegate | ||
| let attributes = [NSParagraphStyleAttributeName : NSParagraphStyle()] | ||
| let templateString = NSMutableAttributedString(string: paragraph, attributes: attributes) | ||
|
|
@@ -58,7 +57,7 @@ class TextViewTests: XCTestCase { | |
|
|
||
| func testTextViewReferencesStorage() { | ||
|
|
||
| let textView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: Gridicon.iconOfType(.attachment)) | ||
| let textView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: UIImage()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test file. |
||
|
|
||
| textView.text = "Foo" | ||
| XCTAssert(textView.text == "Foo") | ||
|
|
@@ -79,7 +78,7 @@ class TextViewTests: XCTestCase { | |
| // MARK: - Test Index Wrangling | ||
|
|
||
| func testMaxIndex() { | ||
| let textView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: Gridicon.iconOfType(.attachment)) | ||
| let textView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: UIImage()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test file. |
||
|
|
||
| textView.text = "foo" | ||
|
|
||
|
|
@@ -92,7 +91,7 @@ class TextViewTests: XCTestCase { | |
| } | ||
|
|
||
| func testAdjustedIndex() { | ||
| let textView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: Gridicon.iconOfType(.attachment)) | ||
| let textView = Aztec.TextView(defaultFont: UIFont.systemFont(ofSize: 14), defaultMissingImage: UIImage()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're removing the default here, but not assigning a new one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test file. |
||
|
|
||
| textView.text = "foobarbaz" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| github "Automattic/Gridicons-iOS" "0.7" | ||
| github "Automattic/Gridicons-iOS" "0.8" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| github "Automattic/Gridicons-iOS" "0.7" | ||
| github "Automattic/Gridicons-iOS" "0.8" |
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.
We're removing the default here, but not assigning a new one.
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.
Test file