

React with C++: Building the Quip Mac and Windows Apps - finiteloop
https://medium.com/@btaylor/react-with-c-building-the-quip-mac-and-windows-apps-c63155c1531b

======
fooshint
As users are editing a doc, do you send diffs? What diff algorithm do you use?
What's your logic like for merging changes and handling conflicts?

~~~
finiteloop
Our documents are broken into lots of smaller components we call sections. So,
in a billeted lost, each list item is its own section.

Sections have a GUID and can be modified without touching any of the other
parts of the document. This is useful in that it minimizes most common merge
conflicts - they only happen of people edit the same sentence or spreadsheet
cell while offline, but simultaneous edits of the same doc generally don't
result in the need for any merge algorithm.

For offline edits of the same section, we use a fairly standard three way
merge algorithm. Then, we show the edits we chose in the left hand side of the
doc with the conversation along with a "Revert" button so you (the end user)
can revert if our algorithm was wrong.

------
djanowski
Already using Quip for Mac, loving it. Great job.

