diff --git a/.circleci/config.yml b/.circleci/config.yml index 7578c109c3e0..6d39c595d101 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,24 +4,35 @@ orbs: ios: wordpress-mobile/ios@0.0.31 git: wordpress-mobile/git@0.0.31 +commands: + load-chruby: + steps: + - run: + name: Load chruby + command: | + # Force chruby to load to work around CircleCI Xcode 11 image issue + echo 'source /usr/local/opt/chruby/share/chruby/chruby.sh && chruby 2.5.5' >> $BASH_ENV + jobs: unit-tests: executor: name: ios/default - xcode-version: "10.2.0" + xcode-version: "11.0.0" steps: - git/shallow-checkout + - load-chruby - ios/test: - xcode-version: "10.2.0" + xcode-version: "11.0.0" workspace: WordPress.xcworkspace scheme: WordPress - device: iPhone XS + device: iPhone 11 build-ui-tests: executor: name: ios/default - xcode-version: "10.2.0" + xcode-version: "11.0.0" steps: - git/shallow-checkout + - load-chruby - ios/install-dependencies: bundle-install: true pod-install: true @@ -39,10 +50,10 @@ jobs: type: string executor: name: ios/default - xcode-version: "10.2.0" + xcode-version: "11.0.0" steps: - ios/boot-simulator: - xcode-version: "10.2.0" + xcode-version: "11.0.0" device: << parameters.device >> - attach_workspace: at: ./ @@ -53,7 +64,7 @@ jobs: - ios/wait-for-simulator - ios/xcodebuild: command: test-without-building - arguments: -xctestrun DerivedData/Build/Products/WordPressUITests_iphonesimulator12.2-x86_64.xctestrun -destination "platform=iOS Simulator,id=$SIMULATOR_UDID" + arguments: -xctestrun DerivedData/Build/Products/WordPressUITests_iphonesimulator13.0-x86_64.xctestrun -destination "platform=iOS Simulator,id=$SIMULATOR_UDID" - ios/save-xcodebuild-artifacts workflows: @@ -66,10 +77,10 @@ workflows: - build-ui-tests: name: Build UI Tests - run-ui-tests: - name: UI Tests (iPhone Xs) - device: iPhone Xs + name: UI Tests (iPhone 11) + device: iPhone 11 requires: [ "Build UI Tests" ] - run-ui-tests: - name: UI Tests (iPad 6th generation) - device: iPad \\(6th generation\\) + name: UI Tests (iPad Air 6th generation) + device: iPad Air \\(3rd generation\\) requires: [ "Build UI Tests" ] diff --git a/.ruby-version b/.ruby-version index 276cbf9e2858..0cadbc1e33b2 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.0 +2.5.5 diff --git a/Gemfile.lock b/Gemfile.lock index fb4bbfa89160..c2afc5bd9083 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -266,4 +266,4 @@ DEPENDENCIES xcpretty-travis-formatter! BUNDLED WITH - 1.17.3 + 2.0.2 diff --git a/Podfile b/Podfile index 64b9c95b187d..356ce019de7e 100644 --- a/Podfile +++ b/Podfile @@ -155,7 +155,7 @@ target 'WordPress' do pod 'MRProgress', '0.8.3' pod 'Starscream', '3.0.6' pod 'SVProgressHUD', '2.2.5' - pod 'ZendeskSDK', '3.0.1' + pod 'ZendeskSDK', :git => 'https://github.com/zendesk/zendesk_sdk_ios', :tag => '3.0.1-swift5.1-GM' pod 'AlamofireNetworkActivityIndicator', '~> 2.3' pod 'FSInteractiveMap', :git => 'https://github.com/wordpress-mobile/FSInteractiveMap.git', :tag => '0.1.1' @@ -176,7 +176,7 @@ target 'WordPress' do pod 'Gridicons', '~> 0.16' - pod 'WordPressAuthenticator', '~> 1.8.1-beta.2' + pod 'WordPressAuthenticator', '~> 1.9.0-beta.1' # pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS' # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => '' @@ -191,23 +191,7 @@ target 'WordPress' do end - post_install do - - ## Append SDKVersions.xcconfig contents to WordPressAuthenticator config files - Dir.glob("Pods/Target Support Files/WordPressAuthenticator/*.xcconfig") do |xc_config_filename| - - ## Get WPAuth config file - xcconfig_path = "#{Dir.pwd}/#{xc_config_filename}" - xc_config = File.read(xcconfig_path) - - ## Get WPiOS config file - custom_xcconfig_path = "#{Dir.pwd}/config/SDKVersions.xcconfig" - custom_xc_config = File.read(custom_xcconfig_path) - - ## Write back to WPAuth config file, appending both configs. - File.open(xcconfig_path, 'w') { |file| file << xc_config << custom_xc_config } - end - + post_install do ## Convert the 3rd-party license acknowledgements markdown into html for use in the app require 'commonmarker' @@ -225,6 +209,12 @@ target 'WordPress' do color: #1a1a1a; margin: 20px; } + @media (prefers-color-scheme: dark) { + body { + background: #1a1a1a; + color: white; + } + } pre { white-space: pre-wrap; } @@ -238,7 +228,7 @@ target 'WordPress' do " ## Remove the

, since we've promoted it to - styled_html = styled_html.sub("<h1>#{acknowledgements}</h1>", '') + styled_html = styled_html.sub("<h1>Acknowledgements</h1>", '') ## The glog library's license contains a URL that does not wrap in the web view, ## leading to a large right-hand whitespace gutter. Work around this by explicitly diff --git a/Podfile.lock b/Podfile.lock index fa8ad0f811df..e17e9c60d600 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -211,7 +211,7 @@ PODS: - WordPress-Aztec-iOS (1.9.0) - WordPress-Editor-iOS (1.9.0): - WordPress-Aztec-iOS (= 1.9.0) - - WordPressAuthenticator (1.8.1-beta.2): + - WordPressAuthenticator (1.9.0-beta.1): - 1PasswordExtension (= 1.8.5) - Alamofire (= 4.7.3) - CocoaLumberjack (~> 3.5) @@ -301,14 +301,14 @@ DEPENDENCIES: - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - WordPress-Editor-iOS (~> 1.9.0) - - WordPressAuthenticator (~> 1.8.1-beta.2) + - WordPressAuthenticator (~> 1.9.0-beta.1) - WordPressKit (~> 4.5.0) - WordPressMocks (~> 0.0.5) - WordPressShared (~> 1.8.7) - WordPressUI (~> 1.3.5) - WPMediaPicker (~> 1.4.2) - yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.12.0/react-native-gutenberg-bridge/third-party-podspecs/yoga.podspec.json`) - - ZendeskSDK (= 3.0.1) + - ZendeskSDK (from `https://github.com/zendesk/zendesk_sdk_ios`, tag `3.0.1-swift5.1-GM`) - ZIPFoundation (~> 0.9.8) SPEC REPOS: @@ -352,7 +352,6 @@ SPEC REPOS: - WordPressUI - WPMediaPicker - wpxmlrpc - - ZendeskSDK - ZIPFoundation EXTERNAL SOURCES: @@ -415,6 +414,9 @@ EXTERNAL SOURCES: :tag: v1.12.0 yoga: :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.12.0/react-native-gutenberg-bridge/third-party-podspecs/yoga.podspec.json + ZendeskSDK: + :git: https://github.com/zendesk/zendesk_sdk_ios + :tag: 3.0.1-swift5.1-GM CHECKOUT OPTIONS: FSInteractiveMap: @@ -426,6 +428,9 @@ CHECKOUT OPTIONS: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.12.0 + ZendeskSDK: + :git: https://github.com/zendesk/zendesk_sdk_ios + :tag: 3.0.1-swift5.1-GM SPEC CHECKSUMS: 1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d @@ -487,7 +492,7 @@ SPEC CHECKSUMS: UIDeviceIdentifier: 8f8a24b257a4d978c8d40ad1e7355b944ffbfa8c WordPress-Aztec-iOS: e58c7ab55b0bae53418a705876093fed314b6586 WordPress-Editor-iOS: 36114a1e155b0696939dba80989652c185e91e01 - WordPressAuthenticator: 989acfe503d267e15d154d0c9ac9d5aab5792886 + WordPressAuthenticator: a31342777b1da48c99682a0ba30d19556a0d29fb WordPressKit: 87ba4cce3f5269e26a09568a749ec1b8b2ba2267 WordPressMocks: d8088f718439556ff3856d5881aef581740cd26a WordPressShared: 09cf184caa614835f5811e8609227165201e6d3e @@ -495,9 +500,9 @@ SPEC CHECKSUMS: WPMediaPicker: 1897f312c7b41114ffd239fb782431ae602134a1 wpxmlrpc: 6ba55c773cfa27083ae4a2173e69b19f46da98e2 yoga: 4e71c9a33abf45ba55af55ae9cbc86f4234bb2a9 - ZendeskSDK: c2e49fd16a73e43e490f777cea67dd852b819ace + ZendeskSDK: 787414f9240ee6ef8cfe4ea0f00e8b4d01d2d264 ZIPFoundation: 89df685c971926b0323087952320bdfee9f0b6ef -PODFILE CHECKSUM: 5ff5652c0dd0bbb1edf03cac2ac86c8036f0338b +PODFILE CHECKSUM: 4dd43238d873a8076ac3874590245bf83523e8f4 COCOAPODS: 1.7.5 diff --git a/Scripts/fastlane/Deliverfile b/Scripts/fastlane/Deliverfile index 1f11e7d1d232..5435a6b49c6d 100644 --- a/Scripts/fastlane/Deliverfile +++ b/Scripts/fastlane/Deliverfile @@ -5,7 +5,7 @@ screenshots_path "./screenshots/" app_identifier "org.wordpress" # Make sure to update these keys for a new version -app_version "13.2.1" +app_version "13.2.2" privacy_url({ 'default' => 'https://automattic.com/privacy/', diff --git a/WordPress/Classes/Extensions/Colors and Styles/MurielPalette.swift b/WordPress/Classes/Extensions/Colors and Styles/MurielPalette.swift new file mode 100644 index 000000000000..2443b906fdb6 --- /dev/null +++ b/WordPress/Classes/Extensions/Colors and Styles/MurielPalette.swift @@ -0,0 +1,338 @@ +/* Generated by Color Studio v2.1.0 */ + +struct MurielPalette { + static func color(from key: String) -> UIColor? { + switch key { + case "White": + return UIColor(red: 255/255.0, green: 255/255.0, blue: 255/255.0, alpha: 1) + case "Black": + return UIColor(red: 0/255.0, green: 0/255.0, blue: 0/255.0, alpha: 1) + + case "Gray0": + return UIColor(red: 246/255.0, green: 247/255.0, blue: 247/255.0, alpha: 1) + case "Gray5": + return UIColor(red: 220/255.0, green: 220/255.0, blue: 222/255.0, alpha: 1) + case "Gray10": + return UIColor(red: 195/255.0, green: 196/255.0, blue: 199/255.0, alpha: 1) + case "Gray20": + return UIColor(red: 167/255.0, green: 170/255.0, blue: 173/255.0, alpha: 1) + case "Gray30": + return UIColor(red: 142/255.0, green: 145/255.0, blue: 150/255.0, alpha: 1) + case "Gray40": + return UIColor(red: 120/255.0, green: 124/255.0, blue: 130/255.0, alpha: 1) + case "Gray50": + return UIColor(red: 100/255.0, green: 105/255.0, blue: 112/255.0, alpha: 1) + case "Gray60": + return UIColor(red: 80/255.0, green: 87/255.0, blue: 94/255.0, alpha: 1) + case "Gray70": + return UIColor(red: 60/255.0, green: 67/255.0, blue: 74/255.0, alpha: 1) + case "Gray80": + return UIColor(red: 44/255.0, green: 51/255.0, blue: 56/255.0, alpha: 1) + case "Gray90": + return UIColor(red: 29/255.0, green: 35/255.0, blue: 39/255.0, alpha: 1) + case "Gray100": + return UIColor(red: 16/255.0, green: 21/255.0, blue: 23/255.0, alpha: 1) + case "Gray": + return UIColor(red: 100/255.0, green: 105/255.0, blue: 112/255.0, alpha: 1) + + case "Blue0": + return UIColor(red: 239/255.0, green: 243/255.0, blue: 247/255.0, alpha: 1) + case "Blue5": + return UIColor(red: 198/255.0, green: 222/255.0, blue: 246/255.0, alpha: 1) + case "Blue10": + return UIColor(red: 154/255.0, green: 198/255.0, blue: 240/255.0, alpha: 1) + case "Blue20": + return UIColor(red: 114/255.0, green: 174/255.0, blue: 230/255.0, alpha: 1) + case "Blue30": + return UIColor(red: 81/255.0, green: 152/255.0, blue: 217/255.0, alpha: 1) + case "Blue40": + return UIColor(red: 53/255.0, green: 130/255.0, blue: 196/255.0, alpha: 1) + case "Blue50": + return UIColor(red: 34/255.0, green: 113/255.0, blue: 177/255.0, alpha: 1) + case "Blue60": + return UIColor(red: 19/255.0, green: 94/255.0, blue: 150/255.0, alpha: 1) + case "Blue70": + return UIColor(red: 10/255.0, green: 75/255.0, blue: 120/255.0, alpha: 1) + case "Blue80": + return UIColor(red: 4/255.0, green: 57/255.0, blue: 89/255.0, alpha: 1) + case "Blue90": + return UIColor(red: 1/255.0, green: 38/255.0, blue: 58/255.0, alpha: 1) + case "Blue100": + return UIColor(red: 0/255.0, green: 19/255.0, blue: 28/255.0, alpha: 1) + case "Blue": + return UIColor(red: 34/255.0, green: 113/255.0, blue: 177/255.0, alpha: 1) + + case "Purple0": + return UIColor(red: 242/255.0, green: 236/255.0, blue: 239/255.0, alpha: 1) + case "Purple5": + return UIColor(red: 240/255.0, green: 209/255.0, blue: 228/255.0, alpha: 1) + case "Purple10": + return UIColor(red: 227/255.0, green: 174/255.0, blue: 212/255.0, alpha: 1) + case "Purple20": + return UIColor(red: 212/255.0, green: 143/255.0, blue: 200/255.0, alpha: 1) + case "Purple30": + return UIColor(red: 196/255.0, green: 117/255.0, blue: 189/255.0, alpha: 1) + case "Purple40": + return UIColor(red: 179/255.0, green: 94/255.0, blue: 177/255.0, alpha: 1) + case "Purple50": + return UIColor(red: 152/255.0, green: 74/255.0, blue: 156/255.0, alpha: 1) + case "Purple60": + return UIColor(red: 124/255.0, green: 57/255.0, blue: 130/255.0, alpha: 1) + case "Purple70": + return UIColor(red: 102/255.0, green: 44/255.0, blue: 110/255.0, alpha: 1) + case "Purple80": + return UIColor(red: 77/255.0, green: 32/255.0, blue: 84/255.0, alpha: 1) + case "Purple90": + return UIColor(red: 53/255.0, green: 22/255.0, blue: 59/255.0, alpha: 1) + case "Purple100": + return UIColor(red: 30/255.0, green: 12/255.0, blue: 33/255.0, alpha: 1) + case "Purple": + return UIColor(red: 152/255.0, green: 74/255.0, blue: 156/255.0, alpha: 1) + + case "Pink0": + return UIColor(red: 245/255.0, green: 236/255.0, blue: 239/255.0, alpha: 1) + case "Pink5": + return UIColor(red: 250/255.0, green: 204/255.0, blue: 220/255.0, alpha: 1) + case "Pink10": + return UIColor(red: 247/255.0, green: 166/255.0, blue: 194/255.0, alpha: 1) + case "Pink20": + return UIColor(red: 242/255.0, green: 131/255.0, blue: 170/255.0, alpha: 1) + case "Pink30": + return UIColor(red: 235/255.0, green: 101/255.0, blue: 148/255.0, alpha: 1) + case "Pink40": + return UIColor(red: 227/255.0, green: 76/255.0, blue: 132/255.0, alpha: 1) + case "Pink50": + return UIColor(red: 201/255.0, green: 53/255.0, blue: 110/255.0, alpha: 1) + case "Pink60": + return UIColor(red: 171/255.0, green: 35/255.0, blue: 90/255.0, alpha: 1) + case "Pink70": + return UIColor(red: 140/255.0, green: 23/255.0, blue: 73/255.0, alpha: 1) + case "Pink80": + return UIColor(red: 112/255.0, green: 15/255.0, blue: 59/255.0, alpha: 1) + case "Pink90": + return UIColor(red: 79/255.0, green: 9/255.0, blue: 42/255.0, alpha: 1) + case "Pink100": + return UIColor(red: 38/255.0, green: 4/255.0, blue: 21/255.0, alpha: 1) + case "Pink": + return UIColor(red: 201/255.0, green: 53/255.0, blue: 110/255.0, alpha: 1) + + case "Red0": + return UIColor(red: 247/255.0, green: 237/255.0, blue: 238/255.0, alpha: 1) + case "Red5": + return UIColor(red: 255/255.0, green: 204/255.0, blue: 208/255.0, alpha: 1) + case "Red10": + return UIColor(red: 255/255.0, green: 166/255.0, blue: 171/255.0, alpha: 1) + case "Red20": + return UIColor(red: 255/255.0, green: 128/255.0, blue: 133/255.0, alpha: 1) + case "Red30": + return UIColor(red: 248/255.0, green: 99/255.0, blue: 104/255.0, alpha: 1) + case "Red40": + return UIColor(red: 230/255.0, green: 80/255.0, blue: 84/255.0, alpha: 1) + case "Red50": + return UIColor(red: 214/255.0, green: 54/255.0, blue: 56/255.0, alpha: 1) + case "Red60": + return UIColor(red: 179/255.0, green: 45/255.0, blue: 46/255.0, alpha: 1) + case "Red70": + return UIColor(red: 138/255.0, green: 36/255.0, blue: 36/255.0, alpha: 1) + case "Red80": + return UIColor(red: 105/255.0, green: 28/255.0, blue: 28/255.0, alpha: 1) + case "Red90": + return UIColor(red: 69/255.0, green: 19/255.0, blue: 19/255.0, alpha: 1) + case "Red100": + return UIColor(red: 36/255.0, green: 10/255.0, blue: 10/255.0, alpha: 1) + case "Red": + return UIColor(red: 214/255.0, green: 54/255.0, blue: 56/255.0, alpha: 1) + + case "Orange0": + return UIColor(red: 247/255.0, green: 240/255.0, blue: 234/255.0, alpha: 1) + case "Orange5": + return UIColor(red: 252/255.0, green: 215/255.0, blue: 186/255.0, alpha: 1) + case "Orange10": + return UIColor(red: 255/255.0, green: 191/255.0, blue: 134/255.0, alpha: 1) + case "Orange20": + return UIColor(red: 250/255.0, green: 167/255.0, blue: 84/255.0, alpha: 1) + case "Orange30": + return UIColor(red: 230/255.0, green: 139/255.0, blue: 40/255.0, alpha: 1) + case "Orange40": + return UIColor(red: 214/255.0, green: 119/255.0, blue: 9/255.0, alpha: 1) + case "Orange50": + return UIColor(red: 178/255.0, green: 98/255.0, blue: 0/255.0, alpha: 1) + case "Orange60": + return UIColor(red: 138/255.0, green: 77/255.0, blue: 0/255.0, alpha: 1) + case "Orange70": + return UIColor(red: 112/255.0, green: 64/255.0, blue: 0/255.0, alpha: 1) + case "Orange80": + return UIColor(red: 84/255.0, green: 49/255.0, blue: 0/255.0, alpha: 1) + case "Orange90": + return UIColor(red: 54/255.0, green: 31/255.0, blue: 0/255.0, alpha: 1) + case "Orange100": + return UIColor(red: 31/255.0, green: 18/255.0, blue: 0/255.0, alpha: 1) + case "Orange": + return UIColor(red: 178/255.0, green: 98/255.0, blue: 0/255.0, alpha: 1) + + case "Yellow0": + return UIColor(red: 247/255.0, green: 242/255.0, blue: 230/255.0, alpha: 1) + case "Yellow5": + return UIColor(red: 247/255.0, green: 225/255.0, blue: 174/255.0, alpha: 1) + case "Yellow10": + return UIColor(red: 242/255.0, green: 207/255.0, blue: 117/255.0, alpha: 1) + case "Yellow20": + return UIColor(red: 240/255.0, green: 196/255.0, blue: 67/255.0, alpha: 1) + case "Yellow30": + return UIColor(red: 219/255.0, green: 174/255.0, blue: 23/255.0, alpha: 1) + case "Yellow40": + return UIColor(red: 182/255.0, green: 144/255.0, blue: 0/255.0, alpha: 1) + case "Yellow50": + return UIColor(red: 144/255.0, green: 115/255.0, blue: 0/255.0, alpha: 1) + case "Yellow60": + return UIColor(red: 112/255.0, green: 91/255.0, blue: 0/255.0, alpha: 1) + case "Yellow70": + return UIColor(red: 92/255.0, green: 75/255.0, blue: 0/255.0, alpha: 1) + case "Yellow80": + return UIColor(red: 69/255.0, green: 57/255.0, blue: 0/255.0, alpha: 1) + case "Yellow90": + return UIColor(red: 48/255.0, green: 40/255.0, blue: 0/255.0, alpha: 1) + case "Yellow100": + return UIColor(red: 28/255.0, green: 23/255.0, blue: 0/255.0, alpha: 1) + case "Yellow": + return UIColor(red: 144/255.0, green: 115/255.0, blue: 0/255.0, alpha: 1) + + case "Green0": + return UIColor(red: 235/255.0, green: 247/255.0, blue: 241/255.0, alpha: 1) + case "Green5": + return UIColor(red: 164/255.0, green: 245/255.0, blue: 200/255.0, alpha: 1) + case "Green10": + return UIColor(red: 89/255.0, green: 227/255.0, blue: 143/255.0, alpha: 1) + case "Green20": + return UIColor(red: 30/255.0, green: 209/255.0, blue: 90/255.0, alpha: 1) + case "Green30": + return UIColor(red: 0/255.0, green: 186/255.0, blue: 55/255.0, alpha: 1) + case "Green40": + return UIColor(red: 0/255.0, green: 163/255.0, blue: 42/255.0, alpha: 1) + case "Green50": + return UIColor(red: 0/255.0, green: 138/255.0, blue: 32/255.0, alpha: 1) + case "Green60": + return UIColor(red: 0/255.0, green: 112/255.0, blue: 23/255.0, alpha: 1) + case "Green70": + return UIColor(red: 0/255.0, green: 92/255.0, blue: 18/255.0, alpha: 1) + case "Green80": + return UIColor(red: 0/255.0, green: 69/255.0, blue: 12/255.0, alpha: 1) + case "Green90": + return UIColor(red: 0/255.0, green: 48/255.0, blue: 8/255.0, alpha: 1) + case "Green100": + return UIColor(red: 0/255.0, green: 28/255.0, blue: 5/255.0, alpha: 1) + case "Green": + return UIColor(red: 0/255.0, green: 138/255.0, blue: 32/255.0, alpha: 1) + + case "Celadon0": + return UIColor(red: 236/255.0, green: 247/255.0, blue: 244/255.0, alpha: 1) + case "Celadon5": + return UIColor(red: 166/255.0, green: 235/255.0, blue: 214/255.0, alpha: 1) + case "Celadon10": + return UIColor(red: 99/255.0, green: 214/255.0, blue: 182/255.0, alpha: 1) + case "Celadon20": + return UIColor(red: 46/255.0, green: 189/255.0, blue: 153/255.0, alpha: 1) + case "Celadon30": + return UIColor(red: 9/255.0, green: 168/255.0, blue: 132/255.0, alpha: 1) + case "Celadon40": + return UIColor(red: 0/255.0, green: 145/255.0, blue: 114/255.0, alpha: 1) + case "Celadon50": + return UIColor(red: 0/255.0, green: 126/255.0, blue: 101/255.0, alpha: 1) + case "Celadon60": + return UIColor(red: 0/255.0, green: 103/255.0, blue: 83/255.0, alpha: 1) + case "Celadon70": + return UIColor(red: 0/255.0, green: 80/255.0, blue: 66/255.0, alpha: 1) + case "Celadon80": + return UIColor(red: 0/255.0, green: 59/255.0, blue: 48/255.0, alpha: 1) + case "Celadon90": + return UIColor(red: 0/255.0, green: 39/255.0, blue: 33/255.0, alpha: 1) + case "Celadon100": + return UIColor(red: 0/255.0, green: 28/255.0, blue: 23/255.0, alpha: 1) + case "Celadon": + return UIColor(red: 0/255.0, green: 126/255.0, blue: 101/255.0, alpha: 1) + + case "WordPressBlue0": + return UIColor(red: 233/255.0, green: 243/255.0, blue: 247/255.0, alpha: 1) + case "WordPressBlue5": + return UIColor(red: 193/255.0, green: 225/255.0, blue: 238/255.0, alpha: 1) + case "WordPressBlue10": + return UIColor(red: 153/255.0, green: 205/255.0, blue: 225/255.0, alpha: 1) + case "WordPressBlue20": + return UIColor(red: 106/255.0, green: 179/255.0, blue: 208/255.0, alpha: 1) + case "WordPressBlue30": + return UIColor(red: 56/255.0, green: 149/255.0, blue: 186/255.0, alpha: 1) + case "WordPressBlue40": + return UIColor(red: 24/255.0, green: 122/255.0, blue: 162/255.0, alpha: 1) + case "WordPressBlue50": + return UIColor(red: 0/255.0, green: 96/255.0, blue: 136/255.0, alpha: 1) + case "WordPressBlue60": + return UIColor(red: 0/255.0, green: 78/255.0, blue: 110/255.0, alpha: 1) + case "WordPressBlue70": + return UIColor(red: 0/255.0, green: 60/255.0, blue: 86/255.0, alpha: 1) + case "WordPressBlue80": + return UIColor(red: 0/255.0, green: 44/255.0, blue: 64/255.0, alpha: 1) + case "WordPressBlue90": + return UIColor(red: 0/255.0, green: 29/255.0, blue: 45/255.0, alpha: 1) + case "WordPressBlue100": + return UIColor(red: 0/255.0, green: 16/255.0, blue: 28/255.0, alpha: 1) + case "WordPressBlue": + return UIColor(red: 0/255.0, green: 96/255.0, blue: 136/255.0, alpha: 1) + + case "WooCommercePurple0": + return UIColor(red: 245/255.0, green: 233/255.0, blue: 245/255.0, alpha: 1) + case "WooCommercePurple5": + return UIColor(red: 236/255.0, green: 204/255.0, blue: 240/255.0, alpha: 1) + case "WooCommercePurple10": + return UIColor(red: 221/255.0, green: 176/255.0, blue: 235/255.0, alpha: 1) + case "WooCommercePurple20": + return UIColor(red: 199/255.0, green: 146/255.0, blue: 224/255.0, alpha: 1) + case "WooCommercePurple30": + return UIColor(red: 175/255.0, green: 125/255.0, blue: 209/255.0, alpha: 1) + case "WooCommercePurple40": + return UIColor(red: 154/255.0, green: 105/255.0, blue: 199/255.0, alpha: 1) + case "WooCommercePurple50": + return UIColor(red: 127/255.0, green: 84/255.0, blue: 179/255.0, alpha: 1) + case "WooCommercePurple60": + return UIColor(red: 103/255.0, green: 67/255.0, blue: 153/255.0, alpha: 1) + case "WooCommercePurple70": + return UIColor(red: 83/255.0, green: 53/255.0, blue: 130/255.0, alpha: 1) + case "WooCommercePurple80": + return UIColor(red: 60/255.0, green: 40/255.0, blue: 97/255.0, alpha: 1) + case "WooCommercePurple90": + return UIColor(red: 39/255.0, green: 27/255.0, blue: 61/255.0, alpha: 1) + case "WooCommercePurple100": + return UIColor(red: 20/255.0, green: 14/255.0, blue: 31/255.0, alpha: 1) + case "WooCommercePurple": + return UIColor(red: 127/255.0, green: 84/255.0, blue: 179/255.0, alpha: 1) + + case "JetpackGreen0": + return UIColor(red: 242/255.0, green: 247/255.0, blue: 231/255.0, alpha: 1) + case "JetpackGreen5": + return UIColor(red: 208/255.0, green: 239/255.0, blue: 173/255.0, alpha: 1) + case "JetpackGreen10": + return UIColor(red: 157/255.0, green: 222/255.0, blue: 115/255.0, alpha: 1) + case "JetpackGreen20": + return UIColor(red: 100/255.0, green: 202/255.0, blue: 67/255.0, alpha: 1) + case "JetpackGreen30": + return UIColor(red: 47/255.0, green: 180/255.0, blue: 31/255.0, alpha: 1) + case "JetpackGreen40": + return UIColor(red: 6/255.0, green: 158/255.0, blue: 8/255.0, alpha: 1) + case "JetpackGreen50": + return UIColor(red: 0/255.0, green: 135/255.0, blue: 16/255.0, alpha: 1) + case "JetpackGreen60": + return UIColor(red: 0/255.0, green: 113/255.0, blue: 23/255.0, alpha: 1) + case "JetpackGreen70": + return UIColor(red: 0/255.0, green: 91/255.0, blue: 24/255.0, alpha: 1) + case "JetpackGreen80": + return UIColor(red: 0/255.0, green: 69/255.0, blue: 21/255.0, alpha: 1) + case "JetpackGreen90": + return UIColor(red: 0/255.0, green: 48/255.0, blue: 16/255.0, alpha: 1) + case "JetpackGreen100": + return UIColor(red: 0/255.0, green: 28/255.0, blue: 9/255.0, alpha: 1) + case "JetpackGreen": + return UIColor(red: 47/255.0, green: 180/255.0, blue: 31/255.0, alpha: 1) + default: + return nil + } + } +} diff --git a/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColors.swift b/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColors.swift index 1f0c3d99c596..32a2e3b61dc8 100644 --- a/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColors.swift +++ b/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColors.swift @@ -6,10 +6,22 @@ extension UIColor { /// - Returns: UIColor. Red in cases of error class func muriel(color murielColor: MurielColor) -> UIColor { let assetName = murielColor.assetName() - guard let color = UIColor(named: assetName) else { + let color: UIColor? + + // This is temporary work around as there's a bug in the + // GM seed of Xcode 11 which causes loading colors from asset + // catalogs to fail (54325712) + if #available(iOS 12.0, *) { + color = UIColor(named: assetName) + } else { + color = MurielPalette.color(from: assetName) + } + + guard let unwrappedColor = color else { return .red } - return color + + return unwrappedColor } /// Get a UIColor from the Muriel color palette, adjusted to a given shade /// - Parameter color: an instance of a MurielColor @@ -109,70 +121,77 @@ extension UIColor { extension UIColor { /// The most basic background: white in light mode, black in dark mode static var basicBackground: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .systemBackground - } - #endif + if #available(iOS 13, *) { + return .systemBackground + } return .white } + /// Tertiary background + static var tertiaryBackground: UIColor { + if #available(iOS 13, *) { + return .tertiarySystemBackground + } + + return .neutral(.shade10) + } + /// Default text color: high contrast static var text: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .label - } - #endif + if #available(iOS 13, *) { + return .label + } + return muriel(color: .text) } /// Secondary text color: less contrast static var textSubtle: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .secondaryLabel - } - #endif + if #available(iOS 13, *) { + return .secondaryLabel + } + return muriel(color: .gray) } /// Very low contrast text static var textTertiary: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .tertiaryLabel - } - #endif + if #available(iOS 13, *) { + return .tertiaryLabel + } + return UIColor.neutral(.shade20) } /// Very, very low contrast text static var textQuaternary: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .quaternaryLabel - } - #endif + if #available(iOS 13, *) { + return .quaternaryLabel + } + return UIColor.neutral(.shade10) } static var textInverted = UIColor(light: .white, dark: .gray(.shade100)) - static var textPlaceholder = neutral(.shade30) + static var textPlaceholder: UIColor { + if #available(iOS 13, *) { + return .tertiaryLabel + } + + return neutral(.shade30) + } static var placeholderElement: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return UIColor(light: .systemGray5, dark: .systemGray4) - } - #endif + if #available(iOS 13, *) { + return UIColor(light: .systemGray5, dark: .systemGray4) + } + return .gray(.shade10) } static var placeholderElementFaded: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return UIColor(light: .systemGray6, dark: .systemGray5) - } - #endif + if #available(iOS 13, *) { + return UIColor(light: .systemGray6, dark: .systemGray5) + } + return .gray(.shade5) } @@ -182,87 +201,78 @@ extension UIColor { // MARK: - Table Views static var divider: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .separator - } - #endif + if #available(iOS 13, *) { + return .separator + } + return muriel(color: .divider) } /// WP color for table foregrounds (cells, etc) static var listForeground: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .secondarySystemGroupedBackground - } - #endif + if #available(iOS 13, *) { + return .secondarySystemGroupedBackground + } + return .white } static var listForegroundUnread: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .tertiarySystemGroupedBackground - } - #endif + if #available(iOS 13, *) { + return .tertiarySystemGroupedBackground + } + return .primary(.shade0) } static var listBackground: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .systemGroupedBackground - } - #endif + if #available(iOS 13, *) { + return .systemGroupedBackground + } + return muriel(color: .gray, .shade0) } /// For icons that are present in a table view, or similar list static var listIcon: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .secondaryLabel - } - #endif + if #available(iOS 13, *) { + return .secondaryLabel + } + return .neutral(.shade20) } /// For small icons, such as the badges on notification gravatars static var listSmallIcon: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .systemGray - } - #endif + if #available(iOS 13, *) { + return .systemGray + } + return UIColor.neutral(.shade20) } static var filterBarBackground: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return UIColor(light: white, dark: .gray(.shade100)) - } - #endif + if #available(iOS 13, *) { + return UIColor(light: white, dark: .gray(.shade100)) + } + return white } static var filterBarSelected: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return UIColor(light: .primary, dark: .label) - } - #endif + if #available(iOS 13, *) { + return UIColor(light: .primary, dark: .label) + } + return .primary } /// For icons that are present in a toolbar or similar view static var toolbarInactive: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .secondaryLabel - } - #endif + if #available(iOS 13, *) { + return .secondaryLabel + } + return .neutral(.shade30) } @@ -276,29 +286,27 @@ extension UIColor { static var primaryButtonDownBorder = muriel(color: .accent, .shade90) static var secondaryButtonBackground: UIColor { - #if XCODE11 if #available(iOS 13, *) { return UIColor(light: .white, dark: .systemGray5) } - #endif + return .white } static var secondaryButtonBorder: UIColor { - #if XCODE11 - if #available(iOS 13, *) { - return .systemGray3 - } - #endif + if #available(iOS 13, *) { + return .systemGray3 + } + return .neutral(.shade20) } static var secondaryButtonDownBackground: UIColor { - #if XCODE11 + if #available(iOS 13, *) { return .systemGray3 } - #endif + return .neutral(.shade20) } @@ -310,24 +318,18 @@ extension UIColor { extension UIColor { // A way to create dynamic colors that's compatible with iOS 11 & 12 convenience init(light: UIColor, dark: UIColor) { - #if XCODE11 - if #available(iOS 13, *) { - self.init { traitCollection in - if traitCollection.userInterfaceStyle == .dark { - return dark - } else { - return light - } + if #available(iOS 13, *) { + self.init { traitCollection in + if traitCollection.userInterfaceStyle == .dark { + return dark + } else { + return light } - } else { - // in older versions of iOS, we assume light mode - self.init(color: light) } - #else - // ditto + } else { + // in older versions of iOS, we assume light mode self.init(color: light) - #endif - + } } convenience init(color: UIColor) { diff --git a/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift b/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift index 69168bdb449c..4f91aedf2315 100644 --- a/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift +++ b/WordPress/Classes/Extensions/Colors and Styles/UIColor+MurielColorsObjC.swift @@ -61,6 +61,11 @@ return .neutral(.shade70) } + @available(swift, obsoleted: 1.0) + static func murielNeutral80() -> UIColor { + return .neutral(.shade80) + } + @available(swift, obsoleted: 1.0) static func murielSuccess() -> UIColor { return .success @@ -76,6 +81,11 @@ return .textSubtle } + @available(swift, obsoleted: 1.0) + static func murielTextTertiary() -> UIColor { + return .textTertiary + } + @available(swift, obsoleted: 1.0) static func murielAccent() -> UIColor { return .accent @@ -96,6 +106,11 @@ return .basicBackground } + @available(swift, obsoleted: 1.0) + static func murielTertiaryBackground() -> UIColor { + return .tertiaryBackground + } + @available(swift, obsoleted: 1.0) static func murielTextPlaceholder() -> UIColor { return .textPlaceholder diff --git a/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift b/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift index 76bf004c0285..d8e862c704d1 100644 --- a/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift +++ b/WordPress/Classes/Extensions/Colors and Styles/WPStyleGuide+ApplicationStyles.swift @@ -27,7 +27,6 @@ extension WPStyleGuide { navigationAppearance.barTintColor = .appBar navigationAppearance.barStyle = .black -#if XCODE11 if #available(iOS 13.0, *) { // Required to fix detail navigation controller appearance due to https://stackoverflow.com/q/56615513 let appearance = UINavigationBarAppearance() @@ -37,7 +36,6 @@ extension WPStyleGuide { navigationAppearance.standardAppearance = appearance navigationAppearance.scrollEdgeAppearance = navigationAppearance.standardAppearance } -#endif let buttonBarAppearance = UIBarButtonItem.appearance() buttonBarAppearance.tintColor = .white @@ -110,7 +108,7 @@ extension WPStyleGuide { @objc class func configureTableViewActionCell(_ cell: UITableViewCell?) { configureTableViewCell(cell) - cell?.textLabel?.textColor = .primary + cell?.textLabel?.textColor = .text } @objc diff --git a/WordPress/Classes/Models/DiffAbstractValue+Attributes.swift b/WordPress/Classes/Models/DiffAbstractValue+Attributes.swift index 64b2e268298d..bd53953e8145 100644 --- a/WordPress/Classes/Models/DiffAbstractValue+Attributes.swift +++ b/WordPress/Classes/Models/DiffAbstractValue+Attributes.swift @@ -2,15 +2,17 @@ extension DiffAbstractValue { var attributes: [NSAttributedString.Key: Any]? { switch operation { case .add: - return [.backgroundColor: UIColor.muriel(color: MurielColor(name: .blue, shade: .shade5)), + return [.backgroundColor: UIColor(light: .muriel(color: MurielColor(name: .blue, shade: .shade5)), + dark: .primary(.shade80)), .underlineStyle: NSNumber(value: 2), - .underlineColor: UIColor.primary] + .underlineColor: UIColor(light: .primary, dark: .primary(.shade20))] case .del: - return [.backgroundColor: UIColor.muriel(color: MurielColor(name: .red, shade: .shade5)), + return [.backgroundColor: UIColor(light: .muriel(color: MurielColor(name: .red, shade: .shade5)), + dark: .muriel(color: MurielColor(name: .red, shade: .shade80))), .underlineStyle: NSNumber(value: 2), - .underlineColor: UIColor.error, + .underlineColor: UIColor(light: .error, dark: .muriel(color: MurielColor(name: .red, shade: .shade20))), .strikethroughStyle: NSNumber(value: 1), - .strikethroughColor: UIColor.black] + .strikethroughColor: UIColor.text] default: return nil } diff --git a/WordPress/Classes/System/WordPressAppDelegate.swift b/WordPress/Classes/System/WordPressAppDelegate.swift index f81545a8fa58..085f5e0cd797 100644 --- a/WordPress/Classes/System/WordPressAppDelegate.swift +++ b/WordPress/Classes/System/WordPressAppDelegate.swift @@ -8,9 +8,7 @@ import WordPressShared import AlamofireNetworkActivityIndicator import AutomatticTracks -#if !XCODE11 import ZendeskCoreSDK -#endif class WordPressAppDelegate: UIResponder, UIApplicationDelegate { @@ -222,13 +220,11 @@ class WordPressAppDelegate: UIResponder, UIApplicationDelegate { printDebugLaunchInfoWithLaunchOptions(launchOptions) toggleExtraDebuggingIfNeeded() -#if DEBUG + #if DEBUG KeychainTools.processKeychainDebugArguments() - #if !XCODE11 - CoreLogger.enabled = true - CoreLogger.logLevel = .debug + CoreLogger.enabled = true + CoreLogger.logLevel = .debug #endif -#endif ZendeskUtils.setup() diff --git a/WordPress/Classes/Utility/WebViewControllerFactory.swift b/WordPress/Classes/Utility/WebViewControllerFactory.swift index 917681cb554e..79715b1580ee 100644 --- a/WordPress/Classes/Utility/WebViewControllerFactory.swift +++ b/WordPress/Classes/Utility/WebViewControllerFactory.swift @@ -15,6 +15,12 @@ class WebViewControllerFactory: NSObject { return controller(configuration: configuration) } + @objc static func controller(url: URL, title: String) -> UIViewController { + let configuration = WebViewControllerConfiguration(url: url) + configuration.customTitle = title + return controller(configuration: configuration) + } + @objc static func controller(url: URL, blog: Blog) -> UIViewController { let configuration = WebViewControllerConfiguration(url: url) configuration.authenticate(blog: blog) diff --git a/WordPress/Classes/Utility/ZendeskUtils.swift b/WordPress/Classes/Utility/ZendeskUtils.swift index 1eabf4e0f2d0..ceb02d723d65 100644 --- a/WordPress/Classes/Utility/ZendeskUtils.swift +++ b/WordPress/Classes/Utility/ZendeskUtils.swift @@ -2,10 +2,8 @@ import Foundation import CoreTelephony import WordPressAuthenticator -#if !XCODE11 import ZendeskSDK import ZendeskCoreSDK -#endif extension NSNotification.Name { static let ZendeskPushNotificationReceivedNotification = NSNotification.Name(rawValue: "ZendeskPushNotificationReceivedNotification") @@ -17,8 +15,6 @@ extension NSNotification.Name { public static let ZendeskPushNotificationClearedNotification = NSNotification.Name.ZendeskPushNotificationClearedNotification } -#if !XCODE11 - /// This class provides the functionality to communicate with Zendesk for Help Center and support ticket interaction, /// as well as displaying views for the Help Center, new tickets, and ticket list. /// @@ -981,84 +977,3 @@ extension ZendeskUtils: UITextFieldDelegate { } } - - - -#else - -/// This class provides the functionality to communicate with Zendesk for Help Center and support ticket interaction, -/// as well as displaying views for the Help Center, new tickets, and ticket list. -/// -@objc class ZendeskUtils: NSObject { - - // MARK: - Public Properties - - static var sharedInstance: ZendeskUtils = ZendeskUtils() - static var zendeskEnabled = false - @objc static var unreadNotificationsCount = 0 - - @objc static var showSupportNotificationIndicator: Bool { - return false - } - - struct PushNotificationIdentifiers { - static let key = "type" - static let type = "zendesk" - } - - // MARK: - Private Properties - - private override init() {} - private var sourceTag: WordPressSupportSourceTag? - - private var userName: String? - private var userEmail: String? - private var deviceID: String? - private var haveUserIdentity = false - private var alertNameField: UITextField? - private var sitePlansCache = [Int: RemotePlanSimpleDescription]() - - private static var zdAppID: String? - private static var zdUrl: String? - private static var zdClientId: String? - private static var presentInController: UIViewController? - - private static var appVersion: String { - return Bundle.main.shortVersionString() ?? "" - } - - private static var appLanguage: String { - return Locale.preferredLanguages[0] - } - - // MARK: - Public Methods - - @objc static func setup() {} - - // MARK: - Show Zendesk Views - - func showHelpCenterIfPossible(from controller: UIViewController, with sourceTag: WordPressSupportSourceTag? = nil) {} - func showNewRequestIfPossible(from controller: UIViewController, with sourceTag: WordPressSupportSourceTag? = nil) {} - func showTicketListIfPossible(from controller: UIViewController, with sourceTag: WordPressSupportSourceTag? = nil) {} - func showSupportEmailPrompt(from controller: UIViewController, completion: @escaping (Bool) -> Void) {} - - func cacheUnlocalizedSitePlans() {} - - // MARK: - Device Registration - static func setNeedToRegisterDevice(_ identifier: String) {} - static func unregisterDevice() {} - - // MARK: - Push Notifications - - static func handlePushNotification(_ userInfo: NSDictionary) {} - static func pushNotificationReceived() {} - static func pushNotificationRead() {} - - // MARK: - Helpers - - static func userSupportEmail() -> String? { - return nil - } -} - -#endif diff --git a/WordPress/Classes/ViewRelated/Activity/ActivityListViewController.swift b/WordPress/Classes/ViewRelated/Activity/ActivityListViewController.swift index 43214b72bd54..0d559cce3106 100644 --- a/WordPress/Classes/ViewRelated/Activity/ActivityListViewController.swift +++ b/WordPress/Classes/ViewRelated/Activity/ActivityListViewController.swift @@ -127,6 +127,7 @@ extension ActivityListViewController { return nil } + cell.separator.isHidden = true cell.titleLabel.text = NSLocalizedString("Since you're on a free plan, you'll see limited events in your Activity Log.", comment: "Text displayed as a footer of a table view with Activities when user is on a free plan") return cell diff --git a/WordPress/Classes/ViewRelated/Activity/ActivityTableViewCell.swift b/WordPress/Classes/ViewRelated/Activity/ActivityTableViewCell.swift index 30c68f240f65..494349c0f172 100644 --- a/WordPress/Classes/ViewRelated/Activity/ActivityTableViewCell.swift +++ b/WordPress/Classes/ViewRelated/Activity/ActivityTableViewCell.swift @@ -26,8 +26,8 @@ open class ActivityTableViewCell: WPTableViewCell { summaryLabel.text = activity.summary contentLabel.text = activity.text - summaryLabel.textColor = .text - contentLabel.textColor = .textSubtle + summaryLabel.textColor = .textSubtle + contentLabel.textColor = .text iconBackgroundImageView.backgroundColor = Style.getColorByActivityStatus(activity) if let iconImage = Style.getIconForActivity(activity) { diff --git a/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.swift b/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.swift index 77008dc3f235..98aae961a073 100644 --- a/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.swift @@ -6,7 +6,7 @@ class BlogDetailsSectionHeaderView: UITableViewHeaderFooterView { @objc @IBOutlet private(set) var ellipsisButton: UIButton? { didSet { - ellipsisButton?.setImage(Gridicon.iconOfType(.ellipsis).imageWithTintColor(.neutral(.shade30)), for: .normal) + ellipsisButton?.setImage(Gridicon.iconOfType(.ellipsis).imageWithTintColor(.listIcon), for: .normal) } } @@ -18,6 +18,11 @@ class BlogDetailsSectionHeaderView: UITableViewHeaderFooterView { @objc var ellipsisButtonDidTouch: EllipsisCallback? + override func awakeFromNib() { + super.awakeFromNib() + titleLabel?.textColor = .textSubtle + } + @IBAction func ellipsisTapped() { ellipsisButtonDidTouch?(self) } diff --git a/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.xib b/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.xib index 6c9450ee1dcd..ff35b88b00b5 100644 --- a/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.xib +++ b/WordPress/Classes/ViewRelated/Blog/BlogDetailsSectionHeaderView.xib @@ -1,11 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> + <capability name="Named colors" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -27,9 +26,9 @@ </button> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DATE" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eUE-Sb-m3L"> <rect key="frame" x="16" y="0.0" width="32.5" height="36"/> - <color key="backgroundColor" red="0.91372549020000005" green="0.93725490199999995" blue="0.95294117649999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="13"/> - <color key="textColor" red="0.30980392159999998" green="0.4549019608" blue="0.5568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="textColor" name="Gray50"/> <nil key="highlightedColor"/> </label> </subviews> @@ -52,4 +51,9 @@ <point key="canvasLocation" x="233.59999999999999" y="186.20689655172416"/> </view> </objects> + <resources> + <namedColor name="Gray50"> + <color red="0.40392156862745099" green="0.41568627450980394" blue="0.45490196078431372" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> + </resources> </document> diff --git a/WordPress/Classes/ViewRelated/Blog/DomainCredit/DomainCreditRedemptionSuccessViewController.swift b/WordPress/Classes/ViewRelated/Blog/DomainCredit/DomainCreditRedemptionSuccessViewController.swift index ff9a5fc2f742..9b5713c4d864 100644 --- a/WordPress/Classes/ViewRelated/Blog/DomainCredit/DomainCreditRedemptionSuccessViewController.swift +++ b/WordPress/Classes/ViewRelated/Blog/DomainCredit/DomainCreditRedemptionSuccessViewController.swift @@ -47,7 +47,7 @@ class DomainCreditRedemptionSuccessViewController: UIViewController { return nil } let font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .semibold) - newAttributedString.setAttributes([.font: font, .foregroundColor: UIColor.neutral(.shade70)], + newAttributedString.setAttributes([.font: font, .foregroundColor: UIColor.text], range: range) return newAttributedString } diff --git a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistCell.swift b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistCell.swift index 9779350bd90f..46174729f216 100644 --- a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistCell.swift +++ b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistCell.swift @@ -12,8 +12,16 @@ class QuickStartChecklistCell: UITableViewCell { } } @IBOutlet private var iconView: UIImageView? - @IBOutlet private var stroke: UIView? - @IBOutlet private var topSeparator: UIView? + @IBOutlet private var stroke: UIView? { + didSet { + stroke?.backgroundColor = .divider + } + } + @IBOutlet private var topSeparator: UIView? { + didSet { + topSeparator?.backgroundColor = .divider + } + } private var bottomStrokeLeading: NSLayoutConstraint? private var contentViewLeadingAnchor: NSLayoutXAxisAnchor { @@ -34,9 +42,11 @@ class QuickStartChecklistCell: UITableViewCell { attributes: [.strikethroughStyle: 1, .foregroundColor: UIColor.neutral(.shade30)]) descriptionLabel.textColor = .neutral(.shade30) + iconView?.tintColor = .neutral(.shade30) } else { - titleLabel.textColor = .neutral(.shade70) - descriptionLabel.textColor = .neutral(.shade70) + titleLabel.textColor = .text + descriptionLabel.textColor = .textSubtle + iconView?.tintColor = .listIcon } } } @@ -44,7 +54,7 @@ class QuickStartChecklistCell: UITableViewCell { didSet { titleLabel.text = tour?.title descriptionLabel.text = tour?.description - iconView?.image = tour?.icon.imageWithTintColor(.neutral(.shade20)) + iconView?.image = tour?.icon.withRenderingMode(.alwaysTemplate) if let hint = tour?.accessibilityHintText, !hint.isEmpty { accessibilityHint = hint @@ -67,6 +77,7 @@ class QuickStartChecklistCell: UITableViewCell { override func awakeFromNib() { super.awakeFromNib() + contentView.backgroundColor = .listForeground setupConstraints() } diff --git a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.swift b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.swift index b2607c8056ba..80d1a7d89a48 100644 --- a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.swift +++ b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.swift @@ -34,10 +34,19 @@ class QuickStartChecklistHeader: UIView { @IBOutlet private var chevronView: UIImageView! { didSet { chevronView.image = Gridicon.iconOfType(.chevronDown) - chevronView.tintColor = WPStyleGuide.cellGridiconAccessoryColor() + chevronView.tintColor = .textTertiary + } + } + @IBOutlet var topStroke: UIView! { + didSet { + topStroke.backgroundColor = .divider + } + } + @IBOutlet private var bottomStroke: UIView! { + didSet { + bottomStroke.backgroundColor = .divider } } - @IBOutlet private var bottomStroke: UIView! @IBOutlet private var contentView: UIView! { didSet { contentView.leadingAnchor.constraint(equalTo: contentViewLeadingAnchor).isActive = true @@ -59,6 +68,7 @@ class QuickStartChecklistHeader: UIView { override func awakeFromNib() { super.awakeFromNib() + contentView.backgroundColor = .listForeground prepareForVoiceOver() } } diff --git a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.xib b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.xib index 58032062f97f..011b1c08eb5d 100644 --- a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.xib +++ b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistHeader.xib @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -97,6 +95,7 @@ <outlet property="chevronView" destination="2ag-iN-nJf" id="fe5-yH-BhN"/> <outlet property="contentView" destination="rkz-KZ-Ayy" id="NET-gR-3xr"/> <outlet property="titleLabel" destination="xiK-ca-ccq" id="HrR-PQ-Mtc"/> + <outlet property="topStroke" destination="QaU-FW-PcA" id="X0k-sy-5Eo"/> </connections> <point key="canvasLocation" x="53.600000000000001" y="48.575712143928037"/> </view> diff --git a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistViewController.swift b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistViewController.swift index b619b7f1579d..1716cd5816d2 100644 --- a/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistViewController.swift +++ b/WordPress/Classes/ViewRelated/Blog/QuickStartChecklistViewController.swift @@ -51,7 +51,7 @@ class QuickStartChecklistViewController: UITableViewController { private lazy var successScreen: NoResultsViewController = { let successScreen = NoResultsViewController.controller() successScreen.view.frame = tableView.bounds - successScreen.view.backgroundColor = .white + successScreen.view.backgroundColor = .listBackground successScreen.configure(title: tasksCompleteScreen.title, subtitle: tasksCompleteScreen.subtitle, image: tasksCompleteScreen.imageName) @@ -151,6 +151,7 @@ private extension QuickStartChecklistViewController { tableView.backgroundView = successScreen.view self.tableView = tableView + WPStyleGuide.configureTableViewColors(view: self.tableView) } func startObservingForQuickStart() { diff --git a/WordPress/Classes/ViewRelated/Blog/QuickStartCongratulationsCell.xib b/WordPress/Classes/ViewRelated/Blog/QuickStartCongratulationsCell.xib index 16252fec96a5..234ef11a91dc 100644 --- a/WordPress/Classes/ViewRelated/Blog/QuickStartCongratulationsCell.xib +++ b/WordPress/Classes/ViewRelated/Blog/QuickStartCongratulationsCell.xib @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -15,11 +13,11 @@ <rect key="frame" x="0.0" y="0.0" width="428" height="88"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ZK2-Xw-LEM" id="HIE-6E-scc"> - <rect key="frame" x="0.0" y="0.0" width="428" height="87.5"/> + <rect key="frame" x="0.0" y="0.0" width="428" height="88"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tmx-Sd-E9i"> - <rect key="frame" x="16" y="16" width="396" height="35.5"/> + <rect key="frame" x="16" y="16" width="396" height="36"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="719-qw-JbX"/> </constraints> @@ -28,7 +26,7 @@ <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lKH-i8-Ftz"> - <rect key="frame" x="16" y="53.5" width="396" height="18"/> + <rect key="frame" x="16" y="54" width="396" height="18"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="Mq1-m6-Bag"/> </constraints> diff --git a/WordPress/Classes/ViewRelated/Blog/QuickStartListTitleCell.xib b/WordPress/Classes/ViewRelated/Blog/QuickStartListTitleCell.xib index 3262b7c51e79..afa3572909fb 100644 --- a/WordPress/Classes/ViewRelated/Blog/QuickStartListTitleCell.xib +++ b/WordPress/Classes/ViewRelated/Blog/QuickStartListTitleCell.xib @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -15,18 +13,18 @@ <rect key="frame" x="0.0" y="0.0" width="387" height="59"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="yxe-JV-A3j" id="bAc-r5-9Gc"> - <rect key="frame" x="0.0" y="0.0" width="387" height="58.5"/> + <rect key="frame" x="0.0" y="0.0" width="387" height="59"/> <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0G7-da-TFG" customClass="CircularImageView" customModule="WordPress" customModuleProvider="target"> - <rect key="frame" x="16" y="11.5" width="38" height="38"/> + <rect key="frame" x="16" y="11" width="38" height="38"/> <constraints> <constraint firstAttribute="width" constant="38" id="fAA-Kg-A8Z"/> <constraint firstAttribute="height" constant="38" id="vXF-aG-DCz"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="74y-RA-tA4"> - <rect key="frame" x="70" y="9.5" width="297" height="22"/> + <rect key="frame" x="70" y="9" width="297" height="22"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="22" id="Sfz-hK-WdF"/> </constraints> @@ -35,7 +33,7 @@ <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4zs-C7-CtU"> - <rect key="frame" x="70" y="32.5" width="297" height="20"/> + <rect key="frame" x="70" y="32" width="297" height="20"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="aeZ-6J-P0C"/> </constraints> @@ -44,7 +42,7 @@ <nil key="highlightedColor"/> </label> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="2gT-Ue-Edc"> - <rect key="frame" x="23" y="18.5" width="24" height="24"/> + <rect key="frame" x="23" y="18" width="24" height="24"/> <constraints> <constraint firstAttribute="width" constant="24" id="D3x-JW-Pwt"/> <constraint firstAttribute="height" constant="24" id="E8H-Nu-AhZ"/> diff --git a/WordPress/Classes/ViewRelated/Blog/SettingTableViewCell.m b/WordPress/Classes/ViewRelated/Blog/SettingTableViewCell.m index 941ceed5fbd1..b2913b380470 100644 --- a/WordPress/Classes/ViewRelated/Blog/SettingTableViewCell.m +++ b/WordPress/Classes/ViewRelated/Blog/SettingTableViewCell.m @@ -14,7 +14,7 @@ - (instancetype)initWithLabel:(NSString *)label editable:(BOOL)editable reuseIde if (self) { self.textLabel.text = label; [WPStyleGuide configureTableViewCell:self]; - self.detailTextLabel.textColor = [UIColor murielNeutral30]; + self.detailTextLabel.textColor = [UIColor murielTextSubtle]; if (editable) { self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; self.selectionStyle = UITableViewCellSelectionStyleDefault; diff --git a/WordPress/Classes/ViewRelated/Blog/SharingButtonsViewController.swift b/WordPress/Classes/ViewRelated/Blog/SharingButtonsViewController.swift index 9d576626f8d9..181ee8056de8 100644 --- a/WordPress/Classes/ViewRelated/Blog/SharingButtonsViewController.swift +++ b/WordPress/Classes/ViewRelated/Blog/SharingButtonsViewController.swift @@ -373,7 +373,7 @@ import WordPressShared cell.editingAccessoryView = cell.accessoryView cell.editingAccessoryType = cell.accessoryType cell.imageView?.image = self.iconForSharingButton(button) - cell.imageView?.tintColor = .neutral(.shade10) + cell.imageView?.tintColor = .listIcon cell.textLabel?.text = button.name } diff --git a/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSite.storyboard b/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSite.storyboard index 319f90bc1b0e..f92606a57bfb 100644 --- a/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSite.storyboard +++ b/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSite.storyboard @@ -1,13 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> - <device id="retina5_5" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <device id="retina5_5" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/> - <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> - <capability name="Constraints to layout margins" minToolsVersion="6.0"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> + <capability name="Named colors" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -24,7 +21,7 @@ <tableViewSection id="n0H-ts-xAM"> <cells> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" selectionStyle="default" indentationWidth="10" id="7Uo-T8-SBI"> - <rect key="frame" x="0.0" y="35" width="414" height="44"/> + <rect key="frame" x="0.0" y="1" width="414" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" tableViewCell="7Uo-T8-SBI" id="4NR-59-7vR"> <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> @@ -67,7 +64,7 @@ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" selectionStyle="default" indentationWidth="10" id="lvO-X5-lOQ"> - <rect key="frame" x="0.0" y="79" width="414" height="44"/> + <rect key="frame" x="0.0" y="45" width="414" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" tableViewCell="lvO-X5-lOQ" id="ukM-xS-jFg"> <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> @@ -86,22 +83,22 @@ <rect key="frame" x="0.0" y="15.333333333333332" width="374" height="8.6666666666666679"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="J5f-IF-gpF"> - <rect key="frame" x="0.0" y="0.0" width="0.0" height="8.6666666666666661"/> + <rect key="frame" x="0.0" y="0.0" width="76.666666666666671" height="8.6666666666666661"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="• Posts" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KxO-Is-bhY"> - <rect key="frame" x="0.0" y="0.0" width="0.0" height="3"/> + <rect key="frame" x="0.0" y="0.0" width="76.666666666666671" height="3"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="• Pages" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="peC-dR-nRG"> - <rect key="frame" x="0.0" y="3" width="0.0" height="2.6666666666666661"/> + <rect key="frame" x="0.0" y="3" width="76.666666666666671" height="2.6666666666666661"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="• Media" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N4f-Sa-CVH"> - <rect key="frame" x="0.0" y="5.6666666666666679" width="0.0" height="3"/> + <rect key="frame" x="0.0" y="5.6666666666666679" width="76.666666666666671" height="3"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <nil key="textColor"/> <nil key="highlightedColor"/> @@ -109,22 +106,22 @@ </subviews> </stackView> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="Cmc-uu-9J9"> - <rect key="frame" x="-20" y="0.0" width="0.0" height="8.6666666666666661"/> + <rect key="frame" x="126.66666666666663" y="0.0" width="247.33333333333337" height="8.6666666666666661"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="• Users & Authors" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FcP-ti-s9r"> - <rect key="frame" x="0.0" y="0.0" width="0.0" height="3"/> + <rect key="frame" x="0.0" y="0.0" width="247.33333333333334" height="3"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="• Domains" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="760-77-2gC"> - <rect key="frame" x="0.0" y="3" width="0.0" height="2.6666666666666661"/> + <rect key="frame" x="0.0" y="3" width="247.33333333333334" height="2.6666666666666661"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="• Purchased Upgrades" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q3t-nv-OBS"> - <rect key="frame" x="0.0" y="5.6666666666666679" width="0.0" height="3"/> + <rect key="frame" x="0.0" y="5.6666666666666679" width="247.33333333333334" height="3"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <nil key="textColor"/> <nil key="highlightedColor"/> @@ -146,7 +143,7 @@ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="top" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" selectionStyle="default" indentationWidth="10" id="HNw-3J-5iO"> - <rect key="frame" x="0.0" y="123" width="414" height="44"/> + <rect key="frame" x="0.0" y="89" width="414" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" tableViewCell="HNw-3J-5iO" id="8rN-Pf-TUc"> <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> @@ -185,19 +182,20 @@ If you're unsure about what will be deleted or need any help, not to worry, our <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" selectionStyle="default" indentationWidth="10" id="ppe-IO-Pij"> - <rect key="frame" x="0.0" y="167" width="414" height="44"/> + <rect key="frame" x="0.0" y="133" width="414" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" tableViewCell="ppe-IO-Pij" id="JAd-hU-JNQ"> <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <button opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Efz-S9-pOZ"> + <button opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Efz-S9-pOZ"> <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="44" id="o8x-CR-hFe"/> </constraints> - <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> - <state key="normal" title="Delete Site"/> + <state key="normal" title="Delete Site"> + <color key="titleColor" name="Red50"/> + </state> <connections> <action selector="deleteSite:" destination="aKn-1R-Ofg" eventType="touchUpInside" id="4eh-Wd-NzS"/> </connections> @@ -221,6 +219,7 @@ If you're unsure about what will be deleted or need any help, not to worry, our </connections> </tableView> <connections> + <outlet property="deleteButtonContainerView" destination="JAd-hU-JNQ" id="gRj-Mz-DSm"/> <outlet property="deleteSiteButton" destination="Efz-S9-pOZ" id="u1F-wG-5U7"/> <outlet property="sectionThreeBody" destination="r5O-oO-teR" id="QI6-ly-kD4"/> <outlet property="sectionTwoColumnOneItem" destination="KxO-Is-bhY" id="sFW-4A-a2R"/> @@ -249,5 +248,8 @@ If you're unsure about what will be deleted or need any help, not to worry, our </scenes> <resources> <image name="icon-alert" width="62" height="52"/> + <namedColor name="Red50"> + <color red="0.83921568627450982" green="0.21176470588235294" blue="0.2196078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> </resources> </document> diff --git a/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSiteViewController.swift b/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSiteViewController.swift index 95f7dbdd60a8..df5a6184050c 100644 --- a/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSiteViewController.swift +++ b/WordPress/Classes/ViewRelated/Blog/SiteManagement/DeleteSiteViewController.swift @@ -37,6 +37,7 @@ open class DeleteSiteViewController: UITableViewController { @IBOutlet fileprivate weak var sectionThreeBody: UILabel! @IBOutlet fileprivate weak var supportButton: UIButton! @IBOutlet fileprivate weak var deleteSiteButton: UIButton! + @IBOutlet private var deleteButtonContainerView: UIView! // MARK: - View Lifecycle @@ -151,10 +152,15 @@ open class DeleteSiteViewController: UITableViewController { /// One time setup of fourth section (delete button) /// fileprivate func setupDeleteButton() { + deleteButtonContainerView.backgroundColor = .listForeground + let trashIcon = Gridicon.iconOfType(.trash) deleteSiteButton.setTitle(NSLocalizedString("Delete Site", comment: "Button label for deleting the current site"), for: .normal) deleteSiteButton.tintColor = .error - deleteSiteButton.setImage(trashIcon, for: .normal) + deleteSiteButton.setImage(trashIcon.imageWithTintColor(.error), for: .normal) + deleteSiteButton.setImage(trashIcon.imageWithTintColor(.error(.shade70)), for: .highlighted) + deleteSiteButton.setTitleColor(.error, for: .normal) + deleteSiteButton.setTitleColor(.error(.shade70), for: .highlighted) deleteSiteButton.titleLabel?.font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .semibold) } diff --git a/WordPress/Classes/ViewRelated/Cells/ExpandableCell.swift b/WordPress/Classes/ViewRelated/Cells/ExpandableCell.swift index fb16c6514847..ebe9aaf8a2a8 100644 --- a/WordPress/Classes/ViewRelated/Cells/ExpandableCell.swift +++ b/WordPress/Classes/ViewRelated/Cells/ExpandableCell.swift @@ -57,7 +57,7 @@ class ExpandableCell: WPReusableTableViewCell { chevronImageView?.image = Gridicon.iconOfType(.chevronDown) chevronImageView?.tintColor = WPStyleGuide.cellGridiconAccessoryColor() - titleTextLabel?.textColor = .neutral(.shade70) + titleTextLabel?.textColor = .text let linkAttributes: [NSAttributedString.Key: Any] = [.foregroundColor: UIColor.primary, .underlineStyle: 0, @@ -67,6 +67,7 @@ class ExpandableCell: WPReusableTableViewCell { expandableTextView?.delegate = self expandableTextView?.textContainerInset = .zero expandableTextView?.textContainer.lineFragmentPadding = 0 + expandableTextView?.backgroundColor = .clear } } diff --git a/WordPress/Classes/ViewRelated/Cells/InlineEditableNameValueCell.swift b/WordPress/Classes/ViewRelated/Cells/InlineEditableNameValueCell.swift index d47a157e0175..3c5d666af72a 100644 --- a/WordPress/Classes/ViewRelated/Cells/InlineEditableNameValueCell.swift +++ b/WordPress/Classes/ViewRelated/Cells/InlineEditableNameValueCell.swift @@ -12,8 +12,8 @@ class InlineEditableNameValueCell: WPTableViewCell, NibReusable { enum Const { enum Color { - static let nameText = UIColor.neutral(.shade70) - static let valueText = UIColor.neutral(.shade40) + static let nameText = UIColor.text + static let valueText = UIColor.textSubtle } } @@ -39,6 +39,7 @@ class InlineEditableNameValueCell: WPTableViewCell, NibReusable { nameLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(setValueTextFieldAsFirstResponder(_:)))) valueTextField.textColor = Const.Color.valueText + valueTextField.tintColor = .textPlaceholder valueTextField.font = WPStyleGuide.tableviewTextFont() valueTextField.borderStyle = .none valueTextField.addTarget(self, diff --git a/WordPress/Classes/ViewRelated/Cells/TextWithAccessoryButtonCell.swift b/WordPress/Classes/ViewRelated/Cells/TextWithAccessoryButtonCell.swift index a7b17a605252..8c009eaff363 100644 --- a/WordPress/Classes/ViewRelated/Cells/TextWithAccessoryButtonCell.swift +++ b/WordPress/Classes/ViewRelated/Cells/TextWithAccessoryButtonCell.swift @@ -13,7 +13,11 @@ class TextWithAccessoryButtonCell: WPReusableTableViewCell { } } - @IBOutlet private var mainLabel: UILabel? + @IBOutlet private var mainLabel: UILabel? { + didSet { + mainLabel?.textColor = .textSubtle + } + } @IBOutlet private var secondaryLabel: UILabel? @IBOutlet public private(set) var button: NUXButton? diff --git a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController+HeaderFooter.swift b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController+HeaderFooter.swift index 6db741f748ba..e46d1907bd7a 100644 --- a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController+HeaderFooter.swift +++ b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController+HeaderFooter.swift @@ -57,10 +57,11 @@ extension RegisterDomainDetailsViewController { return nil } view.titleLabel?.attributedText = termsAndConditionsFooterTitle + view.titleLabel?.textColor = .textSubtle view.titleLabel?.numberOfLines = 0 view.titleLabel?.lineBreakMode = .byWordWrapping view.topConstraint.constant = Constant.privacyProtectionSectionTitleTopDistance - view.contentView.backgroundColor = .neutral(.shade5) + view.contentView.backgroundColor = .listBackground let tap = UITapGestureRecognizer(target: self, action: #selector(handleTermsAndConditionsTap(_:))) view.addGestureRecognizer(tap) return view @@ -77,8 +78,8 @@ extension RegisterDomainDetailsViewController { } var termsAndConditionsFooterTitle: NSAttributedString { - let bodyColor = UIColor.neutral(.shade50) - let linkColor = UIColor.neutral(.shade70) + let bodyColor = UIColor.textSubtle + let linkColor = UIColor.textSubtle let font = UIFont.preferredFont(forTextStyle: .footnote) let attributes: StyledHTMLAttributes = [ diff --git a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController.swift b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController.swift index 51a3db55a88a..2305ad5d6a75 100644 --- a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController.swift +++ b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/ViewController/RegisterDomainDetailsViewController.swift @@ -280,7 +280,7 @@ extension RegisterDomainDetailsViewController { let attributedItem = NSAttributedString.init( string: item, attributes: [.font: WPStyleGuide.tableviewTextFont(), - .foregroundColor: UIColor.neutral(.shade70)] + .foregroundColor: UIColor.text] ) let option = OptionsTableViewOption( image: nil, @@ -289,6 +289,7 @@ extension RegisterDomainDetailsViewController { options.append(option) } let viewController = OptionsTableViewController(options: options) + viewController.cellBackgroundColor = .listForeground if let selectedIndex = selectedItemIndex[indexPath] { viewController.selectRow(at: selectedIndex) } diff --git a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/Views/RegisterDomainDetailsFooterView.swift b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/Views/RegisterDomainDetailsFooterView.swift index 3e7f7ab29def..e42dabf0faf9 100644 --- a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/Views/RegisterDomainDetailsFooterView.swift +++ b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainDetails/Views/RegisterDomainDetailsFooterView.swift @@ -9,5 +9,6 @@ class RegisterDomainDetailsFooterView: UIView, NibLoadable { super.awakeFromNib() clipsToBounds = false submitButton.isPrimary = true + backgroundColor = .basicBackground } } diff --git a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainSuggestions/RegisterDomainSuggestionsViewController.swift b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainSuggestions/RegisterDomainSuggestionsViewController.swift index ea3bcfec9342..a0c6aa804c1c 100644 --- a/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainSuggestions/RegisterDomainSuggestionsViewController.swift +++ b/WordPress/Classes/ViewRelated/Domains/Register/RegisterDomainSuggestions/RegisterDomainSuggestionsViewController.swift @@ -31,6 +31,7 @@ class RegisterDomainSuggestionsViewController: NUXViewController, DomainSuggesti private lazy var buttonViewController: NUXButtonViewController = { let buttonViewController = NUXButtonViewController.instance() + buttonViewController.view.backgroundColor = .basicBackground buttonViewController.delegate = self buttonViewController.setButtonTitles( primary: NSLocalizedString("Choose domain", diff --git a/WordPress/Classes/ViewRelated/Domains/Views/RegisterDomainSectionHeaderView.swift b/WordPress/Classes/ViewRelated/Domains/Views/RegisterDomainSectionHeaderView.swift index 33b16da5a189..00d4e8ab3124 100644 --- a/WordPress/Classes/ViewRelated/Domains/Views/RegisterDomainSectionHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Domains/Views/RegisterDomainSectionHeaderView.swift @@ -10,13 +10,13 @@ class RegisterDomainSectionHeaderView: UITableViewHeaderFooterView { super.awakeFromNib() titleLabel.font = WPStyleGuide.fontForTextStyle(.subheadline, fontWeight: .semibold) - titleLabel.textColor = .neutral(.shade70) + titleLabel.textColor = .textSubtle titleLabel.numberOfLines = 0 descriptionLabel.font = WPStyleGuide.fontForTextStyle(.footnote) - descriptionLabel.textColor = .neutral(.shade70) + descriptionLabel.textColor = .textSubtle descriptionLabel.numberOfLines = 0 - contentView.backgroundColor = .neutral(.shade5) + contentView.backgroundColor = .listBackground } func setTitle(_ title: String?) { diff --git a/WordPress/Classes/ViewRelated/Me/AboutViewController.swift b/WordPress/Classes/ViewRelated/Me/AboutViewController.swift index bf3ea1031254..c2762fba4531 100644 --- a/WordPress/Classes/ViewRelated/Me/AboutViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/AboutViewController.swift @@ -141,12 +141,20 @@ open class AboutViewController: UITableViewController { displayWebView(URL(string: urlString)) } - private func displayWebView(_ url: URL?) { + private func displayWebView(_ url: URL?, title: String? = nil) { guard let url = url else { return } - let webViewController = WebViewControllerFactory.controller(url: url) + if let title = title { + present(webViewController: WebViewControllerFactory.controller(url: url, title: title)) + } + else { + present(webViewController: WebViewControllerFactory.controller(url: url)) + } + } + + private func present(webViewController: UIViewController) { if presentingViewController != nil { navigationController?.pushViewController(webViewController, animated: true) } else { @@ -202,6 +210,8 @@ open class AboutViewController: UITableViewController { fileprivate var rows: [[Row]] { let appsBlogHostname = URL(string: WPAutomatticAppsBlogURL)?.host ?? String() + let acknowledgementsString = NSLocalizedString("Acknowledgements", comment: "Displays the list of third-party libraries we use") + return [ [ Row(title: NSLocalizedString("Version", comment: "Displays the version of the App"), @@ -233,9 +243,12 @@ open class AboutViewController: UITableViewController { details: nil, handler: { self.displayWebView(WPGithubMainURL) }), - Row(title: NSLocalizedString("Acknowledgements", comment: "Displays the list of third-party libraries we use"), + Row(title: acknowledgementsString, details: nil, - handler: { self.displayWebView(Bundle.main.url(forResource: "acknowledgements", withExtension: "html")) }), + handler: { + let url = Bundle.main.url(forResource: "acknowledgements", withExtension: "html") + self.displayWebView(url, title: acknowledgementsString) + }), ] ] } diff --git a/WordPress/Classes/ViewRelated/Menus/MenuDetailsViewController.m b/WordPress/Classes/ViewRelated/Menus/MenuDetailsViewController.m index d2b29571f7d5..0a61bc23a471 100644 --- a/WordPress/Classes/ViewRelated/Menus/MenuDetailsViewController.m +++ b/WordPress/Classes/ViewRelated/Menus/MenuDetailsViewController.m @@ -52,7 +52,8 @@ - (void)setupTextField { UITextField *textField = self.textField; textField.placeholder = NSLocalizedString(@"Menu Name", @"Menus placeholder text for the name field of a menu with no name."); - textField.textColor = [UIColor murielNeutral70]; + textField.textColor = [UIColor murielText]; + textField.tintColor = [UIColor murielListIcon]; textField.adjustsFontForContentSizeCategory = YES; [self updateTextFieldFont]; [textField addTarget:self action:@selector(hideTextFieldKeyboard) forControlEvents:UIControlEventEditingDidEndOnExit]; @@ -73,7 +74,7 @@ - (void)setupTrashButton { UIButton *trashButton = self.trashButton; [trashButton setTitle:nil forState:UIControlStateNormal]; - trashButton.tintColor = [UIColor murielNeutral30]; + trashButton.tintColor = [UIColor murielListIcon]; [trashButton setImage:[Gridicon iconOfType:GridiconTypeTrash] forState:UIControlStateNormal]; [trashButton addTarget:self action:@selector(trashButtonPressed) forControlEvents:UIControlEventTouchUpInside]; trashButton.backgroundColor = [UIColor clearColor]; @@ -88,7 +89,7 @@ - (void)setupTextFieldDesignViews UIImage *image = [Gridicon iconOfType:GridiconTypePencil]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.translatesAutoresizingMaskIntoConstraints = NO; - imageView.tintColor = [UIColor murielNeutral30]; + imageView.tintColor = [UIColor murielListIcon]; imageView.contentMode = UIViewContentModeScaleAspectFit; _textFieldDesignIcon = imageView; @@ -156,7 +157,7 @@ - (void)showTextFieldEditingState self.doneButton.alpha = 1.0; self.textFieldDesignIcon.hidden = YES; - self.textFieldDesignView.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.6]; + self.textFieldDesignView.backgroundColor = [UIColor murielTertiaryBackground]; } completion:nil]; } diff --git a/WordPress/Classes/ViewRelated/Menus/MenuItemAbstractView.m b/WordPress/Classes/ViewRelated/Menus/MenuItemAbstractView.m index 105e56a117a1..b7c2c35ff7c8 100644 --- a/WordPress/Classes/ViewRelated/Menus/MenuItemAbstractView.m +++ b/WordPress/Classes/ViewRelated/Menus/MenuItemAbstractView.m @@ -109,7 +109,7 @@ - (void)setupIconView // width and height constraints are (less than or equal to) in case the view is hidden [iconView.widthAnchor constraintLessThanOrEqualToConstant:MenusDesignItemIconSize].active = YES; [iconView.heightAnchor constraintLessThanOrEqualToConstant:MenusDesignItemIconSize].active = YES; - iconView.tintColor = [UIColor murielNeutral30]; + iconView.tintColor = [UIColor murielListIcon]; _iconView = iconView; NSAssert(_stackView != nil, @"stackView is nil"); @@ -214,6 +214,7 @@ - (UIButton *)addAccessoryButtonIconViewWithImage:(UIImage *)image button.backgroundColor = [UIColor clearColor]; [button setImage:image forState:UIControlStateNormal]; + button.tintColor = [UIColor murielTextTertiary]; CGFloat padding = 6.0; CGFloat width = MenusDesignItemIconSize + (padding * 2); @@ -269,7 +270,7 @@ - (UIColor *)iconTintColor if (self.highlighted) { color = [UIColor whiteColor]; } else { - color = [UIColor murielNeutral30]; + color = [UIColor murielListIcon]; } return color; diff --git a/WordPress/Classes/ViewRelated/Menus/MenuItemView.m b/WordPress/Classes/ViewRelated/Menus/MenuItemView.m index b03a3132958a..8aa702d1d99d 100644 --- a/WordPress/Classes/ViewRelated/Menus/MenuItemView.m +++ b/WordPress/Classes/ViewRelated/Menus/MenuItemView.m @@ -97,7 +97,7 @@ - (void)setHighlighted:(BOOL)highlighted [self.cancelButton setTitleColor:[UIColor murielPrimary] forState:UIControlStateNormal]; self.addButton.tintColor = [UIColor murielPrimary]; - self.orderingButton.tintColor = [UIColor murielNeutral10]; + self.orderingButton.tintColor = [UIColor murielTextTertiary]; } } diff --git a/WordPress/Classes/ViewRelated/Menus/MenusSelectionDetailView.m b/WordPress/Classes/ViewRelated/Menus/MenusSelectionDetailView.m index d65563d64107..6adbddbe0b75 100644 --- a/WordPress/Classes/ViewRelated/Menus/MenusSelectionDetailView.m +++ b/WordPress/Classes/ViewRelated/Menus/MenusSelectionDetailView.m @@ -110,7 +110,7 @@ - (void)setupAccessoryView UIImageView *accessoryView = [[UIImageView alloc] init]; accessoryView.contentMode = UIViewContentModeScaleAspectFit; accessoryView.image = [Gridicon iconOfType:GridiconTypeChevronDown]; - accessoryView.tintColor = [UIColor murielNeutral10]; + accessoryView.tintColor = [UIColor murielTextTertiary]; [accessoryView.widthAnchor constraintEqualToConstant:24].active = YES; [accessoryView.heightAnchor constraintEqualToConstant:24].active = YES; _accessoryView = accessoryView; diff --git a/WordPress/Classes/ViewRelated/NUX/DomainSuggestionsTableViewController.swift b/WordPress/Classes/ViewRelated/NUX/DomainSuggestionsTableViewController.swift index 7ca0bca42f3d..422747378c25 100644 --- a/WordPress/Classes/ViewRelated/NUX/DomainSuggestionsTableViewController.swift +++ b/WordPress/Classes/ViewRelated/NUX/DomainSuggestionsTableViewController.swift @@ -96,6 +96,16 @@ class DomainSuggestionsTableViewController: NUXTableViewController { SVProgressHUD.dismiss() } + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + if #available(iOS 13, *) { + if traitCollection.userInterfaceStyle != previousTraitCollection?.userInterfaceStyle { + tableView.reloadData() + } + } + } + /// Fetches new domain suggestions based on the provided string /// /// - Parameters: @@ -253,10 +263,10 @@ extension DomainSuggestionsTableViewController { } cell.placeholder = searchFieldPlaceholder + cell.reloadTextfieldStyle() cell.delegate = self cell.selectionStyle = .none cell.backgroundColor = .clear - return cell } @@ -378,3 +388,10 @@ extension DomainSuggestionsTableViewController: SearchTableViewCellDelegate { } } } + +extension SearchTableViewCell { + fileprivate func reloadTextfieldStyle() { + textField.textColor = .text + textField.leftViewImage = UIImage(named: "icon-post-search") + } +} diff --git a/WordPress/Classes/ViewRelated/NUX/EpilogueUserInfoCell.swift b/WordPress/Classes/ViewRelated/NUX/EpilogueUserInfoCell.swift index 73d5efd12377..a93fd391320b 100644 --- a/WordPress/Classes/ViewRelated/NUX/EpilogueUserInfoCell.swift +++ b/WordPress/Classes/ViewRelated/NUX/EpilogueUserInfoCell.swift @@ -61,6 +61,7 @@ class EpilogueUserInfoCell: UITableViewCell { usernameLabel.text = showEmail ? userInfo.email : "@\(userInfo.username)" usernameLabel.fadeInAnimation() + usernameLabel.accessibilityIdentifier = "login-epilogue-username-label" gravatarAddIcon.isHidden = !allowGravatarUploads diff --git a/WordPress/Classes/ViewRelated/Pages/PageListSectionHeaderView.swift b/WordPress/Classes/ViewRelated/Pages/PageListSectionHeaderView.swift index 218ca6ef4819..688e5a2d43ea 100644 --- a/WordPress/Classes/ViewRelated/Pages/PageListSectionHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Pages/PageListSectionHeaderView.swift @@ -11,6 +11,9 @@ class PageListSectionHeaderView: UIView { override func awakeFromNib() { super.awakeFromNib() + + backgroundColor = .listBackground + titleLabel.backgroundColor = .listBackground WPStyleGuide.applyBorderStyle(separator) } } diff --git a/WordPress/Classes/ViewRelated/Pages/PageListTableViewCell.m b/WordPress/Classes/ViewRelated/Pages/PageListTableViewCell.m index 4b7c7fe0377f..db1afa3cf311 100644 --- a/WordPress/Classes/ViewRelated/Pages/PageListTableViewCell.m +++ b/WordPress/Classes/ViewRelated/Pages/PageListTableViewCell.m @@ -109,8 +109,8 @@ - (void)applyStyles self.titleLabel.font = [WPStyleGuide notoBoldFontForTextStyle:UIFontTextStyleHeadline]; self.titleLabel.adjustsFontForContentSizeCategory = YES; - self.titleLabel.textColor = [UIColor murielNeutral70]; - self.badgesLabel.textColor = [UIColor murielNeutral]; + self.titleLabel.textColor = [UIColor murielText]; + self.badgesLabel.textColor = [UIColor murielTextSubtle]; self.menuButton.tintColor = [UIColor murielTextSubtle]; [self.menuButton setImage:[Gridicon iconOfType:GridiconTypeEllipsis] forState:UIControlStateNormal]; diff --git a/WordPress/Classes/ViewRelated/Plans/PlanListRow.swift b/WordPress/Classes/ViewRelated/Plans/PlanListRow.swift index 6ab3826bf570..dd97a7446b34 100644 --- a/WordPress/Classes/ViewRelated/Plans/PlanListRow.swift +++ b/WordPress/Classes/ViewRelated/Plans/PlanListRow.swift @@ -22,7 +22,7 @@ struct PlanListRow: ImmuTableRow { cell.textLabel?.attributedText = attributedTitle cell.textLabel?.adjustsFontSizeToFitWidth = true cell.detailTextLabel?.text = description - cell.detailTextLabel?.textColor = .neutral(.shade30) + cell.detailTextLabel?.textColor = .textSubtle cell.detailTextLabel?.font = WPFontManager.systemRegularFont(ofSize: 14.0) cell.separatorInset = UIEdgeInsets.zero cell.backgroundColor = .listForeground diff --git a/WordPress/Classes/ViewRelated/Plugins/PluginDetailViewHeaderCell.swift b/WordPress/Classes/ViewRelated/Plugins/PluginDetailViewHeaderCell.swift index f6c5c9231b05..06d550d6bbc3 100644 --- a/WordPress/Classes/ViewRelated/Plugins/PluginDetailViewHeaderCell.swift +++ b/WordPress/Classes/ViewRelated/Plugins/PluginDetailViewHeaderCell.swift @@ -10,7 +10,7 @@ class PluginDetailViewHeaderCell: UITableViewCell { } open func configureCell(_ directoryEntry: PluginDirectoryEntry) { - contentView.backgroundColor = .neutral(.shade0) + contentView.backgroundColor = .listForeground if let banner = directoryEntry.banner { headerImageView?.isHidden = false @@ -21,7 +21,7 @@ class PluginDetailViewHeaderCell: UITableViewCell { let iconPlaceholder = Gridicon.iconOfType(.plugins, withSize: CGSize(width: 40, height: 40)) iconImageView?.downloadImage(from: directoryEntry.icon, placeholderImage: iconPlaceholder) - iconImageView?.backgroundColor = .neutral(.shade0) + iconImageView?.backgroundColor = .listForeground iconImageView?.tintColor = .neutral nameLabel?.text = directoryEntry.name diff --git a/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.swift b/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.swift index 5860f00adc07..dbfc5d880357 100644 --- a/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.swift +++ b/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.swift @@ -26,7 +26,6 @@ class PluginDirectoryCollectionViewCell: UICollectionViewCell { override func awakeFromNib() { super.awakeFromNib() - nameLabel.font = WPStyleGuide.subtitleFontBold() logoImageView.tintColor = WPStyleGuide.cellGridiconAccessoryColor() } diff --git a/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.xib b/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.xib index 8bb52dbc2218..101ffd9014b9 100644 --- a/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.xib +++ b/WordPress/Classes/ViewRelated/Plugins/PluginDirectoryCollectionViewCell.xib @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -37,7 +35,7 @@ with long title</string> <nil key="highlightedColor"/> </label> </subviews> - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="trailing" secondItem="huw-bc-DnN" secondAttribute="trailing" id="Mhr-k4-l9t"/> <constraint firstItem="kDU-L0-NYI" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Rrv-tf-Udl"/> diff --git a/WordPress/Classes/ViewRelated/Plugins/PluginListCell.xib b/WordPress/Classes/ViewRelated/Plugins/PluginListCell.xib index 1422c36a615a..f7c7d0762aff 100644 --- a/WordPress/Classes/ViewRelated/Plugins/PluginListCell.xib +++ b/WordPress/Classes/ViewRelated/Plugins/PluginListCell.xib @@ -1,13 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> - <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/> - <capability name="Constraints to layout margins" minToolsVersion="6.0"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -17,7 +13,7 @@ <rect key="frame" x="0.0" y="0.0" width="643" height="72"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="9JL-Ab-5ka" id="Zhb-0F-wJw"> - <rect key="frame" x="0.0" y="0.0" width="643" height="71.5"/> + <rect key="frame" x="0.0" y="0.0" width="643" height="72"/> <autoresizingMask key="autoresizingMask"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="RK4-vT-k2f"> @@ -28,7 +24,7 @@ </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Jetpack" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F0c-Qp-f0w"> - <rect key="frame" x="72" y="15" width="535" height="20.5"/> + <rect key="frame" x="72" y="15" width="540" height="20.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> <color key="textColor" red="0.18039215689999999" green="0.2666666667" blue="0.32549019610000002" alpha="1" colorSpace="calibratedRGB"/> <nil key="highlightedColor"/> @@ -40,8 +36,8 @@ <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fKA-Hi-YBp" userLabel="accessoryViewContainer"> - <rect key="frame" x="151.5" y="41.5" width="475.5" height="14"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <rect key="frame" x="151.5" y="42" width="475.5" height="14"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="14" id="Oog-o2-yXz"/> </constraints> diff --git a/WordPress/Classes/ViewRelated/Plugins/PluginViewModel.swift b/WordPress/Classes/ViewRelated/Plugins/PluginViewModel.swift index 9dbeb4ba9ca4..2bef3484f0ad 100644 --- a/WordPress/Classes/ViewRelated/Plugins/PluginViewModel.swift +++ b/WordPress/Classes/ViewRelated/Plugins/PluginViewModel.swift @@ -562,7 +562,7 @@ class PluginViewModel: Observable { guard let font = value as? UIFont, font.familyName == "Times New Roman" else { return } copy.addAttribute(.font, value: WPStyleGuide.subtitleFont(), range: range) - copy.addAttribute(.foregroundColor, value: UIColor.neutral(.shade70), range: range) + copy.addAttribute(.foregroundColor, value: UIColor.text, range: range) } diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Diffs/RevisionDiffViewController.swift b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Diffs/RevisionDiffViewController.swift index f4b039a52c04..e9fb2f77d7fb 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Diffs/RevisionDiffViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Diffs/RevisionDiffViewController.swift @@ -5,15 +5,14 @@ class RevisionDiffViewController: UIViewController, StoryboardLoadable { @IBOutlet private var titleLabel: UILabel! @IBOutlet private var contentLabel: UILabel! + @IBOutlet private var scrollView: UIScrollView! var revision: Revision? override func viewDidLoad() { super.viewDidLoad() - - titleLabel.font = WPFontManager.notoBoldFont(ofSize: 24.0) - contentLabel.font = WPFontManager.notoRegularFont(ofSize: 16) + setupUI() } override func viewWillAppear(_ animated: Bool) { @@ -22,8 +21,17 @@ class RevisionDiffViewController: UIViewController, StoryboardLoadable { } } - private extension RevisionDiffViewController { + private func setupUI() { + view.backgroundColor = .basicBackground + scrollView.backgroundColor = .basicBackground + + titleLabel.font = WPFontManager.notoBoldFont(ofSize: 24.0) + contentLabel.font = WPFontManager.notoRegularFont(ofSize: 16) + titleLabel.textColor = .text + contentLabel.textColor = .text + } + private func showRevision() { guard let revision = revision else { return diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Preview/RevisionPreviewViewController.swift b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Preview/RevisionPreviewViewController.swift index 6d97f0bb4b84..8b5dc4c438e8 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Preview/RevisionPreviewViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Preview/RevisionPreviewViewController.swift @@ -96,6 +96,7 @@ private extension RevisionPreviewViewController { // private extension RevisionPreviewViewController { private func addSubviews() { + view.backgroundColor = .basicBackground view.addSubview(textView) textView.addSubview(titleLabel) } diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/RevisionDiffsBrowserViewController.swift b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/RevisionDiffsBrowserViewController.swift index e85f203a2ce6..1ab542f6cb3a 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/RevisionDiffsBrowserViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/RevisionDiffsBrowserViewController.swift @@ -12,6 +12,8 @@ class RevisionDiffsBrowserViewController: UIViewController { private var contentPreviewState: ContentPreviewState = .html @IBOutlet private var containerView: UIView! + @IBOutlet private var strokeView: UIView! + @IBOutlet private var revisionContainer: UIView! @IBOutlet private var revisionTitle: UILabel! @IBOutlet private var previousButton: UIButton! @IBOutlet private var nextButton: UIButton! @@ -143,6 +145,8 @@ private extension RevisionDiffsBrowserViewController { navigationItem.leftBarButtonItems = [doneBarButtonItem] navigationItem.rightBarButtonItems = [moreBarButtonItem, loadBarButtonItem] navigationItem.title = NSLocalizedString("Revision", comment: "Title of the screen that shows the revisions.") + strokeView.backgroundColor = .divider + revisionContainer.backgroundColor = .listForeground } private func updateNextPreviousButtons() { diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Revisions.storyboard b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Revisions.storyboard index 2aaccc6e88cb..b9bf3148048a 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Revisions.storyboard +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Browser/Revisions.storyboard @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="9BX-ta-eQr"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="9BX-ta-eQr"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/> <capability name="Named colors" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> @@ -16,7 +14,7 @@ <objects> <navigationController id="9BX-ta-eQr" customClass="RevisionsNavigationController" customModule="WordPress" customModuleProvider="target" sceneMemberID="viewController"> <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translucent="NO" id="XL2-Md-hno"> - <rect key="frame" x="0.0" y="20" width="375" height="44"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> </navigationBar> <connections> @@ -32,11 +30,11 @@ <objects> <viewController id="aEY-1G-H9o" customClass="RevisionDiffsBrowserViewController" customModule="WordPress" customModuleProvider="target" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" id="cG0-G3-XU5"> - <rect key="frame" x="0.0" y="0.0" width="375" height="603"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="623"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rsS-xc-ge8"> - <rect key="frame" x="0.0" y="539" width="375" height="64"/> + <rect key="frame" x="0.0" y="559" width="375" height="64"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rSD-aC-9V4"> <rect key="frame" x="0.0" y="7" width="50" height="50"/> @@ -81,7 +79,7 @@ </connections> </containerView> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="T2k-GK-3TX" firstAttribute="top" secondItem="1Hg-z8-YVh" secondAttribute="bottom" constant="4" id="C5J-9t-sd9"/> <constraint firstItem="1Hg-z8-YVh" firstAttribute="top" secondItem="0zh-of-VUW" secondAttribute="top" id="Isk-s9-MoC"/> @@ -109,7 +107,7 @@ </constraints> </view> <containerView opaque="NO" contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uhq-mq-TeO"> - <rect key="frame" x="0.0" y="0.0" width="375" height="539"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="559"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <connections> <segue destination="1re-Hq-Vps" kind="embed" id="UdL-Ti-ban"/> @@ -133,7 +131,9 @@ <outlet property="containerView" destination="uhq-mq-TeO" id="Ehy-69-qmb"/> <outlet property="nextButton" destination="Und-hy-I90" id="Q6I-kh-y5d"/> <outlet property="previousButton" destination="rSD-aC-9V4" id="s8K-96-nXk"/> + <outlet property="revisionContainer" destination="rsS-xc-ge8" id="HyU-B2-o8q"/> <outlet property="revisionTitle" destination="1Hg-z8-YVh" id="cXY-5C-yT6"/> + <outlet property="strokeView" destination="7EM-Lu-3t1" id="d3c-cB-4j5"/> </connections> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="tS6-Ip-YDF" userLabel="First Responder" sceneMemberID="firstResponder"/> @@ -201,6 +201,7 @@ Nulla sodales mauris ullamcorper massa tincidunt, eu pretium erat fringilla. Sed </view> <connections> <outlet property="contentLabel" destination="GYn-QL-8hI" id="1e4-Xp-22g"/> + <outlet property="scrollView" destination="mb8-Xb-lI6" id="yWZ-vF-8Fg"/> <outlet property="titleLabel" destination="GAe-1S-aM6" id="5uM-RT-M7h"/> </connections> </viewController> @@ -215,7 +216,7 @@ Nulla sodales mauris ullamcorper massa tincidunt, eu pretium erat fringilla. Sed <view key="view" contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" id="GfE-RI-5IB"> <rect key="frame" x="0.0" y="0.0" width="160" height="18"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <viewLayoutGuide key="safeArea" id="Ha8-OF-10N"/> </view> </viewController> @@ -249,7 +250,7 @@ Nulla sodales mauris ullamcorper massa tincidunt, eu pretium erat fringilla. Sed </scenes> <resources> <namedColor name="Gray40"> - <color red="0.50196078431372548" green="0.50196078431372548" blue="0.5490196078431373" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color red="0.49803921568627452" green="0.50196078431372548" blue="0.54117647058823526" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </namedColor> </resources> </document> diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift b/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift index 749d3b0a3068..912fcb6adec6 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift @@ -79,6 +79,7 @@ private extension RevisionsTableViewController { tableView.tableFooterView = tableViewFooter + tableView.separatorColor = .divider WPStyleGuide.configureColors(view: view, tableView: tableView) } diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Views/Cell/RevisionsTableViewCell.swift b/WordPress/Classes/ViewRelated/Post/Revisions/Views/Cell/RevisionsTableViewCell.swift index d74dda0e6bc0..b7f1f0d28f10 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Views/Cell/RevisionsTableViewCell.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Views/Cell/RevisionsTableViewCell.swift @@ -76,10 +76,13 @@ private extension RevisionsTableViewCell { private func setupStyles() { // Setup cell style WPStyleGuide.configureTableViewCell(self) + contentView.backgroundColor = .listForeground // Setup labels - titleLabel.textColor = .neutral(.shade70) - subTitleLabel.textColor = .neutral(.shade40) + titleLabel.backgroundColor = .listForeground + titleLabel.textColor = .text + subTitleLabel.backgroundColor = .listForeground + subTitleLabel.textColor = .textSubtle // Setup del operations delOperation = RevisionOperation(.del) diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Views/Footer/RevisionsTableViewFooter.swift b/WordPress/Classes/ViewRelated/Post/Revisions/Views/Footer/RevisionsTableViewFooter.swift index 88ae7a364547..cdf7e2ee4d89 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Views/Footer/RevisionsTableViewFooter.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Views/Footer/RevisionsTableViewFooter.swift @@ -29,7 +29,7 @@ class RevisionsTableViewFooter: UIView { private extension RevisionsTableViewFooter { private func setupUI() { - backgroundColor = .neutral(.shade5) + backgroundColor = .listBackground autoresizingMask = .flexibleWidth diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/Views/Operation/RevisionOperationViewController.swift b/WordPress/Classes/ViewRelated/Post/Revisions/Views/Operation/RevisionOperationViewController.swift index ceaca5658c8e..4f5f4a417e88 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/Views/Operation/RevisionOperationViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/Views/Operation/RevisionOperationViewController.swift @@ -15,6 +15,8 @@ class RevisionOperationViewController: UIViewController { } private func setupViews() { + view.backgroundColor = .listForeground + addView = RevisionOperation(.add).internalView delView = RevisionOperation(.del).internalView diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift index 12522e0ce945..b4df955ea2e8 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift @@ -300,14 +300,12 @@ open class ReaderDetailViewController: UIViewController, UIViewControllerRestora // split screen multitasking on the iPad. view.layoutIfNeeded() - #if XCODE11 if #available(iOS 13.0, *) { if previousTraitCollection?.hasDifferentColorAppearance(comparedTo: traitCollection) == true { reloadGradientColors() configureRichText() } } - #endif } @@ -538,13 +536,11 @@ open class ReaderDetailViewController: UIViewController, UIViewControllerRestora footerView.backgroundColor = .listForeground footerDivider.backgroundColor = .divider - #if XCODE11 if #available(iOS 13.0, *) { if traitCollection.userInterfaceStyle == .dark { attributionView.backgroundColor = .listBackground } } - #endif reloadGradientColors() } diff --git a/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/AssembledSiteView.swift b/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/AssembledSiteView.swift index b52cf8b04fdb..14ec160b46f5 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/AssembledSiteView.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/AssembledSiteView.swift @@ -83,11 +83,11 @@ final class AssembledSiteView: UIView { textField.translatesAutoresizingMaskIntoConstraints = false - textField.backgroundColor = .neutral(.shade5) + textField.backgroundColor = .listBackground textField.font = WPStyleGuide.fontForTextStyle(.footnote) textField.isEnabled = false textField.textAlignment = .center - textField.textColor = .neutral(.shade70) + textField.textColor = .textSubtle textField.text = domainName textField.layer.cornerRadius = Parameters.textFieldCornerRadius @@ -102,7 +102,7 @@ final class AssembledSiteView: UIView { activityIndicator.translatesAutoresizingMaskIntoConstraints = false activityIndicator.hidesWhenStopped = true - activityIndicator.color = .neutral(.shade40) + activityIndicator.color = .textSubtle activityIndicator.startAnimating() return activityIndicator diff --git a/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/SiteAssemblyContentView.swift b/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/SiteAssemblyContentView.swift index 104f58875386..b363284b1c49 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/SiteAssemblyContentView.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/SiteAssemblyContentView.swift @@ -90,7 +90,7 @@ final class SiteAssemblyContentView: UIView { label.numberOfLines = 0 label.font = WPStyleGuide.fontForTextStyle(.title1, fontWeight: .bold) - label.textColor = .neutral(.shade70) + label.textColor = .text label.textAlignment = .center let createdText = NSLocalizedString("Your site has been created!", @@ -108,7 +108,7 @@ final class SiteAssemblyContentView: UIView { label.numberOfLines = 0 label.font = WPStyleGuide.fontForTextStyle(.title2) - label.textColor = .neutral(.shade40) + label.textColor = .textSubtle label.textAlignment = .center let statusText = NSLocalizedString("We’re creating your new site.", @@ -124,7 +124,7 @@ final class SiteAssemblyContentView: UIView { activityIndicator.translatesAutoresizingMaskIntoConstraints = false activityIndicator.hidesWhenStopped = true - activityIndicator.color = .neutral(.shade40) + activityIndicator.color = .textSubtle activityIndicator.startAnimating() return activityIndicator @@ -185,7 +185,7 @@ final class SiteAssemblyContentView: UIView { translatesAutoresizingMaskIntoConstraints = true autoresizingMask = [ .flexibleWidth, .flexibleHeight ] - backgroundColor = .neutral(.shade5) + backgroundColor = .listBackground statusStackView.addArrangedSubviews([ statusLabel, activityIndicator ]) addSubviews([ completionLabel, statusStackView ]) @@ -244,10 +244,12 @@ final class SiteAssemblyContentView: UIView { return } + buttonContainerView.backgroundColor = .basicBackground + // This wrapper view provides underlap for Home indicator let buttonContainerContainer = UIView(frame: .zero) buttonContainerContainer.translatesAutoresizingMaskIntoConstraints = false - buttonContainerContainer.backgroundColor = .white + buttonContainerContainer.backgroundColor = .basicBackground buttonContainerContainer.addSubview(buttonContainerView) addSubview(buttonContainerContainer) self.buttonContainerContainer = buttonContainerContainer diff --git a/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleHeader.swift b/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleHeader.swift index ff1d50bb3820..a0a3a2107e4f 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleHeader.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleHeader.swift @@ -71,17 +71,17 @@ final class TitleSubtitleHeader: UIView { } private func styleBackground() { - backgroundColor = .neutral(.shade5) + backgroundColor = .listBackground } private func styleTitle() { titleLabel.font = WPStyleGuide.fontForTextStyle(.title1, fontWeight: .bold) - titleLabel.textColor = .neutral(.shade70) + titleLabel.textColor = .text } private func styleSubtitle() { subtitleLabel.font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular) - subtitleLabel.textColor = .neutral(.shade40) + subtitleLabel.textColor = .textSubtle } func setTitle(_ text: String) { diff --git a/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleTextfieldHeader.swift b/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleTextfieldHeader.swift index ae69db93d417..d30dce7bc3e3 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleTextfieldHeader.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Shared/TitleSubtitleTextfieldHeader.swift @@ -68,17 +68,28 @@ final class SearchTextField: UITextField { private func initialize() { translatesAutoresizingMaskIntoConstraints = false - backgroundColor = .white + backgroundColor = .listForeground clearButtonMode = .whileEditing font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular) - textColor = .neutral(.shade70) + textColor = .text autocapitalizationType = .none autocorrectionType = .no adjustsFontForContentSizeCategory = true + setIconImage() + + NSLayoutConstraint.activate([ + heightAnchor.constraint(equalToConstant: Constants.searchHeight), + ]) + + addTopBorder(withColor: .divider) + addBottomBorder(withColor: .divider) + } + + private func setIconImage() { let iconSize = CGSize(width: Constants.iconDimension, height: Constants.iconDimension) - let loupeIcon = Gridicon.iconOfType(.search, withSize: iconSize).imageWithTintColor(WPStyleGuide.readerCardCellHighlightedBorderColor())?.imageFlippedForRightToLeftLayoutDirection() + let loupeIcon = Gridicon.iconOfType(.search, withSize: iconSize).imageWithTintColor(.listIcon)?.imageFlippedForRightToLeftLayoutDirection() let imageView = UIImageView(image: loupeIcon) if traitCollection.layoutDirection == .rightToLeft { @@ -88,13 +99,14 @@ final class SearchTextField: UITextField { leftView = imageView leftViewMode = .always } + } - NSLayoutConstraint.activate([ - heightAnchor.constraint(equalToConstant: Constants.searchHeight), - ]) + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) - addTopBorder(withColor: .neutral(.shade10)) - addBottomBorder(withColor: .neutral(.shade10)) + if #available(iOS 13, *) { + setIconImage() + } } } @@ -162,7 +174,7 @@ final class TitleSubtitleTextfieldHeader: UIView { } private func setStyles() { - backgroundColor = .neutral(.shade5) + backgroundColor = .clear } func setTitle(_ text: String) { diff --git a/WordPress/Classes/ViewRelated/Site Creation/SiteInfo/SiteInformationWizardContent.swift b/WordPress/Classes/ViewRelated/Site Creation/SiteInfo/SiteInformationWizardContent.swift index 4d67025cfa09..72316b8c1daf 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/SiteInfo/SiteInformationWizardContent.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/SiteInfo/SiteInformationWizardContent.swift @@ -81,7 +81,7 @@ final class SiteInformationWizardContent: UIViewController { } private func setupBackground() { - view.backgroundColor = .neutral(.shade5) + view.backgroundColor = .listBackground } private func setupTable() { @@ -97,11 +97,11 @@ final class SiteInformationWizardContent: UIViewController { } private func setupTableBackground() { - table.backgroundColor = .neutral(.shade5) + table.backgroundColor = .listBackground } private func setupTableSeparator() { - table.separatorColor = .neutral(.shade10) + table.separatorColor = .divider } private func registerCell() { @@ -117,7 +117,7 @@ final class SiteInformationWizardContent: UIViewController { } private func setupButtonWrapper() { - buttonWrapper.backgroundColor = .neutral(.shade5) + buttonWrapper.backgroundColor = .listBackground } private func setupNextButton() { @@ -287,11 +287,15 @@ extension SiteInformationWizardContent: UITableViewDataSource { cell.addBottomBorder(withColor: .neutral(.shade10)) } + cell.contentView.backgroundColor = .listForeground + cell.nameLabel.font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular) - cell.nameLabel.textColor = .neutral(.shade70) + cell.nameLabel.textColor = .text + cell.nameLabel.backgroundColor = .listForeground cell.valueTextField.font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular) - cell.valueTextField.textColor = .neutral(.shade60) + cell.valueTextField.textColor = .text + cell.valueTextField.backgroundColor = .listForeground if cell.delegate == nil { cell.delegate = self @@ -300,7 +304,7 @@ extension SiteInformationWizardContent: UITableViewDataSource { private func attributedPlaceholder(text: String) -> NSAttributedString { let attributes: [NSAttributedString.Key: Any] = [ - .foregroundColor: UIColor.neutral(.shade30), + .foregroundColor: UIColor.textPlaceholder, .font: WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular) ] diff --git a/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsCell.swift b/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsCell.swift index 84a821b275f7..25feba0a378f 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsCell.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsCell.swift @@ -28,9 +28,7 @@ final class SiteSegmentsCell: UITableViewCell, ModelSettableCell { if let modelIcon = model?.icon { icon.downloadImage(from: modelIcon, placeholderImage: nil, success: { [weak self] downloadedImage in let tintedImage = downloadedImage.withRenderingMode(.alwaysTemplate) - if let tintColor = self?.model?.iconTintColor { - self?.icon.tintColor = tintColor - } + self?.icon.tintColor = .listIcon self?.icon.image = tintedImage }, failure: nil) } @@ -61,18 +59,18 @@ final class SiteSegmentsCell: UITableViewCell, ModelSettableCell { } private func styleBackground() { - backgroundColor = .white + backgroundColor = .listForeground } private func styleTitle() { title.font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .semibold) - title.textColor = .neutral(.shade70) + title.textColor = .text title.adjustsFontForContentSizeCategory = true } private func styleSubtitle() { subtitle.font = WPStyleGuide.fontForTextStyle(.callout, fontWeight: .regular) - subtitle.textColor = .neutral(.shade70) + subtitle.textColor = .textSubtle subtitle.adjustsFontForContentSizeCategory = true } diff --git a/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsWizardContent.swift b/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsWizardContent.swift index 300935d59564..8386f73abc4b 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsWizardContent.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/SiteSegments/SiteSegmentsWizardContent.swift @@ -63,7 +63,7 @@ final class SiteSegmentsWizardContent: UIViewController { } private func setupBackground() { - view.backgroundColor = .neutral(.shade5) + view.backgroundColor = .listBackground } override func viewDidLayoutSubviews() { @@ -81,11 +81,11 @@ final class SiteSegmentsWizardContent: UIViewController { } private func setupTableBackground() { - table.backgroundColor = .neutral(.shade5) + table.backgroundColor = .listBackground } private func setupTableSeparator() { - table.separatorColor = .neutral(.shade10) + table.separatorColor = .divider } private func hideSeparators() { diff --git a/WordPress/Classes/ViewRelated/Site Creation/Verticals/NewVerticalCell.swift b/WordPress/Classes/ViewRelated/Site Creation/Verticals/NewVerticalCell.swift index ec86d90c8709..0fdedc83aef5 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Verticals/NewVerticalCell.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Verticals/NewVerticalCell.swift @@ -30,11 +30,11 @@ final class NewVerticalCell: UITableViewCell, SiteVerticalPresenter { private func styleTitle() { WPStyleGuide.configureLabel(title, textStyle: .body, symbolicTraits: .traitItalic) - title.textColor = .neutral(.shade70) + title.textColor = .text } private func styleSubtitle() { subtitle.font = WPFontManager.systemRegularFont(ofSize: 15.0) - subtitle.textColor = .neutral(.shade30) + subtitle.textColor = .textSubtle } } diff --git a/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsCell.swift b/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsCell.swift index d307690a4cab..eb7150db66d5 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsCell.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsCell.swift @@ -23,7 +23,7 @@ final class VerticalsCell: UITableViewCell, SiteVerticalPresenter { private func styleTitle() { title.font = WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular) - title.textColor = .neutral(.shade70) + title.textColor = .text title.adjustsFontForContentSizeCategory = true } } diff --git a/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsWizardContent.swift b/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsWizardContent.swift index 499dcc2c5c36..dd1525a844a8 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsWizardContent.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/Verticals/VerticalsWizardContent.swift @@ -291,7 +291,7 @@ final class VerticalsWizardContent: UIViewController { } private func setupBackground() { - view.backgroundColor = .neutral(.shade5) + view.backgroundColor = .listBackground } private func setupCellHeight() { @@ -333,7 +333,7 @@ final class VerticalsWizardContent: UIViewController { } private func setupButtonWrapper() { - buttonWrapper.backgroundColor = .neutral(.shade5) + buttonWrapper.backgroundColor = .listBackground } private func setupNextButton() { @@ -362,7 +362,7 @@ final class VerticalsWizardContent: UIViewController { } private func setupTableBackground() { - table.backgroundColor = .neutral(.shade5) + table.backgroundColor = .listBackground } private func setupTableHeaderWithPrompt(_ prompt: SiteVerticalsPrompt) { @@ -380,7 +380,7 @@ final class VerticalsWizardContent: UIViewController { header.accessibilityTraits = .header let placeholderText = prompt.hint - let attributes = WPStyleGuide.defaultSearchBarTextAttributesSwifted(.neutral(.shade30)) + let attributes = WPStyleGuide.defaultSearchBarTextAttributesSwifted(.textPlaceholder) let attributedPlaceholder = NSAttributedString(string: placeholderText, attributes: attributes) header.textField.attributedPlaceholder = attributedPlaceholder header.textField.returnKeyType = .done @@ -408,7 +408,7 @@ final class VerticalsWizardContent: UIViewController { } private func setupTableSeparator() { - table.separatorColor = .neutral(.shade10) + table.separatorColor = .divider } private func trackVerticalSelection(_ vertical: SiteVertical) { diff --git a/WordPress/Classes/ViewRelated/Site Creation/WebAddress/AddressCell.swift b/WordPress/Classes/ViewRelated/Site Creation/WebAddress/AddressCell.swift index 24051fb6136c..4ec7719bf900 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/WebAddress/AddressCell.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/WebAddress/AddressCell.swift @@ -3,8 +3,10 @@ import WordPressKit final class AddressCell: UITableViewCell, ModelSettableCell { private struct TextStyleAttributes { - static let defaults: [NSAttributedString.Key: Any] = [.font: WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular), .foregroundColor: UIColor.neutral(.shade30)] - static let customName: [NSAttributedString.Key: Any] = [.font: WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular), .foregroundColor: UIColor.neutral(.shade70)] + static let defaults: [NSAttributedString.Key: Any] = [.font: WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular), + .foregroundColor: UIColor.textSubtle] + static let customName: [NSAttributedString.Key: Any] = [.font: WPStyleGuide.fontForTextStyle(.body, fontWeight: .regular), + .foregroundColor: UIColor.text] } @IBOutlet weak var title: UILabel! diff --git a/WordPress/Classes/ViewRelated/Site Creation/WebAddress/WebAddressWizardContent.swift b/WordPress/Classes/ViewRelated/Site Creation/WebAddress/WebAddressWizardContent.swift index d510afe50288..16513a8388fb 100644 --- a/WordPress/Classes/ViewRelated/Site Creation/WebAddress/WebAddressWizardContent.swift +++ b/WordPress/Classes/ViewRelated/Site Creation/WebAddress/WebAddressWizardContent.swift @@ -78,7 +78,7 @@ final class WebAddressWizardContent: UIViewController { label.font = WPStyleGuide.fontForTextStyle(.title2) label.textAlignment = .center - label.textColor = .neutral(.shade40) + label.textColor = .text let noResultsMessage = NSLocalizedString("No available addresses matching your search", comment: "Advises the user that no Domain suggestions could be found for the search query.") label.text = noResultsMessage @@ -254,11 +254,11 @@ final class WebAddressWizardContent: UIViewController { } private func setupBackground() { - view.backgroundColor = .neutral(.shade5) + view.backgroundColor = .listBackground } private func setupButtonWrapper() { - buttonWrapper.backgroundColor = .neutral(.shade5) + buttonWrapper.backgroundColor = .listBackground } private func setupCreateSiteButton() { @@ -347,7 +347,7 @@ final class WebAddressWizardContent: UIViewController { header.accessibilityTraits = .header let placeholderText = NSLocalizedString("Search Domains", comment: "Site creation. Seelect a domain, search field placeholder") - let attributes = WPStyleGuide.defaultSearchBarTextAttributesSwifted(.neutral(.shade30)) + let attributes = WPStyleGuide.defaultSearchBarTextAttributesSwifted(.textPlaceholder) let attributedPlaceholder = NSAttributedString(string: placeholderText, attributes: attributes) header.textField.attributedPlaceholder = attributedPlaceholder @@ -378,11 +378,11 @@ final class WebAddressWizardContent: UIViewController { } private func setupTableBackground() { - table.backgroundColor = .neutral(.shade5) + table.backgroundColor = .listBackground } private func setupTableSeparator() { - table.separatorColor = .neutral(.shade10) + table.separatorColor = .divider } private func setupConstraints() { diff --git a/WordPress/Classes/ViewRelated/Stats/Extensions/WPStyleGuide+Stats.swift b/WordPress/Classes/ViewRelated/Stats/Extensions/WPStyleGuide+Stats.swift index 5859fbbfecf5..b927d330ee89 100644 --- a/WordPress/Classes/ViewRelated/Stats/Extensions/WPStyleGuide+Stats.swift +++ b/WordPress/Classes/ViewRelated/Stats/Extensions/WPStyleGuide+Stats.swift @@ -237,11 +237,9 @@ extension WPStyleGuide { } static var mapBackground: UIColor { - #if XCODE11 if #available(iOS 13, *) { return .systemGray5 } - #endif return .neutral(.shade10) } diff --git a/WordPress/Classes/ViewRelated/Stats/Period Stats/Countries/Map/CountriesMapView.swift b/WordPress/Classes/ViewRelated/Stats/Period Stats/Countries/Map/CountriesMapView.swift index 39268d53a07b..3113ae34f635 100644 --- a/WordPress/Classes/ViewRelated/Stats/Period Stats/Countries/Map/CountriesMapView.swift +++ b/WordPress/Classes/ViewRelated/Stats/Period Stats/Countries/Map/CountriesMapView.swift @@ -64,13 +64,11 @@ class CountriesMapView: UIView, NibLoadable { } private func mapColors() -> [UIColor] { - #if XCODE11 if #available(iOS 13, *) { if traitCollection.userInterfaceStyle == .dark { return [.accent(.shade90), .accent] } } - #endif return [.accent(.shade5), .accent] } } diff --git a/WordPress/Classes/ViewRelated/Views/NoResultsViewController.swift b/WordPress/Classes/ViewRelated/Views/NoResultsViewController.swift index 5b57e06c5157..41ea6188a744 100644 --- a/WordPress/Classes/ViewRelated/Views/NoResultsViewController.swift +++ b/WordPress/Classes/ViewRelated/Views/NoResultsViewController.swift @@ -285,11 +285,12 @@ private extension NoResultsViewController { titleLabel.text = titleText titleLabel.textColor = .text + subtitleTextView.textColor = .textSubtle + if let subtitleText = subtitleText { subtitleTextView.attributedText = nil subtitleTextView.text = subtitleText subtitleTextView.isSelectable = false - subtitleTextView.textColor = .textSubtle } if let attributedSubtitleText = attributedSubtitleText { diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index d03741548a2c..fdb782f8535c 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -145,6 +145,11 @@ 172D7825212D93B800D513F7 /* GiphyPageableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 172D7824212D93B800D513F7 /* GiphyPageableTests.swift */; }; 172E27D31FD98135003EA321 /* NoticePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 172E27D21FD98135003EA321 /* NoticePresenter.swift */; }; 1730D4A31E97E3E400326B7C /* MediaItemTableViewCells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1730D4A21E97E3E400326B7C /* MediaItemTableViewCells.swift */; }; + 1739605D2327FC0F00D4837B /* MurielPalette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1739605C2327FC0F00D4837B /* MurielPalette.swift */; }; + 1739605E2327FC6E00D4837B /* MurielPalette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1739605C2327FC0F00D4837B /* MurielPalette.swift */; }; + 1739605F2327FC6F00D4837B /* MurielPalette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1739605C2327FC0F00D4837B /* MurielPalette.swift */; }; + 173960602327FC6F00D4837B /* MurielPalette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1739605C2327FC0F00D4837B /* MurielPalette.swift */; }; + 173960612327FC7100D4837B /* MurielPalette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1739605C2327FC0F00D4837B /* MurielPalette.swift */; }; 173BCE731CEB368A00AE8817 /* DomainsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 173BCE721CEB368A00AE8817 /* DomainsListViewController.swift */; }; 173BCE751CEB369900AE8817 /* Domains.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 173BCE741CEB369900AE8817 /* Domains.storyboard */; }; 173BCE791CEB780800AE8817 /* Domain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 173BCE781CEB780800AE8817 /* Domain.swift */; }; @@ -2216,6 +2221,7 @@ 172D7824212D93B800D513F7 /* GiphyPageableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GiphyPageableTests.swift; sourceTree = "<group>"; }; 172E27D21FD98135003EA321 /* NoticePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticePresenter.swift; sourceTree = "<group>"; }; 1730D4A21E97E3E400326B7C /* MediaItemTableViewCells.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaItemTableViewCells.swift; sourceTree = "<group>"; }; + 1739605C2327FC0F00D4837B /* MurielPalette.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MurielPalette.swift; sourceTree = "<group>"; }; 173BCE721CEB368A00AE8817 /* DomainsListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainsListViewController.swift; sourceTree = "<group>"; }; 173BCE741CEB369900AE8817 /* Domains.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Domains.storyboard; sourceTree = "<group>"; }; 173BCE781CEB780800AE8817 /* Domain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Domain.swift; sourceTree = "<group>"; }; @@ -5002,7 +5008,7 @@ path = Networking; sourceTree = "<group>"; }; - 29B97314FDCFA39411CA2CEA = { + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( F14B5F6F208E648200439554 /* config */, @@ -5422,6 +5428,7 @@ children = ( 4326191422FCB9DC003C7642 /* MurielColor.swift */, 435B762122973D0600511813 /* UIColor+MurielColors.swift */, + 1739605C2327FC0F00D4837B /* MurielPalette.swift */, 436110DF22C4241A000773AD /* UIColor+MurielColorsObjC.swift */, E678FC141C76241000F55F55 /* WPStyleGuide+ApplicationStyles.swift */, 17D975AE1EF7F6F100303D63 /* WPStyleGuide+Aztec.swift */, @@ -9619,7 +9626,7 @@ bg, sk, ); - mainGroup = 29B97314FDCFA39411CA2CEA; + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -10089,10 +10096,10 @@ "${BUILT_PRODUCTS_DIR}/WordPressKit/WordPressKit.framework", "${BUILT_PRODUCTS_DIR}/WordPressShared/WordPressShared.framework", "${BUILT_PRODUCTS_DIR}/WordPressUI/WordPressUI.framework", - "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.0.1/ZendeskCoreSDK.framework", - "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.0.1/ZendeskProviderSDK.framework", - "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.0.1/ZendeskSDK.framework", - "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.0.1/CommonUISDK.framework", + "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.1.0/ZendeskCoreSDK.framework", + "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.1.0/ZendeskProviderSDK.framework", + "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.1.0/ZendeskSDK.framework", + "${PODS_ROOT}/ZendeskSDK/ZendeskSDK/5.1.0/CommonUISDK.framework", "${BUILT_PRODUCTS_DIR}/wpxmlrpc/wpxmlrpc.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -11522,6 +11529,7 @@ 08D345501CD7F50900358E8C /* MenusSelectionDetailView.m in Sources */, 591AA5021CEF9BF20074934F /* Post+CoreDataProperties.swift in Sources */, E19B17AE1E5C6944007517C6 /* BasePost.swift in Sources */, + 1739605D2327FC0F00D4837B /* MurielPalette.swift in Sources */, 7E7947A9210BAC1D005BB851 /* NotificationContentRange.swift in Sources */, E1EBC36F1C118EA500F638E0 /* ImmuTable.swift in Sources */, B59B18751CC7FB8D0055EB7C /* PersonViewController.swift in Sources */, @@ -11575,6 +11583,7 @@ 436110DE22C41B02000773AD /* BuildConfiguration.swift in Sources */, 73F6DD44212C714F00CE447D /* RichNotificationViewModel.swift in Sources */, 736584E6213752730029C9A4 /* SFHFKeychainUtils.m in Sources */, + 173960612327FC7100D4837B /* MurielPalette.swift in Sources */, 73B05D2621374B960073ECAA /* Tracks.swift in Sources */, 736584EC2137533A0029C9A4 /* Tracks+ContentExtension.swift in Sources */, ); @@ -11658,6 +11667,7 @@ 74021A01202E12F4006CC39F /* SharedCoreDataStack.swift in Sources */, 74021A14202E1393006CC39F /* ShareExtensionEditorViewController.swift in Sources */, CE39E17320CB117B00CABA05 /* RemoteBlog+Capabilities.swift in Sources */, + 1739605F2327FC6F00D4837B /* MurielPalette.swift in Sources */, 74021A0F202E1370006CC39F /* ExtensionTransitioningManager.swift in Sources */, 74E44AD92031ED2300556205 /* WordPressDraft-Lumberjack.m in Sources */, 741AF3A5202F3E2A00C771A5 /* Tracks+DraftAction.swift in Sources */, @@ -11735,6 +11745,7 @@ 74448F542044BC7600BD4CDA /* CategoryTree.swift in Sources */, 74402F2A200528F200A1D4A2 /* ExtensionPresentationController.swift in Sources */, B5BEA55F1C7CE6D100C8035B /* Constants.m in Sources */, + 1739605E2327FC6E00D4837B /* MurielPalette.swift in Sources */, CE39E17220CB117B00CABA05 /* RemoteBlog+Capabilities.swift in Sources */, BE6787F51FFF2886005D9F01 /* ShareModularViewController.swift in Sources */, B5552D7E1CD101A600B26DF6 /* NSExtensionContext+Extensions.swift in Sources */, @@ -11768,6 +11779,7 @@ 433ADC1C223B2A7E00ED9DE1 /* TextBundleWrapper.m in Sources */, 93E5284119A7741A003A1A9C /* TodayViewController.swift in Sources */, 938CF3DE1EF1BE8000AF838E /* CocoaLumberjack.swift in Sources */, + 173960602327FC6F00D4837B /* MurielPalette.swift in Sources */, 93C2075A1CC7FF9C00C94D04 /* Tracks.swift in Sources */, 436110DA22C3ED44000773AD /* FeatureFlag.swift in Sources */, 436110DB22C3ED4C000773AD /* BuildConfiguration.swift in Sources */, diff --git a/WordPress/WordPressTest/SiteCreation/SiteSegmentsCellTests.swift b/WordPress/WordPressTest/SiteCreation/SiteSegmentsCellTests.swift index 31b8dd1e4d74..e48f67f69889 100644 --- a/WordPress/WordPressTest/SiteCreation/SiteSegmentsCellTests.swift +++ b/WordPress/WordPressTest/SiteCreation/SiteSegmentsCellTests.swift @@ -44,10 +44,6 @@ final class SiteSegmentsCellTests: XCTestCase { XCTAssertEqual(cell?.subtitle.text, MockValues.subtitle) } - func testBackgroundIsStyled() { - XCTAssertEqual(cell?.backgroundColor, UIColor.white) - } - func testCellTitleIsTheCorrectFont() { XCTAssertEqual(cell?.title.font, WPStyleGuide.fontForTextStyle(.body, fontWeight: .semibold)) } diff --git a/WordPress/WordPressUITests/Screens/BaseScreen.swift b/WordPress/WordPressUITests/Screens/BaseScreen.swift index 59e05429f0fa..8e9d191171a4 100644 --- a/WordPress/WordPressUITests/Screens/BaseScreen.swift +++ b/WordPress/WordPressUITests/Screens/BaseScreen.swift @@ -53,7 +53,7 @@ class BaseScreen { safari.launch() // Select the URL bar when Safari opens - let urlBar = safari.otherElements["URL"] + let urlBar = safari.textFields.firstMatch waitFor(element: urlBar, predicate: "exists == true") urlBar.tap() @@ -62,7 +62,7 @@ class BaseScreen { magicLinkComponents.path = "/magic-link" magicLinkComponents.queryItems = [URLQueryItem(name: "scheme", value: "wpdebug")] - safari.textFields["URL"].typeText("\(magicLinkComponents.url!.absoluteString)\n") + urlBar.typeText("\(magicLinkComponents.url!.absoluteString)\n") // Accept the prompt to open the deep link safari.scrollViews.element(boundBy: 0).buttons.element(boundBy: 1).tap() diff --git a/WordPress/WordPressUITests/Screens/Login/LoginEpilogueScreen.swift b/WordPress/WordPressUITests/Screens/Login/LoginEpilogueScreen.swift index 1c64b93e5adc..714f3daf6c6e 100644 --- a/WordPress/WordPressUITests/Screens/Login/LoginEpilogueScreen.swift +++ b/WordPress/WordPressUITests/Screens/Login/LoginEpilogueScreen.swift @@ -2,7 +2,7 @@ import Foundation import XCTest private struct ElementStringIDs { - static let usernameField = "username" + static let usernameField = "login-epilogue-username-label" static let siteUrlField = "siteUrl" static let connectSiteButton = "connectSite" static let continueButton = "Continue" diff --git a/WordPress/WordPressUITests/Utils/XCTest+Extensions.swift b/WordPress/WordPressUITests/Utils/XCTest+Extensions.swift index ac357172a6d5..97f0fabf260e 100644 --- a/WordPress/WordPressUITests/Utils/XCTest+Extensions.swift +++ b/WordPress/WordPressUITests/Utils/XCTest+Extensions.swift @@ -16,13 +16,9 @@ extension XCUIElement { */ func clearTextIfNeeded() -> Void { let app = XCUIApplication() - let content = self.value as! String - if content.count > 0 && content != self.placeholderValue { - self.press(forDuration: 1.2) - app.menuItems.element(boundBy: 1).tap() // Select All (in the text edit menu) - app.menuItems.element(boundBy: 0).tap() // Cut (in the text edit menu) - } + self.press(forDuration: 1.2) + app.keys["delete"].tap() } /** @@ -34,6 +30,10 @@ extension XCUIElement { self.tap() self.typeText(text) } + + var stringValue: String? { + return self.value as? String + } } extension XCTestCase { diff --git a/config/Version.public.xcconfig b/config/Version.public.xcconfig index 17e7dd7618cb..e16b5a0713f0 100644 --- a/config/Version.public.xcconfig +++ b/config/Version.public.xcconfig @@ -1,4 +1,4 @@ VERSION_SHORT=13.2.1 // Public long version example: VERSION_LONG=9.9.0.0 -VERSION_LONG=13.2.1.0 +VERSION_LONG=13.2.1.2