From 79cab144b314eb3b676c4d646a52ffb5298b77f4 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 12 Jan 2021 11:25:44 -0600 Subject: [PATCH 1/4] Add Gutenberg focal point picker tooltip flag --- .../Classes/Utility/Editor/GutenbergSettings.swift | 11 +++++++++++ .../Gutenberg/GutenbergViewController.swift | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift index 4edf0a473de9..8ea79d63ec15 100644 --- a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift +++ b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift @@ -12,6 +12,7 @@ class GutenbergSettings { let url = urlStringFrom(blog) return "kShowGutenbergPhase2Dialog-" + url } + static let focalPointPickerTooltipShown = "kGutenbergFocalPointPickerTooltipShown" private static func urlStringFrom(_ blog: Blog) -> String { return (blog.url ?? "") @@ -157,6 +158,16 @@ class GutenbergSettings { database.set(true, forKey: Key.enabledOnce(for: blog)) } + /// True if it should show the tooltip for the focal point picker + var focalPointPickerTooltipShown: Bool { + get { + database.bool(forKey: Key.focalPointPickerTooltipShown) + } + set { + database.set(newValue, forKey: Key.focalPointPickerTooltipShown) + } + } + // MARK: - Gutenberg Choice Logic /// Call this method to know if Gutenberg must be used for the specified post. diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift index d456757b2303..301435bac5b4 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift @@ -860,6 +860,14 @@ extension GutenbergViewController: GutenbergBridgeDelegate { }) } + func gutenbergDidRequestFocalPointPickerTooltipShown() -> Bool { + return gutenbergSettings.focalPointPickerTooltipShown + } + + func gutenbergDidRequestSetFocalPointPickerTooltipShown(_ tooltipShown: Bool) { + gutenbergSettings.focalPointPickerTooltipShown = tooltipShown + } + func gutenbergDidSendButtonPressedAction(_ buttonType: Gutenberg.ActionButtonType) { switch buttonType { case .missingBlockAlertActionButton: From e50b34ad8bcc4928982e6cc851f1b6f2dc00c814 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 12 Jan 2021 11:25:51 -0600 Subject: [PATCH 2/4] Update Gutenberg ref --- Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile b/Podfile index c69e07c3e64c..ae5912bdb44a 100644 --- a/Podfile +++ b/Podfile @@ -154,7 +154,7 @@ target 'WordPress' do ## Gutenberg (React Native) ## ===================== ## - gutenberg :tag => 'v1.45.0-alpha1' + gutenberg :commmit => '4b6691afbbd0f96f9726e0207b23f2447a763085' ## Third party libraries ## ===================== From ab080418e5da96cb26dbed04f55f1b67927c0473 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 12 Jan 2021 11:25:54 -0600 Subject: [PATCH 3/4] Update Gutenberg ref --- Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile b/Podfile index ae5912bdb44a..b59cfc1ced6a 100644 --- a/Podfile +++ b/Podfile @@ -154,7 +154,7 @@ target 'WordPress' do ## Gutenberg (React Native) ## ===================== ## - gutenberg :commmit => '4b6691afbbd0f96f9726e0207b23f2447a763085' + gutenberg :commmit => '39c701034ccb75e19579e51947850ddbe55da252' ## Third party libraries ## ===================== From c24e0118c0c6c32ed0127ee83b6f89a02eb4b792 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 19 Jan 2021 12:08:50 -0600 Subject: [PATCH 4/4] Update Gutenberg ref --- Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile b/Podfile index b59cfc1ced6a..a97ab50c4885 100644 --- a/Podfile +++ b/Podfile @@ -154,7 +154,7 @@ target 'WordPress' do ## Gutenberg (React Native) ## ===================== ## - gutenberg :commmit => '39c701034ccb75e19579e51947850ddbe55da252' + gutenberg :commmit => '08c959a727df6b11728157ae7a7c1abf51ea909b' ## Third party libraries ## =====================