Commit graph

15881 commits

Author SHA1 Message Date
Pedro Pinto Silva
5519835ec8 Spinfield: Mobile rules should not affect sidebar
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I40940cc10a89f5fe75e95cee08d0bdb23637d2f0
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
ec64586629 JS Sidebar: Style and layout fixes
- Sidebar parents: be sure it's container childern is always full width
- Sidebar parent: Fix margins vs paddings
- Expander: Decrease color contrast so to avoid to be in the way of the
actual components
- Fix expanders (arrow) position and paddings
- Use CSS vars
- Fix and style listbox and spinfield to be slimmer and more compact
than the regular ones (crucial here to effectivly use space)
  - Some of these things should be ported top the general jsdialog css

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I50def4b41144d56a3cc2de41b3ed00ed550fa74d
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
96439dfcd7 JS Sidebar: Animate and add default options
- Add lateral animation so the users understands that it is in fact a
sidebar
- Also that animation should help with the way toolbars and sidebar
appear, each on on their own time causing the sidebar to appear first
and abruptly (appearing to be floating for a couple of milliseconds)

It would be good to have a longer animation time when loading the page
then when simply pressing the button so something like :
- Currently the default 1000 is somehow skipped
- this.map.sidebar = L.control.sidebar({animSpeed: 200});

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I95b6bf51900449e85c24cee6d5d47f8af9a0f134
2021-07-23 17:17:01 +02:00
Henry Castro
ba652f8dbb test: adjust "assertHTTPFilesExist" function.
So it can be easy to analyze the backtrace of the
failing assertion.

Change-Id: Icdcf55b1404f858eba1d499bd65719a0e2da21db
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-07-23 10:19:42 -04:00
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
Dennis Francis
acf5c6a0c0 fix: avoid crash in non writer apps
when calling hasTableSelection(). Do not depend on stray/duplicate
tableselection messages that can ensure a valid _currentTableData
member of TileLayer.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I957fdfc43c1435ca98eb204dcb3ec1e76b85ce89
2021-07-23 09:10:16 +02:00
Henry Castro
e22f8f92f3 test: run test with capabilities disabled
Otherwise the unit test will take too much time
to fail.

Change-Id: I9a85a79ad2ced5d220394cdf71a7f703265e50ef
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-07-22 11:52:26 -04:00
Pedro Pinto Silva
775800ba91 Notebookbar: Center save icon
Ensure 0 margins

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I843e9a9a4e178611ec216b0e2f1dc4c49bcce464
2021-07-22 14:21:58 +02:00
Tor Lillqvist
69cf591e02 Test the merging semantics harder
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ie203c80d2a4b8536ed9150d0df1618b13d6bdb45
2021-07-22 13:41:53 +03:00
Tor Lillqvist
17e07847cf Don't let other clients prevent textinput and removetextcontext merging
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Iff95e9624b687938b83d1666059efbffb32c2b54
2021-07-22 13:41:53 +03:00
Tor Lillqvist
96f22d6691 Add unit test of the new merging functionality in MessageQueue
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I69a2bb99d870a1904c89f8d48ba3d742dbd1f082
2021-07-22 13:41:53 +03:00
Tor Lillqvist
07046e0a35 Merge sequential 'removetextcontext' messages when possible
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I53529bbb1fe45e74fde6fa6489b1580521f23d2d
2021-07-22 13:41:53 +03:00
Tor Lillqvist
65a42ecd2e Merge textinput messages when possible
When adding a freshly arrived textinput message to the queue, check if
there is an outstanding one queued, and if so, remove it, and prefix
its text to the text in the fresh message. Don't do this if there are
messages inbetween that affect what the textinput messages do
semantically, including textinput messages from other clients.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I712eebfb10d410bb424157c8df46b2848a236d88
2021-07-22 13:41:53 +03:00
Szymon Kłos
541f6a76d3 ssl: setup hostname for SNI
For some servers we receive failure with HTTP 403 Forbidden in WOPI::CheckFileInfo

"Reason: The client software did not provide a hostname using Server
Name Indication (SNI), which is required to access this server"

fixes #2771 : https://github.com/CollaboraOnline/online/issues/2771

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I761b179580481f8882a4526c1d8be4f1c14ad929
2021-07-22 12:40:05 +02:00
Gökay ŞATIR
8a4fe5a766 Calc status bar cypress: Test is passing on local and failing on the server.
Disabling temporarily.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I6ce0f65b9863751eb3e32176e28c1728fb4489d0
2021-07-21 23:07:47 +03:00
Gökay ŞATIR
292f24b350 Calc annotation spec: add case for lostfocus.
Event orders or propagation of events are different while using cypress tests.

Newly created comment losts focus while menu is being closed. This scenario is very difficult to reproduce by user (i couldn't).

I added a case for cypress test.

Since this behaviour would cause a regression in production, it is activated only for cypress tests.

Regression without if statement would be: Click insert comment button via menu, open and click the same button once again. Since the first comment is not deleted, the second comment will cause an error (can't add sections with the same name).

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Iaecdd36b56664e207b3a74de5d2b013a845f3fba
2021-07-21 23:07:47 +03:00
Gökay ŞATIR
275fad0dc3 Cypress Calc top bar: Add a wait for stability.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Id686eb045b8bd65dd270677d0c6ff06b32d49274
2021-07-21 23:07:47 +03:00
Gökay ŞATIR
7ca0730e58 Calc annotation: Add a wait for stability.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I3e34b84386d4b5abcb625c3d792375f153614f63
2021-07-21 23:07:47 +03:00
Gökay ŞATIR
7aca2bed1d ScrollSection: Make vertical and horizontal scroll bars always visible on desktop when the file size is larger then the view size.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I80f1f8509eec744d7ae8e18e61a3f062465a4947
2021-07-21 23:07:47 +03:00
Henry Castro
bfcd88faf7 test: fix deleting log files
if make is killed or interrupted during the execution
of their recipes, the target is not deleted.  So there is
an opportunity to check the logs, why are taking to long
time to finish the test.

Change-Id: I6e8176a48ff721ecb2b2efc01b1f149907dd359b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-07-21 11:38:36 -04:00
Gökay ŞATIR
088376afb7 Replace window.devicePixelRatio with app.dpiScale wherever possible.
Remove 2 unused variables from control.rowheader and control.columnheader files.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib5b8e8a8f993ece4f7126a68d4fbf81afd87c849
2021-07-21 17:37:43 +03:00
Gökay ŞATIR
38856bd3f9 Replace that.dpiScale with app.dpiScale.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I8d98f47dcd82b10c62ef2c362dac29b756997189
2021-07-21 17:37:43 +03:00
Gökay ŞATIR
57c1611083 Use global app.dpiScale variable instead of local copies.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I2ce695076343320ec16f02d058af3caf2dbd6d03
2021-07-21 17:37:43 +03:00
Gopi Krishna Menon
b3d5a2563c Add profilezone around kitPoll function and SocketPoll constructor
Add profile zone around kitPoll function and SocketPoll constructor to
improve trace event generation

Signed-off-by: Gopi Krishna Menon <krishnagopi487.github@outlook.com>
Change-Id: Ia46e9add59a57935997649fe39861a8d851e1ff0
2021-07-21 15:00:31 +03:00
Tor Lillqvist
522431a82e We generate 'S' and 'F' "Async" Trace Events in loleaflet, not 'b' and 'e'
"Async" here refers a specific kind of data in the Trace Event JSON
format, not asynchrony in general.

Actually, we don't have code that would generate such yet in
loleaflet. Just the createAsyncTraceEvent function in Socket.js. Quite
possibly the "Complete" events (a.k.a. ProfileZones) are all we need.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I611ccd4b964bcacdd1050893f70dbdb813ee3c34
2021-07-21 13:26:23 +03:00
Tor Lillqvist
7483ae1c82 Check directly that the result is exactly what we expect
At least I didn't fully understand what the old code actually was
checking.

Also, use sizeof instead of magic numbers.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I01602a2e256b1fbe39793c9f1439e025461c5a72
2021-07-21 13:25:23 +03:00
Tor Lillqvist
9de5ebbb1f Don't use the obsolete 'type' parameter in 'textinput' messages
Our JS code does not send 'textinput' messages with a 'type' parameter
either, so it is pointless to do it in a unit test.

(We still have code that checks for the 'type' parameter in received
'textinput' messages. That is pointless, too, and should be removed.)

Also, document what testWriterTyping() apparently is doing.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I4954379339f14e4a310a76788521001048d84e37
2021-07-21 12:24:31 +03:00
Michael Meeks
cd56efe900 cleanup: don't assume that the web-server poll is still alive.
Since a99edb5d29 this gets a different lifecycle, and is often
joined and gone by the time we get to cleanup.

Change-Id: Ic21ca837d484a9a853c7f8f683e876406b00a943
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-07-21 10:03:13 +01:00
Tor Lillqvist
8b6ee5b8bf No need for the template class MessageQueueBase
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ie007344f9a0ffe7fdf767cb9e9069db99aa224b9
2021-07-21 09:54:28 +03:00
Szymon Kłos
6b1c64a944 jsdialog: properly close popup on esc key
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic3437565fe53205c6a94362e9d4805c73ae31bd8
2021-07-21 08:49:55 +02:00
Szymon Kłos
9cbe11699f Don't stop loolwsd when logger already exists
there was a case detected by tinderbox when logger
somehow existed already what closed the app:

unit-wopi-versionrestore:

Test unit-wopi-versionrestore FAILED.
-25786 2021-07-19 08:37:08.429079 [ loolwsd ] TST  UnitWOPIVersionRestore (+0ms): WopiTestServer created for []| WopiTestServer.hpp:71
-25786 2021-07-19 08:37:08.429160 [ loolwsd ] TST  UnitWOPIVersionRestore (+0ms): setFileContent: [Hello, world]| WopiTestServer.hpp:57
wsd-25786-25789 2021-07-19 08:37:08.430827 [ UnitWOPIVersionRestore ] INF  Thread 25789 (7fb8e5063700) of process 25786 formerly unnamed is now called [UnitWOPIVersionRestore]| common/Util.cpp:572
wsd-25786-25789 2021-07-19 08:37:08.430954 [ UnitWOPIVersionRestore ] INF  Starting polling thread [UnitWOPIVersionRestore] with thread affinity set to 0x7fb8e5063700.| net/Socket.cpp:310
Failed to initialize LOOLWSD: Exists
wsd-25786-25786 2021-07-19 08:37:08.438294 [ loolwsd ] FTL  Failed to initialize LOOLWSD: Exists| wsd/LOOLWSD.hpp:469
Exists

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I489fab82ca604de76d13bc47674ee4f02e800f79
2021-07-21 08:49:45 +02:00
Pranam Lashkari
24668f35b2 leaflet: fixed insert graphic button on top toolbar
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id2f5ec1e1776ad3f96b2d23952739ffbc47098bb
2021-07-20 16:51:26 +05:30
Gökay ŞATIR
725376e878 Cypress: Disable some lines for now.
These tests are passing on local build.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I459b46ae249ce799d7c825a936eb3e12d7d610ab
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
fb50ef5b1a cypress impress: disable coordinate based test for now.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I458d229213a850e64339b81f68ddeff971f3b27c
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
cc89d8f9bd PDF View: Move highlighting code outside of if.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I1820bc3ba941152baf1465eb415bd5edecb0f5e5
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
3b80336b75 Hamburger menu icon visibility: This issue is master branch-only.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Id7765467ca1c144d2cd9cf04adfd2e39823dac08
2021-07-20 13:43:22 +03:00
Gökay Şatır
37e39283ab Impress Mobile: Fix slide sorter size.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1b60bf2688a4a3fdeec535d933f27876db07190a
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
81d5d58ceb Main-document-content: Prevent over-sizing.
Set min-height property to prevent exceeding the available size.

slide-sorter: Set max-height to prevent over-sizing relative its parent.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib8c50bc9f6f6ac4311cefa3b0e016da728efe95b
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
034b594bdd Impress: Adjust mobile edit button position.
* Remove 3px margin of read only view.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I8f72ea952e2bc734048fe4e02e6ba1784acb1369
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
c429815777 Impress:
* Use lineHeight rule for centering the elements on mobile.
* Use parent element's rules for setting the styles of img and preview elements.
* Disable mobile-slide-sorter. It is not in use for a long while.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I06517467f269669c70294fb5a4dd0960eb16feb5
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
4c4df83e99 Impress: Center the document on initialization.
It seems that fitWidthZoom function is impress-only.
I will turn back to this later.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I95b02d53299bf1b8ce7daf31121b67dccd1c817c
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
d89d2918ff Revert "impress: no slide preview if session was started with hidden slides pane"
This reverts commit bd015e5c6e.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib9420ca380a9099f5a1b2d84e7a2ab8d46f6f7e7
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
3d2e70c395 Revert "mobilewizard: pan the document area to top on presentation"
This reverts commit b783cb30e8.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I6132bbc0ce4800551569cf173261118c88c39e01
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
33082e9ad5 Mobile view and Impress:
There are some inconsistencies with impresstilelayer.

I think the reason is that impress has overwritten some of the canvastilelayer's functions like in updatemaxbounds (old one).

I bound impress' onresize function to canvastilelayer's synctilecontainersize and deleted the workarounds.

One 1year old commit will be reverted after this commit.

Only change that is not related to impress is the FIXME part on canvastilelayer. So i tested the mobile views.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I2dd127bd8d2280f2897d8c58281541f0aaa3c50f
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
b36b732e1f Move side bars into flex container.
So, we no longer need to set positions of HTML elements using margins or absolute positioning or attributes like "left: 30px".

Tested on mobile, desktop, tablet views with & without notebookbar.

The problem was:
    On an unbranded build, side bar's width is different. So pre-assumed pixel based positioning would need to be changed according to existence of branding.
    Instead, i tried to use CSS rules with flexbox.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib301dfa8c06a9cf12acd33caf1b6a852a2faab20

There is an additional fixup for master branch included.
2021-07-20 13:43:22 +03:00
Pranam Lashkari
a6cc06ae88 leaflet: refactored uno commands in top toolbar
added missing uno commands
modified uno property to use full command (i.e: use prefix ".uno:")

some item had custom handling and adding uno property would interfere the correct functionality
but to make freemium work properly each item needs a command
to solve the problem a new propery to store the command introduced: freemiumUno

This unifies the button properties with other JSONs

This is also necessary for freemium, without uno property button can not be blocked

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I43fb0796507987817b8eb82828a506b1f874d8ca
2021-07-20 14:41:55 +05:30
Tor Lillqvist
d9fc146605 Bypass updateFreemiumStatus unless ENABLE_FREEMIUM
Fixes build of iOS app.

Change-Id: Icf4e49c7d4d8f77a37557e1990f37673e1b9c91d
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
6e64ffeba0 Freemium: Dialog: Improve default text, rewording
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1be4a06e8159050e578c2da319a3b99a982302b2
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
48ba9257ea Freemium: Dialog and triggers: Fix style and layout on mobile and sidebar
Mobile:
- Checks if we are in presence of mobile mode and adjust layout
accordingly based on class
- Makes sure that the illustration resizes
depending on device's size
- Adds subtle animation to get the user excited or at least curious to
tap it (avoids making the disable status to dimmed/not legible)
- Fixes layout and buttons

Desktop:
- Adds hover state not only to button but to the locker
- Makes locker a discreet overlay above the respective button, suggesting
"this button is locked" but make it react so user is willing to click to
discover what is it
- Added CSS rules for top toolbar

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idbe66746c5ad07647cd62eb94d3b22a840bf70d7
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
7062fe28e9 Freemium: Use vex attributes plus styling
Do not use external html file and instead use input attribute from vex
so we can send html while being able to use variables (those variables
should then be overwritten by integrator)

Also Fix styling and DOM elements creation:
- Avoid to many elements and messy notebookbar with multiple (states)
  - Replace disabled feature icon with lock icon
	- Also style it properly and make it similar in other properties as
	the existent disable status

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9c2a07ef1fe5f089d5e63cb53d2d6b7f0b5083a8
2021-07-20 14:41:18 +05:30