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

Offline Support: Remove "Discard Changes" option from the editor. #11753

Closed
diegoreymendez opened this issue May 22, 2019 · 7 comments
Closed

Comments

@diegoreymendez
Copy link
Contributor

diegoreymendez commented May 22, 2019

Our Android app doesn't allow the user to discard their changes when exiting the editor. This is not aligned with what happens in iOS when you exit the editor.

Expected behavior:

We need to make sure our iOS App replicates the behavior from our Android App.

  • When editing a new post: pressing back saves the post as a draft and exits the editor.
  • When editing an existing draft: pressing back saves the changes to the draft.
  • When editing a published post: pressing back saves the changes locally.
  • When editing a scheduled post: pressing back saves the changes locally.
iOS (Current) Android (Expected)
2019-05-29 15 31 33 2019-05-29 15_36_32 2019-05-29 15-33-16 2019-05-29 15_34_27

@wordpress-mobile/ravenclaw

@diegoreymendez
Copy link
Contributor Author

I updated the description to match what Android does, and to remove the autosaves endpoint call which was really a proposed improvement over it.

@shiki
Copy link
Member

shiki commented May 29, 2019

We probably don't want to remove the Discard Changes option for now. It seems vital to the split flow in Gutenberg (wordpress-mobile/gutenberg-mobile#204).

Tagging @iamthomasbishop in case he wants to chime in.

@iamthomasbishop
Copy link

We probably don't want to remove the Discard Changes option for now

I would probably keep the option, especially if y'all are deciding on aligning iOS with Android. And as you mentioned, Gutenberg will probably have the option in the ••• menu.

@maxme
Copy link
Contributor

maxme commented May 29, 2019

I'm a bit confused by the 2 previous comments, is this ticket about:

  1. removing "discard changes" dialog when exiting the editor,
  2. AND removing the "discard changes" option from the menu (like Remove 'Discard Local Changes' from the overflow menu WordPress-Android#9561)?

@shiki
Copy link
Member

shiki commented May 29, 2019

@maxme I'm sorry. I got confused with this as well. I thought it was the overflow menu. 🤦‍♂ This is the removing "discard changes" dialog when exiting the editor. I probably should have commented on wordpress-mobile/WordPress-Android#9561 instead.

I have added GIFs to hopefully make this clearer.

@osullivanchris
Copy link

I'm reading up on this and I'll ask stupid questions so we know if we're all on the same page.

Current State

  • On Android, when hitting back, the changes are auto-saved and there is no message to the user
  • On iOS, when hitting back, the user gets the option to either discard the draft or keep it

Initial proposal

  • Change iOS to align with Android, by removing the option to save/discard and just defaulting to auto-save with no messaging

Input from @iamthomasbishop and @shiki

  • The functionality to remove is used in Gutenberg, so we should keep it to be consistent
  • There might be some confusion as @shiki was actually talking about keeping the option in the overflow menu. This is all about hitting back in the navigation bar. @iamthomasbishop were you talking about the navigation bar?

If we want to align the platforms:
Option 1: add functionality on Android
Option 2: remove functionality on iOS

I actually have an option 3, if you don't mind
So the happy path in this scenario is that the user has written something that they want to keep, but wants to leave the editor for now

The sad path is the user has written something that they now want to discard

If we take option 2 and remove the functionality, it could be frustrating for a user in the sad path. I have an idea for a smart default approach.

  • When user is on the editor and hits back, it brings them up a level to drafts
  • It doesn't show a dialogue per iOS today
  • Show a toast as we do on Android, but add a secondary action in the toast to discard the changes if the user made an error
  • In the happy path the user doesn't need to do anything
  • In the sad path the user has an undo action

I sketched an alternative as well, where this action is shown on the card rather than in a toast. There's a bit of duplication at the moment between the card and the toast.

The obvious downside to this option 3 is we would need to build functionality on both iOS and Android.

  • Option 1 involves building something on Android
  • Option 2 involves removing something on iOS
  • Option 3 involves building something on both Android (add secondary action to toast) and iOS (remove existing dialogue and add toast with secondary action)

Happy to hear your thoughts
11753-iOS

@yaelirub
Copy link
Contributor

@wordpress-mobile/ravenclaw, @iamthomasbishop,
Since we are anticipating upcoming changes and updates to the view/edit functionality in Gutenberg that will affect the discard experience as well, we are closing this issue for now .

The discussions we had here and in other channels are valuable and will be used to reevaluate how we would like to proceed with this feature.

@yaelirub yaelirub closed this as completed Jun 1, 2019
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

6 participants