Commit graph

1464 commits

Author SHA1 Message Date
James Allen
29d2b408ad Don't error when detaching from history with no sharejsDoc 2018-02-13 08:43:00 +00:00
James Allen
5d3ecdb924 Add explicit editor init event 2018-02-13 08:27:48 +00:00
James Allen
3802df5cfa Use popup instance variable like Ace autocompleter does 2018-02-13 08:27:41 +00:00
James Allen
5d6925921c Fix read only links 2018-02-12 10:42:57 +00:00
Alasdair Smith
6088fcf82b Merge pull request #310 from sharelatex/ja-link-sharing-tweaks
Link sharing UX improvments
2018-02-09 11:23:28 +00:00
Alasdair Smith
7ff0f40477 Merge pull request #266 from sharelatex/as-cm
CodeMirror
2018-02-09 11:23:11 +00:00
Alasdair Smith
bfda9c595b Hide rich text behind feature flag 2018-02-09 10:42:11 +00:00
Alasdair Smith
4c23a3c8f0 Fix bug where spell check cache would error when toggling between ace & cm 2018-02-09 10:42:11 +00:00
Alasdair Smith
d15efc6fb6 Create cmEditor directive to connect to ShareJS 2018-02-09 10:42:11 +00:00
Alasdair Smith
b9327cb2d4 Add toolbar with button to toggle rich text 2018-02-09 10:42:00 +00:00
Alasdair Smith
7783e18a50 Allow Documents to be attached to CM 2018-02-09 10:38:51 +00:00
Alasdair Smith
09fbafa1f6 Include ShareJS CM adapter in compiled lib and fix bug with CM adapter
Because the CM & Ace scripts are naively concat-ed together, the Ace
applyToShareJS function would be overwritten by the CM version.

Also fixes bugs where adapter was calling old version of ShareJS api
and the old CM api
2018-02-09 10:38:51 +00:00
Henry Oswald
ba1e45d12c Merge pull request #317 from sharelatex/ho-nice-recaptcha-message
improved recaptcha error message
2018-02-09 10:26:33 +00:00
Henry Oswald
696e9d27d6 send invalid_email error type down when sharing project 2018-02-08 10:35:18 +00:00
Brian Gough
b083e4bc5f remove redundant MAX_PATH definition 2018-02-07 16:14:56 +00:00
Brian Gough
c14380d563 use the SafePath.coffee file in the client too 2018-02-07 15:50:29 +00:00
Henry Oswald
a52aed9070 improved recaptcha error message
- works on register and share project
- decided not to go down i18n for register, would be scope creep on async form
2018-02-07 14:15:13 +00:00
Brian Gough
76281a3d79 use extended file validation rules in frontend 2018-02-06 11:46:50 +00:00
Brian Gough
ddf1d6e65e add valid-file directive for front-end 2018-02-06 11:46:50 +00:00
James Allen
37115b8408 Add loading indicator while server returns links 2018-02-06 10:00:59 +00:00
James Allen
e7ba75c2e5 Don't show pop-up when changing link sharing status 2018-02-06 09:56:46 +00:00
James Allen
9e5c98dd07 Use local references to variable 2018-02-01 16:52:43 +00:00
Shane Kilkelly
19c97cb15b Merge pull request #289 from sharelatex/afc-track-edit-sessions
Send editing session heartbeat to the analytics service
2018-02-01 12:31:38 +00:00
Brian Gough
5e52ade1ff Merge pull request #286 from sharelatex/bg-prevent-duplicate-filenames
prevent duplicate filenames
2018-01-31 11:50:45 +00:00
James Allen
9a9938083c Merge pull request #267 from sharelatex/as-remove-rollout
Remove rollout logic for auto compile and link sharing
2018-01-31 10:27:09 +00:00
James Allen
aa6c16593e Add renamingToName override name for instant apparent renames 2018-01-31 09:42:41 +00:00
James Allen
9721dffbb6 Add missing state reset to error handler 2018-01-31 09:41:58 +00:00
Brian Gough
1c6dc66ed1 prevent double calls to rename 2018-01-29 16:45:59 +00:00
Brian Gough
6ed181d52c fix check for name in filetree move 2018-01-29 15:27:52 +00:00
Brian Gough
63fa024d98 client-side duplicate check for move/rename/create 2018-01-29 15:24:51 +00:00
Brian Gough
8e239e0c64 only update client filetree on success 2018-01-25 17:09:31 +00:00
Alberto Fernández Capel
839ea496f1 Track clicks anywhere on the window as activity when the editor is open 2018-01-25 16:32:00 +00:00
Alberto Fernández Capel
a68489a604 Track session activvity if the user scrolls the editor 2018-01-25 16:10:47 +00:00
Alberto Fernández Capel
7d0d18ea5e Use the cursor:editor:update event to track user activity
It is strictly a superset of the change event we were using
before: if there's a change, there will be always a cursor
update, but there can be cursor updates (like when the user
presses the arrow keys) that don't change the document.

This is coherent with what we do to track user activity at

dfb9943521/public/coffee/ide/connection/ConnectionManager.coffee (L49-L50)
2018-01-24 17:20:30 +00:00
Alberto Fernández Capel
8a1523cc03 Read project id from the global window var 2018-01-23 15:58:59 +00:00
Nate Stemen
ea5063d7ea dont return needsClosingBrace from Helpers 2018-01-23 09:35:24 -05:00
Nate Stemen
91302cfb16 move end bracket logic to helpers and remove unecessary unpacking 2018-01-23 09:35:24 -05:00
Nate Stemen
30eca714eb fix random things with snippets 2018-01-23 09:35:24 -05:00
Nate Stemen
d2adc753aa use helpers to see if there is '}' already 2018-01-23 09:35:24 -05:00
Alberto Fernández Capel
0bef5531bb Rename editSession -> editingSession 2018-01-23 10:29:11 +00:00
Alberto Fernández Capel
868e32c1bc Send edit sessions heartbeat to the analytics service 2018-01-22 15:10:52 +00:00
Alasdair Smith
4d29c4d769 Remove unused link sharing onboarding now at 100% 2018-01-17 15:18:40 +00:00
Alasdair Smith
45de9bb5dc Remove unused autocompile rollout logic now that at 100% 2018-01-17 15:17:55 +00:00
James Allen
6d04eeaa03 Merge pull request #256 from sharelatex/ja-display-v2-history-users
Inject v2 user details into project-history updates and diffs
2018-01-15 14:21:14 +00:00
James Allen
662122bb1c CI and local dev environment improvements
The need for this became very noticeable due to the slowness of filesystem access in docker-in-mac, with a full compile taking over a minute for me in docker. Using make to introduce incremental compile makes this near instantaneous outside of docker (if only a few files have changed), and quick enough inside docker.

With incremental compile via make, it compiles quickly enough that re-compiling and restarting the web service automatically when backend files change is quick enough now. This is how the service is run via docker-compose in https://github.com/sharelatex/sharelatex-dev-environment, so it shouldn't be necessary to manually restart the container each time a coffee file changes.

At the moment Jenkins pull web modules in via the GitSCM plugin, but I believe this is creating a dependency in Jenkins, where any commits to any of the modules causes all of the web branches to rebuild. By doing it via our own scripts we can hopefully avoid this. It also creates a build process which is reproducible locally.

**Note that at the moment in this PR all modules pull from `ja-dockerize-dev` branches, but these should be merged first, and this PR updated to point to the master branches before merging**. This is necessary for other changes to build process/docker-compose workflow.

As well as a Makefile for web, there is now a `Makefile.module`. This is copied into each module directory by the top-level Makefile, and is written in a way to be flexible and support unit tests, acceptance tests, front-end js for the ide and main, and the modules `app/coffee` directory, while allowing modules to have some of these missing (not all modules have e.g. acceptance tests, or front-end JS). This will allows us to refine the build process in future, without needing to update the Makefile in each module repo separately (I found this to be a painful part of this development).

This makes web compatible with the docker-compose workflow at https://github.com/sharelatex/sharelatex-dev-environment, where each service is running in its own docker container, with networking managed by docker.

Previously the Makefile was set up to run unit tests in docker with `make unit_tests`. This now just runs them natively. In the CI, they are run in docker anyway (all steps in Jenkins are), and locally, they run fine natively with `npm run test:unit`, or can be run in docker via https://github.com/sharelatex/sharelatex-dev-environment with `bin/run web_sl npm run test:unit`.

Previously we did a lot of juggling with only mounting source files (coffee, less, etc) into the docker container for acceptance tests. This was to avoid creating root owned files if the whole directory was mounted. Now instead the whole web directory is mounted read-only, with the compilation step done outside of the container before running the tests.

This allows the host and container to share the `node_modules` folder as well, which avoids needing to `npm install` twice on the CI box, and should speed up the build by a few minutes.

On macOS, this would cause a problem with compiled modules if you tried to use the same `node_modules` to run the app natively. However, if running via docker-compose in https://github.com/sharelatex/sharelatex-dev-environment, this is no longer a problem.
2018-01-15 09:36:41 +00:00
James Allen
17a5dfa5a5 Inject v2 user details into project-history updates and diffs 2018-01-11 11:32:16 +00:00
James Allen
79055d0e8d Merge pull request #243 from sharelatex/ja-dont-show-binary-diffs
Show apology message instead of raw binary files
2018-01-11 08:42:13 +00:00
Nate Stemen
c43aa54bee Merge branch 'ns-fix-package-command-meta' 2018-01-08 08:53:42 -05:00
Nate Stemen
7af615ff6c Merge branch 'ns-no-duplicate-packages' 2018-01-08 08:53:07 -05:00
Nate Stemen
cf4d6c1165 Merge branch 'master' into ns-no-duplicate-packages 2018-01-05 11:46:44 -05:00