Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d22a59e
Update editor's tint colour to always be WP Blue
SiobhyB Jul 25, 2022
0948e1e
Update tintColor to match correct shade of blue
SiobhyB Jul 25, 2022
b68465a
Merge branch 'trunk' into gutenberg/incorporate-consistent-tint-color
SiobhyB Jul 25, 2022
5ee8d0c
Update RELEASE-NOTES
SiobhyB Jul 25, 2022
38aac84
Set tintColor for *entire* editor window
SiobhyB Jul 26, 2022
feb03ea
Clarify purpose of code in comment
SiobhyB Jul 26, 2022
c85beaf
Tidy up code for clarity and conciseness
SiobhyB Jul 26, 2022
b4efa6a
Merge branch 'trunk' into gutenberg/incorporate-consistent-tint-color
SiobhyB Jul 26, 2022
256a4d2
Revert previous changes
SiobhyB Jul 27, 2022
9e64f2b
Set tintColor for modals
SiobhyB Jul 27, 2022
77e8e32
Merge branch 'trunk' into gutenberg/incorporate-consistent-tint-color
SiobhyB Jul 27, 2022
4fa4d0c
Set tintColor to Post Settings screen
SiobhyB Jul 27, 2022
a1cce52
Set tintColor for last Post Setting UI elements
SiobhyB Jul 28, 2022
324fe7b
Add editorPrimary var for clarity and reusability
SiobhyB Jul 28, 2022
f4eb426
Address mistake in previous commit
SiobhyB Jul 28, 2022
b6b76c5
Set tintColor on Post Settings' date picker
SiobhyB Jul 28, 2022
4763d9c
Small tweaks to code positioning, for readability
SiobhyB Jul 28, 2022
57d86ea
Set tintColor for switches in modals
SiobhyB Jul 28, 2022
7728b5a
Set tintColor for actionSheet in preseented modal
SiobhyB Jul 28, 2022
a4080b1
Replace Post Settings' tintColor calls
SiobhyB Aug 2, 2022
15effd5
Scope tintColor changes to editor
SiobhyB Aug 2, 2022
7fe6267
Small tweak: Remove unecessary reference
SiobhyB Aug 2, 2022
a8fb6ab
Refactor references to Post Settings UI
SiobhyB Aug 2, 2022
8544685
Remove accidental whitespace
SiobhyB Aug 2, 2022
67ceaa0
Set action sheet tintColor when editor appears
SiobhyB Aug 2, 2022
d5a655b
Update tintColor in Post Setting category screen
SiobhyB Aug 2, 2022
0e3821d
Update tintColor used in Post Settings media pick
SiobhyB Aug 2, 2022
ab3539c
Refine specificity of Post Settings tintColor call
SiobhyB Aug 2, 2022
233825f
Add clarifying comments
SiobhyB Aug 2, 2022
fe50487
Apply tintColor to Post Settings tag selection
SiobhyB Aug 2, 2022
10ed59f
Add clarifying comments to code
SiobhyB Aug 2, 2022
43b9994
Merge branch 'trunk' into gutenberg/incorporate-consistent-tint-color
SiobhyB Aug 2, 2022
1d5ba16
Revert accidental commit to previewController
SiobhyB Aug 2, 2022
e034bc6
Tweaks to comment spacing/wording for clarity
SiobhyB Aug 2, 2022
1eeb3ef
Add clarifying comment
SiobhyB Aug 3, 2022
6b2d0d9
Add clarifying comment
SiobhyB Aug 3, 2022
8868974
Refine/improve calls to Post Settings screen
SiobhyB Aug 4, 2022
9f4c72a
Merge branch 'trunk' into gutenberg/incorporate-consistent-tint-color
SiobhyB Aug 4, 2022
a67b94b
Remove calls to change editor action sheets
SiobhyB Aug 4, 2022
56dab96
[Code quality] Refine calls to UI elements
SiobhyB Aug 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
20.5
-----
* [*] [Jetpack-only] Block Editor: Makes some small changes to the editor's accent colours for consistency. [#19113]
* [*] User Mention: Split the suggestions list into a prominent section and a regular section. [#19064]
* [*] Use larger thumbnail previews for recommended themes during site creation [https://github.com/wordpress-mobile/WordPress-iOS/pull/18972]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct MurielColor {
static let textSubtle = AppStyleGuide.textSubtle
static let warning = AppStyleGuide.warning
static let jetpackGreen = AppStyleGuide.jetpackGreen
static let editorPrimary = AppStyleGuide.editorPrimary

/// The full name of the color, with required shade value
func assetName() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ extension UIColor {
return muriel(color: .primary, shade)
}

/// Muriel editor primary color
static var editorPrimary = muriel(color: .editorPrimary)
class func editorPrimary(_ shade: MurielColorShade) -> UIColor {
return muriel(color: .editorPrimary, shade)
}

/// Muriel success color
static var success = muriel(color: .success)
class func success(_ shade: MurielColorShade) -> UIColor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
return .primaryDark
}

@available(swift, obsoleted: 1.0)
static func murielEditorPrimary() -> UIColor {
return .editorPrimary
}

@available(swift, obsoleted: 1.0)
static func murielNeutral() -> UIColor {
return .neutral
Expand Down
11 changes: 11 additions & 0 deletions WordPress/Classes/System/WordPressAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,17 @@ extension WordPressAppDelegate {
UIButton.appearance(whenContainedInInstancesOf: [WPActionBar.self]).tintColor = .primary
WPActionBar.appearance().barBackgroundColor = .basicBackground
WPActionBar.appearance().lineColor = .basicBackground

// Post Settings styles
UITableView.appearance(whenContainedInInstancesOf: [AztecNavigationController.self]).tintColor = .editorPrimary
UISwitch.appearance(whenContainedInInstancesOf: [AztecNavigationController.self]).onTintColor = .editorPrimary

/// Sets the `tintColor` for parent category selection within the Post Settings screen
UIView.appearance(whenContainedInInstancesOf: [PostCategoriesViewController.self]).tintColor = .editorPrimary

/// It's necessary to target `PostCategoriesViewController` a second time to "reset" the UI element's `tintColor` for use in the app's Site Settings screen.
UIView.appearance(whenContainedInInstancesOf: [PostCategoriesViewController.self, WPSplitViewController.self]).tintColor = .primary

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extension AppStyleGuide {
static let textSubtle = MurielColor(name: .gray, shade: .shade50)
static let warning = MurielColor(name: .yellow)
static let jetpackGreen = MurielColor(name: .jetpackGreen)
static let editorPrimary = MurielColor(name: .blue)
}

// MARK: - Images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,14 @@ class GutenbergViewController: UIViewController, PostEditor, FeaturedImageDelega
}
}

override func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) {
super.present(viewControllerToPresent, animated: flag, completion: completion)

// Update the tint color for React Native modals when presented
let presentedView = presentedViewController?.view
presentedView?.tintColor = .editorPrimary
}

// MARK: - Functions

private var keyboardShowObserver: Any?
Expand Down Expand Up @@ -554,12 +562,16 @@ class GutenbergViewController: UIViewController, PostEditor, FeaturedImageDelega
extension GutenbergViewController {
private func setupGutenbergView() {
view.backgroundColor = .white
view.tintColor = .editorPrimary
gutenberg.rootView.translatesAutoresizingMaskIntoConstraints = false
gutenberg.rootView.backgroundColor = .basicBackground
view.addSubview(gutenberg.rootView)

view.pinSubviewToAllEdges(gutenberg.rootView)
gutenberg.rootView.pinSubviewToAllEdges(ghostView)

// Update the tint color of switches within React Native modals, as they require direct mutation
UISwitch.appearance(whenContainedInInstancesOf: [RCTModalHostViewController.self]).onTintColor = .editorPrimary
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ - (void)viewDidLoad
self.tableView.sectionFooterHeight = 0.0f;
// Set this to 0 to avoid automattic sizing of cells and getting label cell to short.
self.tableView.estimatedRowHeight = 0.0f;
self.view.tintColor = [UIColor murielEditorPrimary];

self.saveButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save", @"Save button label (saving content, ex: Post, Page, Comment, Category).")
style:[WPStyleGuide barButtonStyleForDone]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class PostTagPickerViewController: UIViewController {
WPStyleGuide.configureTableViewColors(tableView: tableView)

view.backgroundColor = .listBackground
view.tintColor = .editorPrimary

textView.delegate = self
// Do any additional setup after loading the view, typically from a nib.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class SchedulingDatePickerViewController: UIViewController, DatePickerSheet, Dat
navigationItem.setRightBarButton(doneButton, animated: false)

setup(topView: chosenValueRow, pickerView: datePickerView)
view.tintColor = .editorPrimary

setupForAccessibility()
}
Expand Down
1 change: 1 addition & 0 deletions WordPress/Jetpack/AppStyleGuide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extension AppStyleGuide {
static let textSubtle = MurielColor(name: .gray, shade: .shade50)
static let warning = MurielColor(name: .yellow)
static let jetpackGreen = MurielColor(name: .jetpackGreen)
static let editorPrimary = MurielColor(name: .blue)
}

// MARK: - Images
Expand Down