From 8c6c4c7de9630f52635eb6a940f2adc396b16976 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Mon, 13 Jan 2025 13:58:00 -0500 Subject: [PATCH 1/3] fix: Avoid unexpectedly marking post content as unsaved The custom `editorHasChanges` implementation resulted in an always-"dirty" state, even after saving changes via the "Update" or "Save draft" buttons. This removal, results in the editor relying upon the existing `editorHasChanges` implementation, which appears to be more accurate. https://github.com/wordpress-mobile/WordPress-iOS/blob/388dbb167b7ae6fd763ed4c90076dc94679a9dc6/WordPress/Classes/ViewRelated/Post/PostEditor.swift#L81-L83 --- .../NewGutenberg/NewGutenbergViewController.swift | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift b/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift index 7761ada2507a..c326d3ebeb96 100644 --- a/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift @@ -70,18 +70,6 @@ class NewGutenbergViewController: UIViewController, PostEditor, PublishingEditor private let editorViewController: GutenbergKit.EditorViewController private weak var autosaveTimer: Timer? - var editorHasChanges: Bool { - var changes = post.changes - // TODO: cleanup (+ it doesn't handle scenarios like load from a revision) - // - warning: it has to compare two version serialized using the same system - if editorViewController.initialContent != post.content { - changes.content = post.content - } else { - changes.content = nil // yes, it needs to be set to .none manually - } - return !changes.isEmpty - } - // TODO: remove (none of these APIs are needed for the new editor) var autosaver = Autosaver(action: {}) func prepopulateMediaItems(_ media: [Media]) {} From bfad96f3fc046567c70599cea1bb16c6df07f38b Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Mon, 13 Jan 2025 14:07:48 -0500 Subject: [PATCH 2/3] docs: Add release note --- RELEASE-NOTES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index fc1aa570950f..3c800f780f3c 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,5 +1,10 @@ 25.7 ----- +* [**] Enable history navigation (undo and redo) for the experimental editor. [#23961] +* [*] Avoid unexpectedly marking post content as unsaved. [#23969] + +25.6 +----- * [**] Add Image Playground support (part of Apple Intelligence suite) for adding images to your posts, generated featured image, site icons, and more [#23688] * [**] Enable history navigation (undo and redo) for the experimental editor. [#23961] * [**] Various bug fixes and improvements in the new experimental editor [#23919] From 1f14175f3f71abe54eaba1a968ac6a649bb6023d Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 14 Jan 2025 12:53:34 -0500 Subject: [PATCH 3/3] docs: Fix release notes errors originating from rebasing --- RELEASE-NOTES.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 3c800f780f3c..75e2226c4dc0 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,10 +1,5 @@ 25.7 ----- -* [**] Enable history navigation (undo and redo) for the experimental editor. [#23961] -* [*] Avoid unexpectedly marking post content as unsaved. [#23969] - -25.6 ------ * [**] Add Image Playground support (part of Apple Intelligence suite) for adding images to your posts, generated featured image, site icons, and more [#23688] * [**] Enable history navigation (undo and redo) for the experimental editor. [#23961] * [**] Various bug fixes and improvements in the new experimental editor [#23919] @@ -48,6 +43,8 @@ * [*] Fix an issue with fullscreen button in reply view clipped by the notch [#23965] * [*] Remove "Lazy Images" option that is no longer part of the Jetpack plugin [#23966] * [*] Fix an issue with "Speed up your site" section not refreshing (fails silently) [#23966] +* [**] Enable history navigation (undo and redo) for the experimental editor. [#23961] +* [*] Avoid unexpectedly marking post content as unsaved. [#23969] 25.6 -----