Commit graph

14344 commits

Author SHA1 Message Date
Pedro Pinto Silva
89442173fc NB: Improve alignment by removing extra margin..
from nav when in edit mode (keep margins when on readonly mode)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I83923bbb34e34c20daa81e80c5832778faab8e1b
2021-02-17 14:47:07 +01:00
Pedro Pinto Silva
fd62fc1aaf Partly revert cb27d2c ..
- Fix #1395
- This was also affecting iPad
- Overflow property doesn't apply to some table elements like table grouping and containers by default.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2e12c3cb1e5e2ced16748e79063774502c670946
2021-02-17 14:47:07 +01:00
Dennis Francis
2d169bf32a add cypress checks for canvas-overlay items
Currently only the cell-cursor and document selections are part of the
canvas overlay. The others are still part of svg layer.

For now only the bounds of the canvas-overlay items are asserted. The
canvas overlay items update their bounds data as JSON text on cypress
only divs inside the overlay section div every time there is any change.

Unlike cell cursors, the selections need not be always a single
rectangle. To add tests for the more general cases, the json format of
test data is helpful.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I70e6328116c44317f31deb9c8bea62e781d8c421
2021-02-17 19:13:49 +05:30
Tamás Zolnai
f8f6509745 cypress: put wsd related logs into cypress folder.
Workdir folder is for the build system, and for copies
of data files. cypress folder it for output of tests, like
videos, screenshots, cypress logs. So let's put wsd related
logs here too.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Icdb757d50d3c2bfef6013b92055b49ba222193e2
2021-02-17 13:37:31 +01:00
Tamás Zolnai
5dadd2c545 cypress: put copy of a test file under data subfolder of workdir
To make workdir structure easier to understand.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I1d0d8a16bd12cf9fc9abf9d350509f20ad322a7a
2021-02-17 13:37:31 +01:00
Tamás Zolnai
f265803d19 cypress: fix wrong description.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I224800daefca34e8c415ad251c7583b4cec34a50
2021-02-17 13:37:31 +01:00
Gökay Şatır
467dc94921 CanvasSectionContainer: Improve anchor property.
Now, sections can be anchored to other sections's edges.
One does not need to set approximated initial positions for expandable sections any more.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ic012960dedbd937c19c7442cefefdfebdaffafd3
2021-02-17 10:39:23 +03:00
Gökay Şatır
a591bc677f CanvasSectionContainer: Drag distance check is updated.
It wasn't detecting negative values.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I93a633e84828ef18d1b4fc4246065421e63748b9
2021-02-16 18:08:29 +03:00
Tamás Zolnai
219af45449 Revert "cypress: print out test failure output online during parallel build."
It can be confusing to have the same error message twice.

This reverts commit 6786f563f8.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I66f0495262fc5e5c0a228fdfc417e2e3301ad03e
2021-02-16 16:06:48 +01:00
Ashod Nakashian
a350dad19b wsd: Save -> Upload in StorageManager
We use download/upload in the storage
and load/save elsewhere, to avoid confusion.

This renames 'save' to 'upload' in the storage
for consistency.

Change-Id: I9ac991c2b52e2586b97c58db02110ff04bfd17d3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-15 09:54:41 -05:00
Ashod Nakashian
81da7c7bff wsd: download templates by wsd
Templates were downloaded by Core
upon loading. This works fine, as
long as there is no special network
setup in loolwsd. However, when
loolwsd has a complex network setup,
such as when using reverse proxies,
Core wouldn't know about the details
and would likely fail to download
the template.

Luckily, there is no reason to rely
on Core for downloading templates.
Instead, we download it in loolwsd,
just like any other document, and
load it in Core as normal. The
remaining post-load saving of
templates remain unchanged.

Change-Id: Ib22ada4ae469863d5e5c8baeee27f667f7cd40ff
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-15 09:41:17 -05:00
Ashod Nakashian
d83a203ebe wsd: simplify UnitWOPITemplate
Change-Id: I934223150a391c8fed3f87c8eb6ee2a196ae8932
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-15 09:41:17 -05:00
Tamás Zolnai
27dba59e10 cypress: add a test case which triggers assert related to sidebar cache.
This assertion is triggered by interference testing:
make check-interfer-desktop spec=calc/tunneled_dialog_spec.js

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ib16c97d7c45192a493720d028f38eb5efba4346f
2021-02-15 12:46:41 +01:00
Dennis Francis
7836b48c98 add CBounds.parse() tests
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I4ebed2f756d083e1dab411a21a976399cd945a47
2021-02-15 16:38:53 +05:30
Dennis Francis
7e8975dc23 missing header selections: set proper unit converter
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib4f4fa326996ed29e044e392e58b19b342927cba
2021-02-15 16:38:53 +05:30
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
abf0b6d14f do not draw tile-section when in zoomAnimation
During zoom-animation, the map zoom is still the prezoom level hence the
painting will conflict with zoom-frame painting.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib0fc5a3e4ab5e1b5dfc8410af0beaca5b90036ab
2021-02-15 16:38:53 +05:30
Dennis Francis
f9bc14b4ac on zoomanimation pen position should be in tilesection
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I630e628566d4c05c203a784e645d160c0176da10
2021-02-15 16:38:53 +05:30
Ashod Nakashian
6d11e400a7 wsd: userName is optional
This resolves a dependency on userName
(a.k.a. UserFriendlyName) that was a source
of issues when missing.

It turns out that when it's missing but
spellOnline is set, an edge-case caused
an exception that failed loading.

The spellOnline value, in its turn, was
incorrectly set to "null" when in fact
it was missing. This resulted in online
spell-checking being active by default.
Perhaps this was intentional, but here
we don't change this behavior at all.
Instead, we avoid sending "null" when
it's missing, and by default we always
enable online spell-checking, unless
it is explicitly set to "false".

This way, the exception is not thrown
and spellOnline doesn't have invalid
values, while preserving the current
behavior.

Change-Id: I4a09ac44ff5d6147c715afa0fb34af9650da4afd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:48 -05:00
Ashod Nakashian
725f19ab4d wsd: encapsulate common request members
Instead of inheritance we use composition
to preserve the uniqueness of the members
of SaveManager and StorageManager.

Change-Id: Ifad82787e54089d49226085e009ade67bfc7938a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
0a8eaff48b wsd: track the timestamp of the uploaded file
This will be used to detect whether we need
to upload the document or not.

Change-Id: I2c5f6d058b1a8e0a6ab20c9561b6701413fb5878
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
9a040ac815 wsd: add fixme/todo for forced uploading
Change-Id: Ic6c0a50c6ee493625fe7efae3b98fdd5f52344a8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
e5d33a7f3e wsd: lift lastStorageUploadSuccessful into RequestManagerBase
Change-Id: I06eba0b539ecc0586be3aea178120f23762229d3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
8046de6146 wsd: lift ModifiedTime into RequestManager
Change-Id: Id02f7ba58e96b6b93d38cfe8f15c74ce2553517d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
4282f5b10a wsd: introduce RequestManager
This is to encapsulate and track the
common logic between SaveManager and
StorageManager.

Change-Id: I0c5a59edb8a26b258ba66d65983e2f76198ecbc9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
8035c99f3b wsd: move lastSaveTime into StorageManager
Change-Id: I74f4bdf00e94a7010ff8f7a9389613beedb64fad
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
92487cfa5d move lastStorageUploadSuccessful into StorageManager
Change-Id: I33a64b9bbb596bcd819adbfd5d7dcee0180bb5fb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
6bfbcf7a5f wsd: move documentLastModifiedTime into StorageManager
Change-Id: Ib33e5d142ce59b8d57177b1fd91cc309063a2d59
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
4fc574e539 wsd: introduce StorageManager
This is to encapsulate and track the logic
for uploading documents from the Storage.

Change-Id: I5b972151fe9548526755d18063d37cc95949e68f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
55b49a3c14 wsd: separate save handling from save-as and rename
We should only update the save timestamps when we
really save a new version of the document.

Requesting renaming or moving ("save as") in storage
should not be confused with actually saving in Core.

Here we take the first step in this separation,
and we only update the last save response time
when we truely get a response from Core, and
not when we execute a document path/name in storage.

Change-Id: I931c62b306dd3b4906a9e910f844a35fb3f4b6f0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
d8cddcea06 wsd: lastFileModifiedTime -> modifiedTime
The SaveManager is responsible for the file on disk.

Change-Id: I92f7843375fdc875bc7d1af3fba387f67a4f0ca5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
d806353af1 wsd: move lastFileModifiedTime into SaveManager
Change-Id: Ic3dd4f193e1676a47288bc77e75f6643438bafc7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
76be0d562b wsd: move save tracking into SaveManager
Change-Id: Ic98cc50469f1e25bb2e007554e1d9d42e020dc91
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Ashod Nakashian
ea96f43df9 wsd: introduce SaveManager
The SaveManager is responsible for the document's
save state. It also encapsulates the members
necessary to track the save state and related
data.

Change-Id: I3ed0f1d93f25988b1ad8b1a121a2080288866a53
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-13 13:25:36 -05:00
Andras Timar
e5adc33a32 set the StartSlideNumber URL parameter properly
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I51e95aa9d97a579bcba8a4c8127f2e2912238b77
2021-02-12 16:31:15 +01:00
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
Dennis Francis
a084eafbe7 move CPointSet class to its own file
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I64e7c4d66560e309a7be670e0d0f76bccf20bfa0
2021-02-12 12:02:13 +05:30
Dennis Francis
57ef1e2fde remove generated CanvasOverlay.js
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I454384303f4b3855f34b870ef1ccfaee59f40bc9
2021-02-12 12:02:13 +05:30
Rash419
c32395ba27 added a separate option in debug mode for sidebar invalidation re-rendering debugging
Signed-off-by: Rash419 <rasheshpadia419@gmail.com>
Change-Id: I631e45c2c364522eb6b9875ff35c243db0673f35
2021-02-11 17:47:22 +00:00
Gabriel Masei
877ce2faf5 loleaflet: add support for changing ui mode dynamically
Signed-off-by: Gabriel Masei <gabriel.masei@1and1.ro>
Change-Id: Id84a4feb8f37357d7de8f9cfebea3612751709b1
2021-02-11 12:33:11 +01:00
Szymon Kłos
4f40126c7f jsdialog: handle ESC key to close
Change-Id: I6e9562c5330c3e56a84da384d6a6868625d12878
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
8df1e6e0ce jsdialog: don't override ok button
Change-Id: Id1c7c20c8bb6bf25c002fd106e90a9897ff53883
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
029450c166 jsdialog: check radio/checkbox also if clicked label
Change-Id: I0f7188aa6500c308a86e7f314949daedcfcfe237
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
d89964af65 mobile-wizard autofilter: don't override main container with submenu
Change-Id: Ife89dd6b8a167f06477aaccdcd944e1f178ed110
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
4e2131b1f6 mobile-wizard: avoid scrolling when adding new elements
when partial update creates bigger element than view
it might scroll down the content

Change-Id: I63cdfe9176d224594b4b737f0883ded8bdc6c878
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
65fdb1e234 Make hyperlink handler work globally
TileLayer is not initialized when Macro Security warning
is shown - so move to the socket so it can be handled.

Change-Id: I16493d80386c7814ba11d5acc5fa6944f58accf8
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
357cb8b22e Allow to show help in global callback
This is needed to show help in macro security warning
dialog which is showed before the document is loaded.

Change-Id: Ic50bac0c860c5673ce3ec854e54d658157d2a9dd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
a35256f803 jsdialog: handle standard buttons
Standard buttons like help or cancel can be not
wrapped with jsdialog weld wrapper so click action
will be not performed correctly. For standard buttons
we have to send correct response to the dialog.

Change-Id: Ib4d42e53f4789bd12ad83404796f6d7a4ce19ef4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
2105c11bee jsdialog: don't leave focus if dialog opened
+ if jsdialog or tunneled dialog is open
  don't steal focus by CellCursor state update

Change-Id: I425ee5e0a96521d8fbdc5dd235defe247f2cf9cb
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00
Szymon Kłos
b7c6682a24 jsdialog: send entry text on keypress
Change-Id: Iac3361ccc164fe6ed7ef2eb6229588e159bc8ccd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11 12:32:41 +01:00