You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using NB on a number of devices -- starting with multiple Firefox profiles and ending up with at home / at work notes, and so I spent some time thinking of the best way to automatically merge different board revisions -- until 4jag's uploaded his wonderful example and I realized that we don't actually have to.
(And as one could easily conclude from the whole source control software industry experience, in general case this is not even possible, to start with)
The rest was easy.
First, we introduce some unique ids for our notes -- so that we can cheat and say "hey, this is the same note" when we look at two different board revisions. And second, we leave the hard work of resolving note merge conflicts to the board owner, simply writing the old and new versions of the note text one on top on another, pretty much the same as old-school merge conflict editors do.
(In addition, some visual highlight for such "merge conflict" cases would be a nice to have.)
Now all we have to do when merging two boards is to create an index {(note id) => (note data)}, and to incrementally add our notes to that index, "merging" two notes with the same id.
Here is a more detailed description of the above, along with a proof-of-concept implementation (check the gif for a demo) :
Sadly I am not a design genius like Alexander, so board merging commands and the like simply go to Nullboard menu, along with some keyboard shortcuts to make repetitive operations a tad easier.
Lastly, this, again, is a proof-of-concept project, so while it works, there are some unpolished bits here and there -- for example, I did not update the board format code (shame on me!) or did not introduce a check that all board elements are of the new format and e.g. all the notes have unique ids before merging. Please check the proof-of-concept warning ssection of the README file for details.
However, the same README file has a fairly detailed description of the revision history, which shall make it relatively easy to explore the code, if intended.
@apankrat Alexander, please kindly let me know your thoughts, when you have time.
I am using NB on a number of devices -- starting with multiple Firefox profiles and ending up with at home / at work notes, and so I spent some time thinking of the best way to automatically merge different board revisions -- until 4jag's uploaded his wonderful example and I realized that we don't actually have to.
(And as one could easily conclude from the whole source control software industry experience, in general case this is not even possible, to start with)
The rest was easy.
First, we introduce some unique ids for our notes -- so that we can cheat and say "hey, this is the same note" when we look at two different board revisions. And second, we leave the hard work of resolving note merge conflicts to the board owner, simply writing the old and new versions of the note text one on top on another, pretty much the same as old-school merge conflict editors do.
(In addition, some visual highlight for such "merge conflict" cases would be a nice to have.)
Now all we have to do when merging two boards is to create an index {(note id) => (note data)}, and to incrementally add our notes to that index, "merging" two notes with the same id.
Here is a more detailed description of the above, along with a proof-of-concept implementation (check the gif for a demo) :
Sadly I am not a design genius like Alexander, so board merging commands and the like simply go to Nullboard menu, along with some keyboard shortcuts to make repetitive operations a tad easier.
Lastly, this, again, is a proof-of-concept project, so while it works, there are some unpolished bits here and there -- for example, I did not update the board format code (shame on me!) or did not introduce a check that all board elements are of the new format and e.g. all the notes have unique ids before merging. Please check the proof-of-concept warning ssection of the README file for details.
However, the same README file has a fairly detailed description of the revision history, which shall make it relatively easy to explore the code, if intended.
@apankrat Alexander, please kindly let me know your thoughts, when you have time.
Tagging: #2, #54 .
The text was updated successfully, but these errors were encountered: