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

Discarding changes to a local post deletes the post #21940

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

Discarding changes to a local post deletes the post #21940

crazytonyli opened this issue Nov 1, 2023 · 4 comments

Comments

@crazytonyli
Copy link
Contributor

crazytonyli commented Nov 1, 2023

Expected behavior

Discarding new changes to a local post should only discard the new changes, not the whole post.

Actual behavior

In Gutenberg editor, when discard new changes to a local post, the local post is deleted.

Steps to reproduce the behavior

  1. Go to Posts list -> Draft.
  2. Turn off the iOS device's WiFi.
  3. Create a new post and tap Publish.
  4. Go back to the draft post list. You'll see a draft post that has not been uploaded to the site yet.
  5. Tap the draft post and make some changes.
  6. Tap the back button in the post editor and tap discard.
  7. Go back to the draft post list. The draft post is gone.

Here is a video recording:

local-post.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

2 similar comments
@peril-wordpress-mobile
Copy link

Fails
🚫

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

Generated by 🚫 dangerJS

@peril-wordpress-mobile
Copy link

Fails
🚫

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

Generated by 🚫 dangerJS

@kean kean mentioned this issue Mar 26, 2024
15 tasks
@kean kean self-assigned this Apr 30, 2024
@kean
Copy link
Contributor

kean commented Apr 30, 2024

There were two fixes to this issue made in the scope o the "Offline Mode (Sync Issues)" project (pilot in 24.8; release in 24.9):

  • The app now stores intermediate local revisions, so "Discard" only deletes the latest changes
  • The app no longer has the "Discard Changes" dialog for draft and pending posts (this change came later)

@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