standardnotes / forum

Support from other community members. For 1-on-1 help, please contact help@standardnotes.com.
https://forum.standardnotes.org
196 stars 9 forks source link

[iOS] [Feature request] Highlight differences during Conflicted Copy errors #750

Closed yingw787 closed 1 year ago

yingw787 commented 4 years ago

Hello!

My Internet is extremely spotty sometimes and I've been getting Conflicted Copy errors quite frequently. One thing that might help me resolve Conflicted Copy errors better is highlighting where the conflict occurs. Is there a merge conflict underlying view that can be exposed to dev/canary users by any chance? Sometimes my notes are quite large and finding the differences takes a while and correct resolution may have low confidence; this would be a big help on my end. If you think this is a small issue and you are open to a PR, some pointers to where I could look first would be really helpful too. Thanks for your help, and please let me know if there is more information you need me to submit.

iOS Standard Notes version: 3.0.16 iOS Version: 13.1.3 iPhone Version: iPhone 7 (Model MN8N2LL/A)

Ying

moughxyz commented 4 years ago

This would be nice to have. Definitely not a small issue though. We'd need client-side JavaScript-based diffing. One place to start is here: https://github.com/standardnotes/web/blob/master/app/assets/javascripts/app/directives/views/conflictResolutionModal.js

This is currently an unused modal. Does not have diffing.

wonderfullyrich commented 4 years ago

Wanted to follow up this issue, as I second yingw787 point. I end up using StandardNotes on a daily basis and am in and out of internet all the time (I work on a ship so internet is not assured) as well as being in developing world countries with internet challenges. The aggressive syncing that StandardNotes does seems to often create multiple conflicting copies of a note even if I'm just on a single device. One simple solution in the interim would be just to have an offline mode which the user can enable and stop the attempts at syncing.

As for when it happens, I find myself looking at the same idea that yingw787 mentioned about highlighting the differences during a merge. I can manually do the same on a linux command line with diff, but it would be very nice to see it in the same way notepad++ or bbedit does it.

iOS Standard Notes 3.0.21 Android Standard Notes 3.0.19 MacOS Standard Notes 3.3.3

Rich

arielsvg commented 4 years ago

Thanks for sharing your experience, it's really eye-opening! There definitely are ways we could make syncing more robust (syncing is tricky in general) and we'll keep that in mind…

denmon99 commented 2 years ago

This would be nice to have. Definitely not a small issue though. We'd need client-side JavaScript-based diffing. One place to start is here: https://github.com/standardnotes/web/blob/master/app/assets/javascripts/app/directives/views/conflictResolutionModal.js

This is currently an unused modal. Does not have diffing.

When I have a conflict I go to my desktop app, and copy/paste the two conflicting notes into Notepad++ on Windows and run its Compare plugin. Other tools like WinMerge would work as well.

A simpler alternative to implementing the whole diffing process in-app would be to have a way to launch an external diff tool. I can imagine being able to right-click one of the conflicting notes, choose "Launch external diff", and have it write out temp files of the the two conflicting note contents and launch WinMerge or similar on those temp files.

This doesn't solve getting the modified content back into Standard Notes, but for me usually there are only a few small changes between them and I can tell which note to keep or what line to move between them.

virtuallyvlad commented 2 years ago

[...] usually there are only a few small changes between them and I can tell which note to keep or what line to move between them.

FYI as of now SN also gets rid of all of the history on one of the copies, I believe typically the newer one, so it's usually better to keep the old one and just merge in the changes, otherwise you lose all the history on your note.

denmon99 commented 2 years ago

That's an important distinction, thanks - I was unaware. I will definitely have to watch for that!