standardnotes / android-classic

Android app - (Deprecated) - New version: https://github.com/standardnotes/mobile
GNU General Public License v3.0
139 stars 25 forks source link

Option (extension ?) to auto-merge notes #87

Closed ghost closed 7 years ago

ghost commented 7 years ago

(Sorry. My fingers didn't do what I asked and hit the Enter key too fast, or something. I wasn't done typing.)

I'm thinking that we could have an option to automatically merge notes instead of creating clones.

Separate copies of the note, especially if the note has any size at all, is very hard to "resolve". Also, if the note name is similar to other note names, I might not even notice that there was a conflict and a duplicate was generated. (I don't want to look a gift horse in the mouth, as I love the idea of a free notes app with security designed in by default, but I really am not enjoying the way this app/framework deals with conflicts.)

SimpleNote auto-merges the conflicts, but it actually has bugs, so I prefer not to do that, either.

My preference would be to do what Git does, and mark the conflicts, but otherwise the note is intact. In addition, we could "Flag" the note as conflicted with some UI treatment (red outline in the list?), so that the user can see that it needs attention, which could be cleared on the next "version").

Here's an example of the conflict "merging" that I'm talking about, done line-by-line (since these are text notes, after all):

Some text 1.
Some text 2.
If you have questions, please
<<<<<<< 2015-03-11 13:17
open an issue
=======
ask your question in IRC.
>>>>>>> 2015-03-11 13:18
Some text 4.
Some text 5.
moughxyz commented 7 years ago

Can you be more specific? It's not clear what you're asking for.

ghost commented 7 years ago

@mobitar Sorry. Had a small seizure or something. Description is now updated.

moughxyz commented 7 years ago

Ideally we would prepend "(conflicted copy)" to the note title, but since conflicts are created by the server, and the server can't read the note title, it can't change the title of it. The clients don't know that the conflicted copy they receive are conflicted—they just think it's a new note. So in the future we would need to update the Standard File api to mark conflicted copies returned with a special flag, so the clients can highlight it to the user.

deftelf commented 7 years ago

Not currently possible with encryption.

moughxyz commented 7 years ago

So actually fwiw I made an update to the server side to add a flag conflict_of to the item response if it is a conflict of something. This field is ephemeral-that is, it's returned only in the response when the conflict happens, but it's not saved. This way, you don't have to clear that flag. Anyway, I haven't yet made use of this on mobile, but on desktop it'll say "Conflicted copy" on conflicted notes: https://blog.standardnotes.org/how-does-standard-notes-handle-conflicts