Commit graph

20 commits

Author SHA1 Message Date
James Allen
ae30f32481 Use deterministic ids based on a seed 2017-01-09 10:49:03 +01:00
James Allen
5717cafcec Create comments via comment ops 2016-12-13 17:57:46 +00:00
James Allen
898277b4af Refactor ops model so it all happens in Document 2016-12-13 17:34:29 +00:00
James Allen
1d426e538f Load ranges from docupdater and toggle track changes when possible 2016-12-08 14:10:30 +00:00
Brian Gough
476de0118c Merge pull request #362 from sharelatex/bg-fix-saving-indicator
fix saving indicator
2016-11-04 11:02:32 +00:00
Brian Gough
d2ba575d85 note that acks are for our own ops 2016-11-04 10:55:46 +00:00
Brian Gough
62b8c30d0b make pollSavedStatus more robust against failure
check last ack timestamp and size of pending op

provide method to compute sharejs op size so we can check if pending
ops get too big
2016-11-03 11:28:23 +00:00
James Allen
c88624bf4c Pass through the data needed to trackChangesManager to determine if a remote was local or remote 2016-10-18 18:01:52 +01:00
James Allen
6ea58d4d6c Don't try to resend an update if the editor is not joined to the project 2016-05-27 10:46:14 +01:00
James Allen
39e57a9886 Throw fatal error if document update actually returns an error from the real-time service 2016-05-27 10:46:14 +01:00
James Allen
0175a86d4c Add in debugging console.logs which only display if ?debug=true is in URL 2016-05-27 10:46:14 +01:00
James Allen
dea97bb9dc Fix bad connection debugging parameters 2015-11-19 13:15:51 +00:00
James Allen
99bca31766 Error and hard refresh document after 30 seconds unsaved changes 2015-11-19 12:04:12 +00:00
James Allen
bf452bf306 Keep the connection.id up to date with socket.io client id
The meta.source of an update is populated on the server side so
we need to keep our local connection id up to date with it. When a duplicate
op is submitted we must send all possible client ids that it could have
been sent with.
2015-11-19 12:04:12 +00:00
James Allen
cde5144c42 Retry updates that have not been acknowledged.
If we do not get a reply from the server acknowledging our update after 5 seconds,
send it again. If it never got to the server, this is like normal. If the update
got to the server, but we never received the ack then we need to rely on ShareJs's
duplicate handling. We set the dupIfSource parameter on any retried updates which
let ShareJs know that it's a dup if we already have an op with this version number
and client id. The doc-updater and real-time services need changes to correctly
send another ack only to the submitting client in the case of a duplicate update.
2015-11-19 12:04:12 +00:00
James Allen
a153c6682a Put in client side check for document getting too long 2015-11-06 12:51:43 +00:00
James Allen
8a32ca1b64 Reduce buffer delay to 1 second 2015-04-17 16:45:17 +01:00
James Allen
af85c83877 Buffer updates when only a single user is editing a document
Add in 5 second delay between flushing updates when only a single user
is editing a document. As soon as an update is received from another user
we switch to sending updates immediately again so there is no latency
between collaborators. The logic applies to individual docs, so two users
can be editing different docs and will still buffer updates since they
will not affect each other.
2015-04-17 11:24:28 +01:00
James Allen
9f1a7c7396 Send source of update to doc updater and allow external updates to be ignored in UI 2014-10-16 11:27:10 +01:00
James Allen
8ed03694c3 Add missing files 2014-07-08 12:02:26 +01:00