A plugin was developed in order to make the process of resolving conflicts easier. It provides a nice diff-window in which you can see the differences between your current note and the note received from cloud.
The plugin could be considered to be made of 5 parts:
- Core funcationality, loading and saving notes. (PR 1, PR 2, PR 3, PR 4)
- Note selection window, appears to select a note to compare with. (PR 1)
- User Experience and UI. (PR 1, PR 2, PR 3, PR 4, PR 5)
- Joplin source code changes. (PR 1, PR 2, PR 3)
All planned features were fully developed. The plugin development was based on a "release-early, release-often" strategy where the plugin core was developed and released in the early weeks. After that, the plugin had many updates with gradual improvements. A pull-request almost every week.
Full plugin source code: https://github.com/joplin/plugin-conflict-resolution
Plugin homepage: https://discourse.joplinapp.org/t/plugin-conflict-resolution/19204
- CodeMirror was decided to be used in order to stay consistent with the look of Joplin. Codemirror provides a diff-view builtin which was a huge plus on it's own.
- The NoteSelectWindow was decided to be added to support conflicts created in older versions which don't have a linked note.
- JUnit was used as it's the most popular testing library. Besides, it's also used in Joplin.
- Fontawesome was also decided to be used as it's used already in Joplin.
- Added a context menu option to conflict notes that opens the dialogs.
- Modified Jopin source code to save the source notes in conflict notes. (PR)
- Dialog loads the two notes into a diff viewer powered by CodeMirror.
- Code refactoring in order to make it testable.
- Titles were added as they could have a conflict as well.
- UI was changed slightly.
More Details - Pull Request 1 & Pull Request 2
- Added a note select dialog for notes that don't have a conflict note assigned.
- Changes to how I escape notes for viewing.
- Code refactored a little more to allow for a more general diff-tool in the future.
- Added save and cancel actions.
- Plugin was released for public use and testing.
- Added unit tests for the merging part.
- UI was refactored to allow for a better user experience.
- Joplin source code was modified to allow for plugins that can take almost full screen. (PR)
- Changed plugin CSS to a responsive design.
- Added buttons to go to next difference and previous difference.
- User is able to move all changes from left to right.
- Added options to toggle wordwrap, align changes and collapse unchanged.
- Changed to use fontawesome icons.
- Fixed bug where the context menu buttons were always enabled. (PR)
- Progress in making the UI match Joplins theme.
- Dialog design was finalized. It now matches the current Joplin theme.
For a conflict resolution plugin, it does it's job pretty well. Nothing is left to do and the plugin currently works. However, more improvements could indeed be done such as:
- Notifications when a conflict occurs.
- Automatic merging of notes.
- Time management, specially with Covid and juggling betweenn university and GSoC.
- Test driven development.
- How to make good UI design with good UX.
- Communication skills.
- Working in a huge codebase.
- Project management
- Git in-depth, used rebaseing and merging extensively.