Commit graph

45 commits

Author SHA1 Message Date
James Allen
a7fabb8e43 Merge pull request #321 from sharelatex/ja-recompile-tweaks
Animate toolbar for auto-compile and consolidate trigger logic
2018-02-14 09:34:16 +00:00
Alasdair Smith
7783e18a50 Allow Documents to be attached to CM 2018-02-09 10:38:51 +00:00
James Allen
5bf2ff0a47 Show animated bar while auto-compile is pending 2018-02-08 13:39:56 +00:00
Brian Gough
15997ea782 increase allowed op backlog and flush tolerance 2017-11-01 14:20:07 +00:00
Alasdair Smith
96d13215e3 Be more defensive when checking encoded text 2017-09-22 09:36:50 +01:00
Alasdair Smith
f8d4923547 Wrap in try/catch 2017-09-21 15:41:24 +01:00
Alasdair Smith
42b604dcda Clean up decoding from websockets 2017-09-21 15:41:24 +01:00
Alasdair Smith
a022f83cce Fix order of args 2017-09-21 15:22:56 +01:00
Alasdair Smith
e2bb6dcecb Pass option to encode range
To ensure backwards compat with clients not refreshing, pass a flag to enable
encoding.  This way, old client won't receive encoded ranges, but also won't
have decoding logic. The flag can then be removed once all clients are up to
date
2017-09-21 14:23:39 +01:00
Alasdair Smith
b33929fa83 DRY up 2017-09-21 13:36:31 +01:00
Alasdair Smith
24f44889a7 First pass at decoding changes & comments in ranges 2017-09-21 13:25:19 +01:00
Alasdair Smith
65b2c42fad Emit event when op is acknowledged 2017-09-05 14:57:06 +01:00
Shane Kilkelly
c43a2087d7 WIP: autocomplete for label/ref 2017-05-24 10:07:14 +01:00
James Allen
7418d12bf8 Defer updates of remote ops until Ace has been updated 2017-02-23 11:34:58 +01:00
James Allen
f4bbd8ea10 Use dirty state rather events to avoid O(N^2) behaviour 2017-02-23 11:27:19 +01:00
James Allen
d9b774bb9b Sycn track changes based on doc state, not editor state 2017-01-27 17:12:17 +01:00
James Allen
4a47d135c7 Reapply ops to track changes as current user when reconnecting 2017-01-17 14:54:22 +01:00
James Allen
2052ee63a3 Recover tracked changes after a disconnect 2017-01-12 17:19:19 +01:00
James Allen
9379cff89d Add end point for accepting change in doc updater 2017-01-09 15:25:27 +01:00
James Allen
ae30f32481 Use deterministic ids based on a seed 2017-01-09 10:49:03 +01:00
James Allen
988005e929 Send and get comments via the chat api 2016-12-16 16:42:41 +00: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
889d8f51c4 make Document _onError handler more robust
replace console.error with sl_console.log to prevent browser crashing
before exiting document if console object does not exist.
2016-11-21 13:58:08 +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
e1b54322ee fix whitespace 2016-11-04 10:18:33 +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
345d38c28d Don't clean up a documents event listener until after the socket has disconnected on error 2016-05-27 14:39:33 +01:00
James Allen
36c8c197e1 Add more debug log lines 2016-05-27 14:14:08 +01:00
James Allen
fec3266726 Don't remove new instance of Document from openDocs when cleaning up old instance 2016-05-27 14:13:53 +01:00
James Allen
a605dae7ba Don't show saving just because of pending ops
When typing continuously, there is always a pending op present.
The only time we're not saving is if the inflight op isn't changing.
So long as this has changed, it means the previous one has been processed.
2016-05-27 14:08:46 +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
Shane Kilkelly
77333c923b Merge branch 'master' into sk-references-ac 2016-01-04 09:37:10 +00:00
Brian Gough
1b70e08f82 reinstate the chaosmonkey 2015-12-18 09:55:24 +00:00
Shane Kilkelly
1ea13a74dd Refresh the references when the bib file is closed. 2015-12-17 15:13:02 +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
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
9e4653d83c Try to clean up to avoid memory leaks 2014-07-09 20:49:10 +01:00
James Allen
8ed03694c3 Add missing files 2014-07-08 12:02:26 +01:00