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

Open a post with a remote auto-save, app must show a dialog asking to restore it #11650

Closed
maxme opened this issue May 7, 2019 · 7 comments
Closed

Comments

@maxme
Copy link
Contributor

maxme commented May 7, 2019

When a user opens a published post with a remote auto-save, we must show a dialog “A more recent revision of this post exists. Restore?”. Like in Calypso:

screenshot-2019-05-03-at-09 25 19

Decision

we are splitting this from the discussion on conflict resolution.

Implementation logic:
hasLocalChanges == true -> ignore autosave and just open the post
hasLocalChanges == false && post.autosave == null -> just open the post
hasLocalChanges == false && post.autosave != null -> open the post and show the dialog. If the user clicks on restore, load the autosave revision and set hasLocalChanges to true.

The service to query the latest autosave for a post is:
GET https://public-api.wordpress.com/rest/v1.1/sites/$site_id/posts/$post_id/autosave

Corresponding Android Ticket

wordpress-mobile/WordPress-Android#9812

@designsimply
Copy link
Contributor

Noting that conflict resolution dialogs were added to WPAndroid 11.7 and would be good to review for consistency.

See wordpress-mobile/WordPress-Android#8989 and wordpress-mobile/WordPress-Android#9107.

(internal reference from beta testing: p5T066-Le-p2#comment-2418 cc @megsfulton )

@designsimply designsimply added the [Status] Needs Design Review A designer needs to sign off on the implemented design. label May 9, 2019
@maxme maxme added this to Backlog in Offline Support: Posting [iOS] via automation May 10, 2019
@megsfulton megsfulton added Design Needed A design solution is needed. and removed [Status] Needs Design Review A designer needs to sign off on the implemented design. labels May 10, 2019
@diegoreymendez diegoreymendez added the 5 5 point estimation label Jun 5, 2019
@diegoreymendez
Copy link
Contributor

@osullivanchris - Autosaves are created when a published post is previewed, or when the user exists the editor without saving / published their changes. The messaging sounds a bit confusing because it makes it sound like this is conflict resolution for revisions in web vs mobile.

Maybe the message could be something like: "There's an autosave, want to restore it?"?

@yaelirub yaelirub moved this from Backlog to In Discovery in Offline Support: Posting [iOS] Jun 22, 2019
@yaelirub yaelirub added [Pri] Medium and removed Design Needed A design solution is needed. Good First Issue labels Jun 25, 2019
@yaelirub yaelirub moved this from In Discovery to Backlog in Offline Support: Posting [iOS] Jun 25, 2019
@malinajirka
Copy link

malinajirka commented Jun 28, 2019

Just noting that we probably won't need to use the GET https://public-api.wordpress.com/rest/v1.1/sites/$site_id/posts/$post_id/autosave endpoint. More info wordpress-mobile/WordPress-Android#9812 (comment)

@malinajirka
Copy link

malinajirka commented Jun 28, 2019

Looking at it again, I feel like we might want to close this ticket as it's a duplicate of Android - 9812. We moved the conflict resolution discussion to Android - 10008, so Android - 9812 is just about "unpublished revision dialog" again.

@malinajirka
Copy link

Closing this as explained above - we can reopen it, if I missed something.

Offline Support: Posting [iOS] automation moved this from Backlog to Done Jun 28, 2019
@yaelirub
Copy link
Contributor

yaelirub commented Jun 28, 2019

Hey @malinajirka,
I left this ticket open as the issue representing the decision we made on the Android ticket (look at the decision section in the description)

If we're closing this one we should open a new ticket for implementing that logic. I can do that tomorrow if you agree.

Also, the links in your latest comment open up unrelated issues under wpios repository. Can you update those to link to the ones on WPAndroid please?

@osullivanchris
Copy link

Discussion on paCBwp-bZ-p2 about this and the Android version wordpress-mobile/WordPress-Android#9812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants