Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local post changes are saved automatically #21941

Closed
crazytonyli opened this issue Nov 1, 2023 · 4 comments
Closed

Local post changes are saved automatically #21941

crazytonyli opened this issue Nov 1, 2023 · 4 comments

Comments

@crazytonyli
Copy link
Contributor

Expected behavior

The changes should only be saved when tapping the "Published" button.

This expected behaviour is my interpretation of the app's offline editing support. The editor should behave like a text editor: it writes to the opened file only when user taps "Save" button.

Actual behavior

Changes are saved automatically after sending the app to background.

Steps to reproduce the behavior

  1. Go to Posts list -> Draft.
  2. Create a post and tap the "Publish" button.
  3. Go back to the Posts list. You should see a draft post here.
  4. Tap the draft post and make some changes to it.
  5. Go to the device's home screen, wait for a couple of seconds, and kill the app.
  6. Re-open the app and go to Posts list -> Draft.
  7. Checkout the post content.

Here is a video recording:

local-post-edits.mp4
Tested on [device], iOS [version], Jetpack iOS / WordPress iOS [version]
@peril-wordpress-mobile
Copy link

Fails
🚫

Please add a type label to this issue. e.g. '[Type] Enhancement'

Generated by 🚫 dangerJS

@crazytonyli
Copy link
Contributor Author

I did a little big digging and found a same issue: #10248. I guess the issue was fixed at one point (5 years ago).

@kean
Copy link
Contributor

kean commented Nov 1, 2023

Btw, if you remove "and make some changes to it" from step 4, it will still save the revision and display "local change" (incorrectly).

The editor should behave like a text editor:

That's an interesting thought. If you also compare it to Notes, the Notes app syncs files seamlessly/automatically and merges changes in the case of a conflict automatically.

But Notes are private. I think there can be more potential negative implications of unintentionally posting content to a user's public website. I'd rather be on the side of caution and only upload when the user publishes/saved explicitly, as you suggested. It should never auto-retry, especially not after closing the app.

@kean
Copy link
Contributor

kean commented Apr 30, 2024

This has been fixed in the scope of the "Offline Mode (Sync Issues)" project (pilot in 24.8; release in 24.9).

@kean kean closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants