Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Scope tintColor changes to editor
This commit, specifically, scopes the changes to switches and action sheets (accessible via the editor's block settings) to only the editor. This addresses a previous bug in which the changes were applied throughout the app.
  • Loading branch information
SiobhyB committed Aug 2, 2022
commit 15effd5929d66996f1338becb0410f16cf082001
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ class GutenbergViewController: UIViewController, PostEditor, FeaturedImageDelega

override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self]).tintColor = .primary
}

override func viewLayoutMarginsDidChange() {
Expand Down Expand Up @@ -412,12 +413,7 @@ class GutenbergViewController: UIViewController, PostEditor, FeaturedImageDelega
super.present(viewControllerToPresent, animated: flag, completion: completion)

let presentedView = presentedViewController?.view
let presentedViewSwitch = UISwitch.appearance()
let presentedViewActionSheet = UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self])

presentedView?.tintColor = UIColor.editorPrimary
presentedViewSwitch.onTintColor = UIColor.editorPrimary
presentedViewActionSheet.tintColor = UIColor.editorPrimary
presentedView?.tintColor = .editorPrimary
}

// MARK: - Functions
Expand Down Expand Up @@ -573,6 +569,9 @@ extension GutenbergViewController {

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

UISwitch.appearance(whenContainedInInstancesOf: [RCTModalHostViewController.self]).onTintColor = .editorPrimary
UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self]).tintColor = .editorPrimary
}
}

Expand Down