Commit graph

297 commits

Author SHA1 Message Date
Henry Castro
8a9345e871 loleaflet: add feedback handler
Change-Id: I8ef2c1afe4093e9ee867cd3130c82cbd93362eb9
Signed-off-by: Henry Castro <hcastro@collabora.com>
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2021-08-06 17:21:18 +02:00
Henry Castro
22f06b6a5b loleaflet: add initial iframe dialog
Change-Id: If97f4ec39e1daac7eefc221bb222979de544a260
Signed-off-by: Henry Castro <hcastro@collabora.com>
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2021-08-06 17:21:18 +02:00
Rash419
74844c3dc8 cypress: introducing multiuser tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib6c86d74dd7f0414f3c63ed66e99504c870516a3
2021-07-27 14:58:09 +05:30
Mert Tumer
54ee6c9dc7 perf-tests: calculate some tile stats
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I49e6acc4225478380fdd10a0c325138bfda402bd
2021-07-23 11:45:48 +03:00
Pranam Lashkari
e02e1df76d Introduce Freemium options
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6b68ff74839cf84f2d8c8cfb7d380be9209f923
2021-07-20 14:41:18 +05:30
Mert Tumer
cb5a91cce2 Parameters for perf-test
now it's possible to pass parameters
typing_speed, typing_duration, single_view, node_inspect

also replaced the old perf-test with new-perf-test

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I03f1f14db4ddd9afb9d4a9a60a87c135497db70c
2021-07-16 10:41:05 +03:00
Gökay Şatır
ded14a96c5 IE11 compatibility changes.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: If595e742ecef633741892c4a714f74d93e97c6a9
2021-07-09 21:05:40 +03:00
Gökay Şatır
6e83f0ffa8 Remove AnnotationManagerImpress and AnnotationManagerBase files.
They are replaced by CommentListSection.ts.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I85f9ae49e487fa621376a79812774c1ea2615e9e
2021-07-09 21:05:40 +03:00
Gökay Şatır
fa6a84bb40 Annotation.js: Remove.
It is replaced by CommentSection.ts.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I02338b56e788188c55a1254a69f21943624e5d43
2021-07-09 21:05:40 +03:00
Gökay Şatır
534facef7a Comments: Rename files.
CommentSection => CommentListSection
Comment => CommentSection

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ib90120059330b6969d608be4f4db2a7fe302adc5
2021-07-09 21:05:40 +03:00
Gökay Şatır
597f8defa5 AnnotationManager.js: Remove.
It was used for Writer. We now have CommentSection.ts and Comment.ts
files.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ia2dcf98c17260126c8fb0d4888b3e08efb4639d9
2021-07-09 21:05:40 +03:00
Gökay Şatır
35c9cd9f27 Implement Comment.ts file.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Id452509de5426392e95d36c40ce4bbb5882f9175
2021-07-09 21:05:40 +03:00
Gökay Şatır
ac2f2336fd Introduce CommentSection.ts file.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ie5e157638df043e39bfb8ee042b004fba19113d2
2021-07-09 21:05:40 +03:00
Mert Tumer
a911c31c44 perf-test: Automatize tests
We have to start loolwsd manually in order to
start the testing. This patch covers starting the
loolwsd with custom port seperately and spawning the views in nodejs
instead of in Makefile.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I0af99c2be1d886e11ce4dfaefe9bb07de9be00e8
2021-07-09 11:20:34 +03:00
Tor Lillqvist
f6fe59340b Make a fresh perf-test-edit.odt copy only when needed
Hopefully will reduce the amount of "Document has changed in storage"
irritation if following the progress of the script in a normal
browser. Make a fresh copy manually before running `make run` and
opening the document in your browser.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Icba6dd80fb202fce3f2ff288af0d1759bc7789be
2021-07-07 12:30:06 +03:00
Tor Lillqvist
fd42a96f75 Check if SSL is enabled in loolwsd.xml and use wss: or ws: scheme accordingly
Make load.js take one new first argument: true or false, corresponding
to whether SSL is enabled in loolwsd.xml or not.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ib44cfcf1f05c71acad1d2f6162deb2fdcff18791
2021-07-06 17:02:36 +03:00
Michael Meeks
b3f71ce3a9 perf-test: fire up six views concurrently and position on bookmarks.
Change-Id: If506c3ef7d87492aa13e78b8a6408abf1edca61d
2021-06-24 13:35:55 +03:00
Henry Castro
2f45fa7340 loleaflet: fix mocha tests
Error: No test files found: "mocha_tests/**/*.js"

Change-Id: I57e86689011dceebd1100005b8e800b6155bb7c1
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-06-14 14:15:33 -04:00
Henry Castro
a11cc85a99 loleaflet: fix overriding recipe for target 'check'
warning: overriding recipe for target 'check'

Change-Id: I9584ffaa9258d779a4e6da3de8838729fec54e5e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-06-14 10:29:11 -04:00
Michael Meeks
05c9ab54dc Update perf test, and add make perf-test rule.
Change-Id: I473550b82e0f0e64b89320329b648005509d7215
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-14 09:31:46 +01:00
Pranam Lashkari
3da4101d13 Do not include js files in TS compilation
problem:
in compilation tsc removes blank lines from the file
this causes problem in debugging and mapping with IDEs

https://github.com/microsoft/TypeScript/issues/843

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie2df89ba09597a34aca9221bf082b1f2df3c7d07
2021-06-02 14:16:10 +05:30
Szymon Kłos
5c79418507 sidebar: introduce js based sidebar
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iad92dfd61014b10453966d1d9c024a2ba61b3628
2021-05-28 22:11:19 +02:00
Henry Castro
b9f71867c2 loleaflet: fix node_modules dependency
No more crazy hacks, I hope now it is understandable

Change-Id: I9004787ebf2087f541bec0248bd873252c88a40d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-27 14:21:06 -04:00
Henry Castro
3e61c679ea loleaflet: fix builddir != srcdir
ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin"

Change-Id: Ic6fc9660628ab9ef7ebfa4cb50a2595be5195b49
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-27 09:56:29 -04:00
Henry Castro
d000a78d27 loleaflet: fix builddir != srcdir
error TS2503: Cannot find namespace 'NodeJS'

Change-Id: Id4f9fba48095d80725de97ef3bc464602707bf91
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-25 08:27:16 -04:00
Andreas-Kainz
9b652a5e4d CSS color-palette vars are within a separate css file
move loleaflet.css .root color varaibles into a separate color-palette.css file so all var colors are at a dedicated file and branding is easier.

Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
Change-Id: I6fe879fbb09e2d5170c028820974bdda0466805d
2021-05-24 13:40:20 +02:00
Tor Lillqvist
37e01c064c Enable building the iOS app completely on macOS
The intent is that it should no longer be necessary to do the
JavaScript part on a Linux machine. For the configury and "make" part,
mostly just some minor portability issues had to be handled:

(But it is still possible to do it the old way, too. This is mostly to
not have to bother with installing Node.js on the CI macOS machine
now.)

The readlink command on macOS has no -f option. But that use of
readlink is not necessary anyway in a tree for building a mobile app,
so bypass.

The find command on macOS always requires at least one directory name.
So when $(CUSTOM_ICONS_DIRECTORY) is empty the "find
$(CUSTOM_ICONS_DIRECTORY) -name '*.*'" command produced an annoying
error message. Handle that in a trivial way.

The echo command in /bin/sh on macOS does not have the -n option. Use
the more portable printf command instead.

To then configure and run the make (before you can do the actual build
in Xcode9, you need have Node.js installed. Personally I just
downloaded the macOS Node.js binary tarball and unpacked into
/opt/node so that /opt/node/bin/node and /opt/node/bin/npm are the
relevant executables.

You will also need to add the lxml and polib Python modules to your
user Python module library with pip3, as in "pip3 install --user lxml"
and "pip3 install --user polib".

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I263a318181125fa37ac174fa36cb0e44e56a6607
2021-05-24 11:12:39 +03:00
Michael Meeks
aeb10dbbb0 Remove obsolete client-side leaflet grid-lines layer.
Change-Id: I290563263d5926f19173a6197ca6697f21334859
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-04 13:02:19 +05:30
Michael Meeks
64ab87f65c Restore missing rule to populate DIST_FOLDER with js.
Used by android to build the JS it desires. We lost that in c6f2e2211d

Change-Id: I4b790a300aee66628baa2e5a2997685c42f709fa
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-04-28 06:57:40 +01:00
Andras Timar
c4d48be9de Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2e9de81c8532d5d184fb169f3cc78f5fdb3660af
2021-04-16 22:08:09 +02:00
Michael Meeks
ce13c82d99 Restore JS / TS file ordering.
We badly need to preserve the ordering of files in the WEBORDER,
but also to be able to treat them differently.

Allow both the m4 concatenation for bundlifying and also the
HTML script substitution to use the files in the right order.

Change-Id: If2a1b32548e1086b18395385fb512e9d39978406
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-04-16 15:21:44 +01:00
Michael Meeks
0a62014746 Fix tscompile.done dependencies, and remove wildcards for ts/js files.
Get dependencies right for tscompile - to point to dist/ and not src/

Use _WEBPATH to codify the paths and order of the served HTML.

Switch back to shell/find for findign js and ts in any order.

Change-Id: Ida6cd1a505376099551821e86144410ff75eca6b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-04-16 12:20:42 +01:00
Michael Meeks
9fcac56459 Detect obsolete generated .js files in the source tree.
Created or dropped in the wrong place in the past, or not
removed when converting to typescript.

Change-Id: Ifb67c8b0ad3a543069e3478dc4f85785d0c67268
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-04-15 17:48:35 +01:00
Michael Meeks
c0bd8182f0 Ensure that we compile typescript even for product builds.
call prereq_loleaflet was not helping us here.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Id39a8ae53b47e2001a1b8995b34ac7108420d107
2021-04-15 16:39:44 +01:00
Ashod Nakashian
7b7cc141dd leaflet: make: cleanup timestamp files
Change-Id: Ida77111d78b52653142f15c8866409cb573807bb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-11 01:05:20 -04:00
Dennis Francis
47bc41d734 avoid vscode errors in tsconfig.json...
by moving allowJs and checkJs out of tsconfig as vscode assumes default
outDir and rootDir which we can set only via cli call to tsc as they are
makefile configurables.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I3ba3bc98018c6d738c8767ff9f4affc3c33602c3
2021-04-08 14:05:54 +05:30
Dennis Francis
c6f2e2211d typescript: do project level compilation for ts files in src/
There may be warnings on first run after application of this patch due
to ts->js files present src/ due to previous per file compilation.
Cleaning those files will get rid of the warnings.  These are removed
from .gitignore files to avoid confusion.

Now we rely on tsc to do the incremental builds so it is much faster.
Checking of js files is disabled for now as it reports a lot of type
errors.

Caveat: Compilation of mocha tests, admin (those outside src/) are still
using the file by file compilation.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ic22b265de0b111165224885c4736486fffa016d8
2021-04-08 14:05:54 +05:30
Gökay Şatır
6973bc0b87 Calc: Add AutoFillMarkerSection.ts
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I5e934cb8eb7113390194c083a65b1580df7ee179
2021-04-02 10:10:15 +03:00
Gökay Şatır
a15597de9c Merge GridLayer+TileLayer+CanvasTileLayer
Some of the functions were overwritten by the child classes. They are
removed.
CanvasTileLayer was experimental when we first created it. But now it's
used for all document types.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1687c8d3e00d24a0bb2031ab74e4a3af044d9ca7
2021-03-30 14:36:05 +03:00
Dennis Francis
13c6f68438 migrate cursor and view-cursor to TS Cursor implementation
and remove L.Cursor class.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I96fa158cbbe90ddc0f0b3cdd98cfc6615c2dfd4f
2021-03-04 15:06:02 +05:30
Dennis Francis
11bddcb3d1 Introduce TS Cursor class based on L.Cursor
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I1c9c0c9ed50956e9151b8028b5c5fe38f73a8097
2021-03-04 15:06:02 +05:30
Dennis Francis
675963f22b migrate splitter lines to canvas overlay section
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I983eedbb946d640498e63660e948d09dd838f2b1
2021-03-04 15:06:02 +05:30
Gökay Şatır
52759920a5 mCustomScrollBar: Remove.
It's not used anymore.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I4424018e6b1820de0d86c9058207fe19f46e0c16
2021-03-03 14:04:11 +03:00
Gökay Şatır
b9e50b7de6 Control.Scroll.js: Removed.
ScrollSection.ts is the updated version of this file.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I484dcb7eafdc3ca62ba4d8ad864e0de711567d66
2021-03-03 14:04:11 +03:00
Gökay Şatır
1bf9a9a9e9 scroll-container: Remove references.
This class was used by mCustomScrollBar.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Id912677c3fa2cfdfa6cd5824975d8630ec6a2ac7
2021-03-03 14:04:11 +03:00
Gökay Şatır
3d507fb3a5 Control.Scroll.js: Move to typescript.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Iac7c15fa5ea1fb8fe78119ea28032017552d93d4
2021-03-02 09:25:41 +03:00
Gökay Şatır
84e1d855d0 loleaflet: Makefile bug.
All ts files were being compiled upon a change on one of them. Bug
solved.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I3137d07e7ddf43076bf8b55fbacba1caef6f19cd
2021-03-02 09:25:41 +03:00
Szymon Kłos
bf62ad5acb notebookbar: added for draw
Change-Id: I9caf00f1b02ebbf0820051d8e44721a8eb4549fd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-01 13:58:14 +03:00
Dennis Francis
02c64ead85 mocha-tests: compile only the changed test files
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I99b033888006370c4511f54c8fd7312007a4c984
2021-02-15 16:38:53 +05:30
Dennis Francis
8b2eae423c setup mocha framework for testing TS classes/functions
... and add a few test-cases for CPointSet.empty()

* The tests are written in TS and compiled to JS before Mocha framework
  runs them using 'npm test' via 'make check'.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I16e28404af76754b6bbb67c6743ca7d0f2701233
2021-02-12 12:02:13 +05:30