Skip to content
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

Clean up content styles for content size #722

Merged
merged 3 commits into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'develop' into issue/clean_up_styles_for_content_size
  • Loading branch information
SergioEstevao committed Mar 12, 2019
commit 9c11a37fc7cef0adfe7d93d3a5e5aa39809a3f1f
2,649 changes: 1,340 additions & 1,309 deletions bundle/android/App.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/App.js.map

Large diffs are not rendered by default.

2,667 changes: 1,349 additions & 1,318 deletions bundle/ios/App.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/ios/App.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg-mobile",
"version": "1.0.2",
"version": "1.1.0",
"private": true,
"config": {
"jsfiles": "./*.js src/*.js src/**/*.js src/**/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion react-native-aztec/ios/Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "wordpress-mobile/AztecEditor-iOS" ~> 1.4.3
github "wordpress-mobile/AztecEditor-iOS" ~> 1.4.4

2 changes: 1 addition & 1 deletion react-native-aztec/ios/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "wordpress-mobile/AztecEditor-iOS" "1.4.3"
github "wordpress-mobile/AztecEditor-iOS" "1.4.4"
6 changes: 4 additions & 2 deletions react-native-aztec/ios/RNTAztecView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -370,7 +371,7 @@
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "RNTAztecView/RCTAztecView-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -385,6 +386,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -394,7 +396,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "RNTAztecView/RCTAztecView-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ struct HeadingBlockFormatHandler: BlockFormatHandler {
}

func forceTypingFormat(on textView: RCTAztecView) {
var attributes = textView.typingAttributesSwifted
var attributes = textView.typingAttributes

attributes = paragraphFormatter.remove(from: attributes)
attributes = headerFormatter.apply(to: attributes, andStore: nil)

textView.typingAttributesSwifted = attributes
attributes = paragraphFormatter.remove(from: textView.typingAttributes)
attributes = headerFormatter.apply(to: textView.typingAttributes, andStore: nil)

textView.typingAttributes = attributes
}

private static func headerLevel(from levelString: String) -> Header.HeaderType? {
Expand Down
5 changes: 3 additions & 2 deletions react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class RCTAztecView: Aztec.TextView {
label.translatesAutoresizingMaskIntoConstraints = false
label.textAlignment = .natural
label.font = font

return label
}()

Expand Down Expand Up @@ -409,10 +410,10 @@ class RCTAztecView: Aztec.TextView {
/// This method should not be called directly. Call `refreshFont()` instead.
///
private func refreshTypingAttributesAndPlaceholderFont() {
let oldFont = font(from: typingAttributesSwifted)
let oldFont = font(from: typingAttributes)
let newFont = applyFontConstraints(to: oldFont)

typingAttributesSwifted[.font] = newFont
typingAttributes[.font] = newFont
placeholderLabel.font = newFont
}

Expand Down
1 change: 1 addition & 0 deletions react-native-aztec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "GPL-2.0",
"scripts": {
"install-aztec-ios": "cd ./ios && carthage bootstrap --platform iOS --cache-builds",
"update-aztec-ios": "cd ./ios && carthage update --platform iOS --cache-builds",
"clean": "yarn clean-watchman; yarn clean-node; yarn clean-react; yarn clean-metro; yarn clean-jest;",
"clean-jest": "rm -rf $TMPDIR/jest_*;",
"clean-metro": "rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/metro-bundler-cache-*;",
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.