Commit graph

288 commits

Author SHA1 Message Date
James Allen
bf20799478 Allow comments to be resolved an deleted 2016-11-17 18:06:08 +00:00
James Allen
4a93e02407 Goto a change when clicked in the overview panel 2016-11-17 15:55:18 +00:00
James Allen
d1a3ff4b73 Refactor callout and background styles and don't show in overview 2016-11-17 15:33:34 +00:00
James Allen
77400b000b Focus on box when adding a comment 2016-11-17 15:20:25 +00:00
Paulo Reis
df420e0d21 Remove deprecated event handlers, conditionally add the new ones in the Ace wrapper directive. 2016-11-17 14:34:23 +00:00
James Allen
15d8f6c661 Sort out scroll bar positions and scroll position transitions 2016-11-17 14:29:35 +00:00
Paulo Reis
4bba8e8977 Remove deprecated event handlers, conditionally add the new ones in the Ace wrapper directive. 2016-11-17 10:51:17 +00:00
Paulo Reis
f170fd4b83 Refactor Ace directive to have a single events bridge. 2016-11-17 10:40:08 +00:00
James Allen
2f136c15c3 Don't draw our hacked zero width markers when they are offscreen 2016-11-16 16:22:59 +00:00
James Allen
56408728cd fix initialization error 2016-11-16 14:00:29 +00:00
James Allen
443d772866 Don't clear entries when switching files 2016-11-16 13:53:01 +00:00
James Allen
479ea83e36 Dump everything (unstyled) into the review panel 2016-11-16 13:51:30 +00:00
James Allen
3b4670509a Remove left over debug logging 2016-11-15 15:51:15 +00:00
James Allen
4542d1094d Keep separate persistent change tracker for each doc 2016-11-15 15:48:12 +00:00
James Allen
c89579e1df Focus on the focused change 2016-11-14 12:47:46 +00:00
James Allen
d32a7d0a94 Only apply doc changes, not fold changes in undo manager 2016-11-14 09:44:59 +00:00
James Allen
9509e87dc1 Update entries in place and position via DOM attributes directly 2016-11-11 16:09:32 +00:00
James Allen
938a8c4894 Fix logic around not tracking rejections to changes 2016-11-10 10:58:55 +00:00
James Allen
34b2b665a3 Accept and reject changes 2016-11-10 10:52:09 +00:00
Paulo Reis
19241e571f Distinguish between inserts and deletes in the entries repeater. 2016-11-09 15:58:03 +00:00
James Allen
6d7f4e9e6a Add basic comment replying 2016-11-09 15:25:41 +00:00
James Allen
707ed43a7d Very crude adding of comments 2016-11-09 14:50:58 +00:00
James Allen
446ca7212a Track timestamps of changes 2016-11-09 12:19:48 +00:00
James Allen
cd494f7866 Update ChangesTracker to handle delete edge case 2016-11-08 17:57:23 +00:00
James Allen
f68c615f61 Remove markers correctly 2016-11-08 17:47:54 +00:00
James Allen
084838926d Add in dashed line callouts for changes and comments 2016-11-08 17:31:08 +00:00
James Allen
064ae1945a Toggle review panel and track changes with ui elements 2016-11-08 16:43:01 +00:00
James Allen
a907ec04fc Don't complain about comment markers when checking 2016-11-08 15:17:20 +00:00
James Allen
8c65cb5835 Track and highlight comment ranges 2016-11-08 15:12:25 +00:00
Brian Gough
307f08e6bb Merge pull request #363 from sharelatex/bg-lock-editor-when-connection-down
lock editor when connection down
2016-11-04 11:04: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
c25395d80b fix links to wiki 2016-11-04 10:25:08 +00:00
Brian Gough
e1b54322ee fix whitespace 2016-11-04 10:18:33 +00:00
Brian Gough
49a06f8489 modal for lost connection 2016-11-03 12:37:44 +00:00
Brian Gough
91a590ad0e update links from tender to wiki 2016-11-03 12:28:19 +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
8763e444e9 Include aceDelta in error message 2016-11-03 11:23:27 +00:00
James Allen
091eb7e462 Merge branch 'master' into ja-review-panel
Conflicts:
	public/coffee/ide.coffee
	public/stylesheets/app/editor.less
2016-11-03 10:07:37 +00:00
James Allen
11c24377cb fix JSONstringifyWithCycles 2016-10-31 16:57:29 +00:00
James Allen
c2eb49845f Revert "Make very simple shallow copy of aceDelta when there's an undo error"
This reverts commit 1d77a95f17dde6f8792bca1989d65952474b144c.
2016-10-31 16:56:49 +00:00
James Allen
26410690da Make very simple shallow copy of aceDelta when there's an undo error 2016-10-31 16:47:13 +00:00
James Allen
8368577867 Merge branch 'master' into ja-review-panel
Conflicts:
	app/views/project/editor/editor.jade
	public/coffee/ide.coffee
	public/coffee/ide/editor/directives/aceEditor.coffee
2016-10-31 16:42:55 +00:00
Brian Gough
8887ab78c0 improve ace mode recognition 2016-10-27 15:42:19 +01:00
Brian Gough
cb4380fa78 fix problem with setting syntax validation option 2016-10-26 15:08:29 +01:00
James Allen
c9925a3590 Handle reporting of cyclic objects to Sentry 2016-10-26 11:34:05 +01:00
James Allen
2ac405e58c Allow track changes to be toggled on and off 2016-10-20 16:59:58 +01:00
Brian Gough
e9b5fc056d fold aceEditor resetSession into session set up
it is not used elsewhere, and mode setting is now done during the
initialisation.
2016-10-20 16:03:55 +01:00
Brian Gough
7258e947a8 use ace modelist extension to auto-detect mode 2016-10-20 16:03:19 +01:00
James Allen
60a81beb11 Try out different styling for highlights 2016-10-20 15:18:45 +01:00
James Allen
2b94c69795 Don't use the trackChanges engine in the history editor panel 2016-10-20 12:19:57 +01:00
James Allen
52f3fe7303 Show different users changes in different colours 2016-10-20 12:15:22 +01:00
Brian Gough
3a07b785db disable auto insert of brackets and quotes in ace 2016-10-20 11:33:12 +01:00
James Allen
193766b437 Don't switch back to editor view when selecting a file in the history view 2016-10-19 10:43:53 +01: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
e717caab7f Merge branch 'master' into ja-review-panel 2016-10-18 16:52:41 +01:00
James Allen
05cd6e69a7 Add in extra sentry logging for undefined start in aceDelta 2016-10-18 16:37:40 +01:00
James Allen
42ab2e8165 Init review panel with ace editor height 2016-10-13 12:21:49 +01:00
James Allen
77c02042f8 Recalculate change offsets on editor resize 2016-10-13 12:09:18 +01:00
James Allen
fc782581ea Change review panel to feel like part of ace 2016-10-12 17:27:20 +01:00
James Allen
c689937297 Merge pull request #338 from sharelatex/ja-track-changes
Ja track changes
2016-10-12 09:21:46 +01:00
James Allen
4ac55c7671 Merge branch 'ja-track-changes' into ja-review-panel 2016-10-11 14:24:51 +01:00
Brian Gough
452f6117cd remove console.log 2016-10-11 13:56:17 +01:00
James Allen
32d7bb16e5 Be more explicit with query string to turn on track changes 2016-10-11 09:40:15 +01:00
James Allen
9682af3981 Merge branch 'master' into ja-track-changes
Conflicts:
	public/coffee/ide/history/HistoryManager.coffee
2016-10-10 17:10:10 +01:00
James Allen
0995ba5ee6 Add basic change tracking into editor behind a feature flag 2016-10-10 17:06:46 +01:00
James Allen
220759ee7a Merge pull request #330 from sharelatex/ja-non-english-spell-check
Use comprehensive unicode letter regex for spell check matching
2016-10-10 08:54:56 +01:00
Brian Gough
9177544ed9 add left menu for syntax validator 2016-10-06 11:51:24 +01:00
James Allen
201012a131 Use comprehensive unicode letter regex for spell check matching 2016-10-04 11:24:48 +01:00
Brian Gough
0eaa359f6c use syntax validator for beta programme users only 2016-09-23 15:19:40 +01:00
Brian Gough
d152095920 destroy ace sessions when no longer in use
also set mode to "latex" when session is created, to avoid setting mode
to "text" (default) and then to "latex" which causes the text worker to
be unnecessarily created and destroyed.
2016-09-23 15:19:40 +01:00
Brian Gough
0a350c8e3f infrastructure for using ace syntax checking 2016-09-23 15:19:40 +01:00
Brian Gough
cb4f6391a2 updated comments 2016-08-16 10:59:27 +01:00
Brian Gough
7863b7cab6 when calling gotoLine also scrollToLine to put line in view 2016-08-11 16:46:30 +01:00
Brian Gough
daa1d80865 add extra delay to gotoLine event 2016-08-11 16:46:12 +01:00
Brian Gough
a3c8202d0e support jumping to position with line and column from log entries 2016-07-29 14:59:48 +01:00
Shane Kilkelly
72c9c3f020 If there are no completions matching, detach the completer.
This prevents an invisible completer from swallowing keystrokes such as up/down
2016-07-26 15:54:33 +01:00
Paulo Reis
d6c966934d Set the key binding which is reported on Windows. 2016-06-21 16:53:50 +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
4bc31ae2b9 Don't throw an error if we get an ack for our update more than once, since we may try sending it more than once 2016-05-27 10:46:14 +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
Shane Kilkelly
ae85dc3f5d Enable spaces after commas in references autocomplete 2016-05-12 15:13:00 +01:00
Shane Kilkelly
9eb2e933cd enable autocomplete on citations like citeauthor 2016-05-12 12:03:08 +01:00
Shane Kilkelly
76697599ae Use the _ide version of browserIsSafari 2016-04-11 14:45:26 +01:00
Shane Kilkelly
8d6003dcc5 Add commentary 2016-04-11 09:58:37 +01:00
Shane Kilkelly
4fd4a0372c In Safari, limit iterations of the command-parsing loop. 2016-04-11 09:55:53 +01:00
Shane Kilkelly
059d3432c2 Allow citations like -parencite[page 6]{ to work. 2016-03-30 11:28:56 +01:00
Shane Kilkelly
11d77df898 Fix weird tab behaviour 2016-03-17 16:18:46 +00:00
Shane Kilkelly
020fd2e88d De-dupe autocomplete entries 2016-03-17 15:58:57 +00:00
Shane Kilkelly
53b46e42cd Refactor, take indentation into account. 2016-03-17 15:27:20 +00:00
Shane Kilkelly
229ced6f2f Remove Indentation. 2016-03-17 14:43:34 +00:00
Shane Kilkelly
95a6e1900e Add autocomplete entries for the end{} commands 2016-03-17 14:09:45 +00:00
Shane Kilkelly
d655e99439 Parse existing begin commands too. 2016-03-17 12:07:21 +00:00
Shane Kilkelly
eebd25351d Add the custom environments to the list of snippets 2016-03-17 11:23:53 +00:00
Shane Kilkelly
c25c2b676a Parse \newenvironment{} commands. 2016-03-17 11:14:05 +00:00
Shane Kilkelly
115734f82e Rename Snippets -> SnippetManager 2016-03-17 10:04:14 +00:00
Shane Kilkelly
7cc3f7613e Move the getCompletions call for Snippets into the Snippets module. 2016-03-17 10:00:07 +00:00
Shane Kilkelly
2985a0b0b2 Account for later commands on the same line. 2016-03-16 11:42:30 +00:00
Shane Kilkelly
cff00c09b0 Add a '}' at the end of citation autocomplete if required. 2016-03-15 16:02:48 +00:00
Brian Gough
d89e855314 add client-side spelling cache to reduce load on server 2016-03-03 16:00:10 +00:00
Shane Kilkelly
b005f8233e guard against null and undefined keys in \cite{} autocomplete 2016-02-29 15:52:02 +00:00
Shane Kilkelly
2d954baa62 match cite commands like footcite too. 2016-02-22 12:04:15 +00:00
James Allen
835b43cab2 Don't remove replace command so Ctrl+H is an option in Vim mode 2016-02-05 11:15:00 +00:00
James Allen
5cfd4e0d1f Fix toggle comment hotkey for European keyboards 2016-02-04 15:42:54 +00:00
Shane Kilkelly
9880df496f Display ellipsis instead of previous args if they are too long. 2016-02-04 10:49:01 +00:00
Shane Kilkelly
90fd6eb8a1 Autocomplete with many parameters to cite. 2016-02-03 16:46:34 +00:00
Shane Kilkelly
7ef96be7dc Handle cite commands like citep and citet, etc. 2016-02-03 15:08:52 +00:00
Shane Kilkelly
d0835fd2ba Fully enable references autocomplete. 2016-02-03 11:08:51 +00:00
Shane Kilkelly
6866d45c3c Delete dead code 2016-01-26 16:39:47 +00:00
Shane Kilkelly
6e3dba52e5 Set up feature flag for references autocomplete. 2016-01-26 16:35:58 +00:00
Shane Kilkelly
58edb87c61 Dumbest bug ever. Fix latex autocomplete. 2016-01-19 12:58:18 +00:00
Shane Kilkelly
dbbc3bbbbb Fetch the keys when autocomplete is triggered on a cite element. 2016-01-18 10:29:13 +00:00
Shane Kilkelly
6244d013af Null check before regex match 2016-01-14 10:18:12 +00:00
Shane Kilkelly
d5edea77db Put the references autocomplete feature behind a feature flag for now. 2016-01-13 14:42:35 +00:00
Shane Kilkelly
77333c923b Merge branch 'master' into sk-references-ac 2016-01-04 09:37:10 +00:00
Shane Kilkelly
3bd52f4aaf Better matching against keys.
Allows for successive matching as you type.
2015-12-30 11:27:58 +00:00
Shane Kilkelly
7aa8f3a5da autocomplete the cite{key part. 2015-12-30 11:11:30 +00:00
Shane Kilkelly
b0f3d9e6f4 load the keys if the command is a 'cite' 2015-12-29 15:48:42 +00:00
Shane Kilkelly
e94863d026 Get reference keys when project loads. 2015-12-29 13:30:57 +00:00
Shane Kilkelly
a48abcab0b load references keys for autocomplete. 2015-12-29 11:02:59 +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
Henry Oswald
e801f288f2 add tabs to snippets 2015-12-12 11:53:33 +00:00
Henry Oswald
88799fc881 add help link when user needs to refresh page 2015-12-04 08:43:55 +00:00
James Allen
dea97bb9dc Fix bad connection debugging parameters 2015-11-19 13:15:51 +00:00
James Allen
442ae638de Revert "Report unsaved changes after 60 seconds"
This reverts commit 44a7e598f2fdbd91d18cc340de477ca3d33a1338.
2015-11-19 12:04:35 +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
2476c1e868 Report unsaved changes after 60 seconds 2015-11-18 15:23:23 +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
1c9f9274a9 Remove uneeded and now wrong Sentry error capturing 2015-09-08 11:48:39 +01:00
James Allen
25b9a9be19 Upgrade Ace to 'package 11.07.15'
This required a refactor of all code that listen to events changes since the API
has changed. See https://github.com/ajaxorg/ace/pull/1745 for more details.
2015-09-07 17:04:05 +01:00
Brian Gough
92836f49fc avoid unnecessary spell checks on session change 2015-05-11 10:07:11 +01:00
James Allen
87d625b5e0 Delay flushes performed after getting an op acknowledgement as well 2015-04-17 17:32:23 +01: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
Brian Gough
2ed934120c Fix display of annotations when switching files in ace editor
The annotations (error markers) were not preserved when switching
between files.  The setAnnotations method was being called before the
document is ready -- when the document is attached to ace the content
is deleted and reinserted, which caused the annotations to be removed.
To fix the problem we set the annotations after attaching.
2015-04-08 14:39:39 +01:00
Mick O'Brien
9f037384b6 Update word regex for spellcheck
Adds Latin Extended-A characters to word regex to prevent splitting words half way through on characters like ąęćółżźńś.
2015-03-23 16:14:38 +00:00
Brian Gough
6320fcccec remove underscore from pollSavingStatus
the underscore module is not loading in time for some users on MacOS
2015-03-19 14:22:22 +00:00
James Allen
f037c466cd Quieten noisy Ace warnings 2015-02-12 12:17:21 +00:00
James Allen
7dd1ab84d5 Wrap calls to localStorage in an exception handler 2015-02-12 11:32:27 +00:00
James Allen
753a80ada5 Navigate away from deleted docs. Closes #141 2015-02-03 13:51:56 +00:00
Brian Gough
994b307e3f added comment for background polling change 2015-01-26 16:06:50 +00:00
Brian Gough
5050c8c023 optimise common case for highlights (triggered on mousemove) 2015-01-26 15:14:55 +00:00