-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove 'Discard Local Changes' from the overflow menu #9561
Comments
Not sure what's the best solution here. Currently we can't discard local changes without fetching the latest version from the server. Solutions:
@diegoreymendez thoughts? |
When I think about discarding changes (within the editor window) I'm definitely thinking about the current editing session - not about the entire local post. The reason for this thinking is that I may not be completely aware of all the local changes I made since the post was last saved to the servers. This makes the discussion a bit trickier though because the next logical question is "How do you discard all local changes?" (not just the changes in the current editing session). I've been thinking about this for a while. The problem we have is that this depends a bit on the synching strategy that we use for posts. To clarify what I mean:
|
Also, to make it more complicated… what happens if the app crashes when you’re editing a post? Currently iOS saves those changes locally. The post will have local changes but it wouldn’t be right to save those automagically (or would it)? |
We tend to this solution (save automatically when online or when back online). Picking a different revision is probably the best solution, simply because using the Revision History, users can actually look at differences and know what they're discarding / picking. The problem remains in offline mode, the Revision History requires a network connection (and I don't like the idea of fetching and caching everything from the post list). |
Marked as Needs Discussion since there was some confusion on how this should be implemented. Or should this even be implemented? |
I think this one is rather important. We want to figure out:
On top of this, we can have local changes as a result of the App crashing. We need to figure out if we need to be able to distinguish between:
I think this needs to come out of a UX discussion even before we discuss the technical aspects of it. |
My opinion about the "Discard Local Changes" feature:
|
Assuming we agreed on not allowing the user to discard changes (I think this may work)... Let's evaluate for a second the tools the user would still have to roll back their changes:
The first one is pretty straightforward and would only work for the current editing session. The second one is a bit trickier because while it works well with posts that have been saved while online, we currently don't store revisions for posts saved while offline. As a user, I think it would be awesome if we could make local revisions and remote revisions work similarly - whenever I tap "Save" it should be meaningful (it's tricky I know) whether I'm online or offline. It's a checkpoint that I'd want to be stored. I think I'd be fine with closing this issue, if we can agree to at least discuss the possibility of having local revisions. |
Also, if we agree on removing “Discard changes” entirely, we need to define what happens when you make edits to a post and close it. |
I agree. I also think answering the question "what are local changes" could be quite difficult when we release remote-auto-save which works in the background and it might have already overridden the remote-auto-save revision.
👍 We need to improve the current behavior of the Undo/Redo.
Makes sense to me. I agree that when you manually tap on Save you expect the post will be safely stored and if it creates a revision while online it should also create a revision while offline as the user doesn't need to be even aware they are not online. It can get a bit tricky as published posts don't have "save" button but "update" button, but I don't want to go too deep in the "local revisions" discussion on this ticket. |
Subscribing @wordpress-mobile/ravenclaw Even if we agree on all that's discussed above, I'm still wondering what should happen when we make edits to the post and go back to the post list without saving or publishing those changes. I think at the very least, we'd need to reach a conclusion on what should happen in that scenario. Another way to put it is: If we don't offer the possibility to discard the changes, then how is pressing back different from pressing "Save". Also: if the user creates a new post, writes something and taps back... since we won't be asking to discard changes should that post become a Draft automatically? |
My personal take on my own questions above...
We should probably remove the option to just save changes. Saving would not longer be a separate option. This should go through design.
Since all changes would be automatically saved, the post would become a draft. The trickiest scenario is probably what happens to a published post in an XMLRPC site with changes when you tap back, but we can discuss this in a separate issue. |
This is what happen in the Android app currently. We have 3 options for the back button and the back action:
|
@maxme - Thanks for the clarification, I keep forgetting this is specifically for Android. We can close this issue. |
As a result of this discussion I opened an issue in iOS to match this behavior. |
I think we might want to replicate Calypso's behavior |
I'm a bit confused about this ticket :). This was initially about the "Discard local changes" button in the overflow menu. I think we agreed on the fact that with a good Undo/Redo and by introducing local revisions we could remove that button. If this is the case and we decide to follow that path, we should open a new "action" ticket to implement that and remove the "Discard local changes" button. Then the discussion slipped on "discard changes" while leaving the editor which is another topic and was solved differently in iOS and Android. |
Completely agree, sorry my bad. |
This thread is super dense. Thanks @malinajirka @maxme @diegoreymendez for the excellent thought put into this. I spent a long time thinking about the complexities but I actually think a copy issue is at the heart of the problem. First I'm gonna use an example to frame my suggestion:
Effectively, these are different objects. This diagram hopefully makes sense. Although there are 3 potential 'objects' (v1, v2, v3) if saved after each session, the user only ever sees the latest object. I am not saying we should show all three items in the UI. But if you picture them as 3 cards its a useful thought experiment. The 'discard local changes' button was probably designed with the Tuesday session in mind. The use case is, I want to forget about the changes I've made locally and use the server draft/published post. Where it gets complicated is if we go to Wednesday's editing session. When we say 'discard local changes' it is very unclear whether it will discard the session changes or all local changes. I believe that 'Discard local changes' button was not designed with this use case in mind. Proposal: change the copy of 'discard local changes' to mean 'revert to server version'. We can come up with better language for that. But I think it retains the value of the original action, without the confusion of nested offline versions. Implications
Summarising my proposal
However I believe 2-4 are separate larger issues. Point 1 would be my resolution for this current issue. Aware this is very complex so let me know if I've missed something or if you disagree |
It can be ever more complicated than that if you use another online device (or Calypso) to edit the published version of this post after Tuesday. Since the app is offline, it won't be able to get that change.
Just wanted to point something you maybe missed: in offline mode, we can't fetch the server version, so we're back at the original problem with the blocking dialog
I'd go with that solution, change the name of that button and keep the blocking dialog for now in offline mode. Having offline and online revisions seems like the best solution to me and it's also a good solution for other tickets. |
and
Good points thank you. The solution I proposed is less elegant now that you've mentioned those issues. The blocking dialogue is not a great experience. Knowing the info you have shared, when I say 'server version' I guess its more like, 'forget about changes I've made specifically on this device'. Would it be possible to discard what has been done locally, show whatever the last version retrieved from the server was? And of course fetch the latest update when returning online. |
Yes it's possible, this is the last point in this comment. It requires some big changes on the technical side to keep that server copy somewhere and manage it correctly.
You mean overwrite the local version (restored from an old server version) from the current server version? That seems a bit weird to me. |
Seems like this is a lot of work compared with the value we're getting
No, sorry. I meant that when the user discards local and returns to their latest server version, that server version would then update when they reconnect. Discussing further with @maxme and will revert with proposal |
Per paCBwp-9N-p2 @maxme and I are considering removing 'discard local changes' as an option due to the inconsistencies and complexities that it creates. Details to follow. |
We are going to remove 'Discard Local Changes' from the Android overflow menu.
We will separately look to improve revision history to allow users to achieve this task if necessary. |
@maxme, can we create small issues to implement this? |
@yaelirub I opened #10102 and wordpress-mobile/WordPress-iOS#11994 |
Note: I re-opened this issue since "Discard Local Changes" wasn't removed yet. |
…card-local-changes Fix #9561: Remove "Discard Local Changes" in the Editor and in PostPreviewActivity
Make a change to a post -> Click on the overflow menu -> Discard local changes -> blocking dialog “A connection is required to …..”
The text was updated successfully, but these errors were encountered: