Commit graph

15890 commits

Author SHA1 Message Date
Pedro Pinto Silva
df7c38c443 JSdialog: ui-listbox: Fix arrows position
- Adjust left position and
- Makes sure option is not getting weird values from web browser

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia753baf8066914543388c80827b2fe4c8ed26c3b
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
a832507f00 JS Sidebar: expander: fix text color and size between states
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ice39be922f4997e111ac7947c4526871808b2c8d
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
34d1bd2f66 Fix Treeview: invert chevrons and increase contrast
Fix inconsistency between ui-treeview-expander and ui-expander
- Expanded: pointing down
- Collapsed: pointing to the right
- Also make sure the width doesn't change between states
(use 'V' in both)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib4b72d6f8acca33fcb67981ff9b6fd8095012ead
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
a6ebc1e570 Fix borders around JS Sidebar (doc container etc)
- Fix Borders
  - Make sure the borders that divide the document container and its
	surroundings are always visible at all times not matter what is open
	(sidebar) or what is visible (status bar, ruler)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idea765f4438981af66bb760f25f7c553be7da728
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
5542a85aec JS Sidebar: No need to use negative margins reduce size
Initially introduced in
c983a65bbb

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4ddfc8a81457087fb0cd60d96655d3156a20ebd9
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
8f5212b0f7 JS Sidebar: Remove hard pixels add border and hover status
- Dropdown (select element aka listbox) Do not use min or max widths
- Use CSS vars for text colours
- Add hover status to buttons
  - Force to also add id references since these lack the unotoolbutton
	class

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I480deb651a83b44a8a5e4170e105b4dc2e900ec5
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
227731aea7 JS Sidebar: Fix wrapper padding and add border
Plus make it start from the top and ending at the bottom

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If8c89a248c467e50186a82bc191200a60e2823e1
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
d1f4117b30 JS Sidebar: Fix fonts
Via CSS var to make sure we use them consistently throughout
jscomponents. In some browsers it was being set with serif specimen

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I418ad3a313c394e526b6e4e1c46ebe3616212d40
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
36f95f71d3 Toolbar-down: raise z-index to be above document container
Toolbar-down was being covered by #map
- Set toolbar-down with the same z-index and ruler since both should be
above map
- Update readme

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic358fb5f7bd722806cf22fdad0289f8a54fa6e1e
2021-07-23 17:17:01 +02:00
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