Commit graph

6041 commits

Author SHA1 Message Date
Brian Gough
b537747ccd check for duplicates in putElement 2018-01-24 10:07:42 +00:00
Brian Gough
77adb60a8a fix typo in project getter exclusions 2018-01-24 10:06:53 +00:00
James Allen
28deb4e107 Merge pull request #292 from sharelatex/ja-v1-ownership
Fallback to project creator when there is no owner
2018-01-24 09:50:20 +00:00
Alberto Fernández Capel
8a1523cc03 Read project id from the global window var 2018-01-23 15:58:59 +00:00
Alberto Fernández Capel
4ca71fb379 Do not track anonymous sessions
And DRY the controller a bit.
2018-01-23 15:51:10 +00:00
James Allen
a558d05ac6 Only show import modal for owned projects 2018-01-23 15:12:00 +00:00
Nate Stemen
81406d1f49 Merge pull request #283 from sharelatex/ns-fix-package-insertion
fix package inserstion; fixes #207
2018-01-23 09:45:39 -05: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
James Allen
d7706f642b Show the creator as the owner if no owner present 2018-01-23 13:47:48 +00:00
Alberto Fernández Capel
8714909a9a Build query string with style 2018-01-23 12:47:51 +00:00
James Allen
08593f1f4b Merge pull request #290 from sharelatex/revert-258-ja-allow-v1-imports
Revert "Go back to allowing v1 projects to be imported"
2018-01-23 11:51:37 +00:00
James Allen
ce9a1fec87 Revert "Go back to allowing v1 projects to be imported" 2018-01-23 11:49:33 +00:00
James Allen
a5195fcbc3 Merge pull request #285 from sharelatex/hof-modal-success
Stop import modal button flicker
2018-01-23 10:35:37 +00:00
James Allen
d5c5d9c204 Merge pull request #268 from sharelatex/as-unsupported-project-error
Adds UnsupportedBrandError & UnsupportedExportRecordsError types
2018-01-23 10:30:33 +00:00
James Allen
2fb4059633 Merge pull request #258 from sharelatex/ja-allow-v1-imports
Go back to allowing v1 projects to be imported
2018-01-23 10:30:23 +00:00
Alberto Fernández Capel
b3b05d1af3 Disable the trailing throttle event in the editing session heartbeat
Throttle sends an event as soon as the function is called. Then
we wait X minutes, but we only want to send another event if
there's any activity *after* those X minutes.
2018-01-23 10:29:11 +00:00
Alberto Fernández Capel
8dbb89c09e Add test for the updateEditingSession endpoint 2018-01-23 10:29:11 +00:00
Alberto Fernández Capel
0bef5531bb Rename editSession -> editingSession 2018-01-23 10:29:11 +00:00
James Allen
98c620a99b Revert "Install webpack and babel"
This reverts commit 5cfd0ac2d21be5ea0049ced4e522c7a57ddae0c1.
2018-01-22 17:52:39 +00:00
James Allen
a84cc16ce2 Merge pull request #287 from sharelatex/ja-fix-delete-endpoint
Fix call of UpdateMerger.deleteUpdate in TpdsController.deleteProjectContents
2018-01-22 16:47:05 +00:00
James Allen
77d16de759 Merge pull request #263 from sharelatex/as-fix-faq-link
Fix v2 faq link
2018-01-22 16:42:34 +00:00
James Allen
d79d6b4ede Fix call of UpdateMerger.deleteUpdate in TpdsController.deleteProjectContents 2018-01-22 16:25:11 +00:00
Alberto Fernández Capel
868e32c1bc Send edit sessions heartbeat to the analytics service 2018-01-22 15:10:52 +00:00
Alberto Fernández Capel
1a1ccc9f46 Remove trailing whitespace 2018-01-22 15:00:56 +00:00
James Allen
3ac4e4c457 Run docker-compose down before acceptance tests 2018-01-19 12:42:49 +00:00
Hayden Faulds
445ed4d604 fix ng-disabled in v1ImportModal 2018-01-18 16:44:32 +00:00
Alasdair Smith
89af8ba123 More renaming 2018-01-18 16:41:26 +00:00
Alasdair Smith
f8a068ee9e Rename to be more explicit about the error 2018-01-18 15:42:32 +00:00
Alasdair Smith
649ca86a75 Add publisher exports error type 2018-01-18 15:41:14 +00:00
Alasdair Smith
f234e84c95 Export error 2018-01-18 12:09:33 +00:00
Alasdair Smith
950ef0cebb Add unsupported project error 2018-01-17 17:50:09 +00:00
Alasdair Smith
06e2f0df1c Remove unused styles for auto compile & link sharing onboarding 2018-01-17 16:04:10 +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
Alasdair Smith
89205092b6 Fix v2 faq link 2018-01-17 11:41:25 +00:00
Alasdair Smith
cd4d27c587 Merge pull request #260 from sharelatex/as-webpack-2
Webpack build (take 2)
2018-01-17 09:52:33 +00:00
James Allen
c466025df4 Go back to allowing v1 projects to be imported 2018-01-16 09:40:58 +00:00
Alasdair Smith
4a0628d801 Remove unnecessary test script 2018-01-15 16:23:10 +00:00
Alasdair Smith
984ecae200 Rename directory to es to align with coffee dir 2018-01-15 16:23:10 +00:00
Alasdair Smith
dadd74e730 Move public path to dev config 2018-01-15 16:23:10 +00:00
Alasdair Smith
4642d55b7b Add basic example script 2018-01-15 16:23:10 +00:00
Alasdair Smith
49c27c4c7a Port webpack config from OL 2018-01-15 16:23:10 +00:00
Alasdair Smith
9fbd7f2818 Install webpack and babel 2018-01-15 16:23:10 +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
67061154fe Merge pull request #237 from sharelatex/hof-editor-controller-locking
Project Locking: EditorController
2018-01-15 14:21:03 +00:00
James Allen
7de4df9702 Merge pull request #250 from sharelatex/ja-dockerize-dev
Improve local and CI build processes and make compatible with docker-compose workflow
2018-01-15 09:41:55 +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