Commit graph

15975 commits

Author SHA1 Message Date
Michael Meeks
7cbb7251bd js: reduce keyup emission to allow event de-duplication.
We emit lots of 'keyup' events that don't match any keydown
event like this:

OUTGOING: textinput id=0 text=a
OUTGOING: textinput id=0 text=l
OUTGOING: key type=up char=0 key=517
OUTGOING: key type=up char=0 key=523

since we emit a textinput instead. So just emit events
when we have modifiers, or already sent an input event.

Change-Id: I0f86438d093497668bb5b749ff63ecd87d9b7636
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-07-29 10:54:44 +03:00
Szymon Kłos
7244cda069 jsdialog: fix buttons alignment (update)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I25f85163e1dbdedbff4cdbf29f7a98e30d145cf1
2021-07-28 15:24:22 +02:00
Ashod Nakashian
d8621b950b wsd: better response when disconnecting
Return proper HTTP code when disconnecting and log
to make the communication more effective.

Change-Id: I4da9d5a7fe4c09d6fcd44b1f31b439180d7012bd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-28 13:00:45 +02:00
Szymon Kłos
c1b1ee2a75 clipboard: when CopyDisabled is set - copy stub message
+ this will allow to perform internal paste
+ will inform user when trying to paste outside app that copying is
disabled

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I92d1a69bb6ea55703a419fa15461d98125a59b09
2021-07-28 13:00:45 +02:00
Szymon Kłos
27e95bbe7e Wait for async save result on DocumentBroker stop
When async save was started but we want to stop DocumentBroker
- we shouldn't kill the socket which listens to save result.
Because when we kill socket we will destroy DocumentBroker
before saving is completed, this allows for a minimal time
to connect again to the document and receive old content
from the WOPI storage. When we wait for async save result
we will keep DocumentBroker alive and next session can be
connected and receive correct content.

fixes: https://github.com/CollaboraOnline/online/issues/2747

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5505a5ccc1f3d6928c723bddfea16bf5c5798d1e
2021-07-28 13:00:45 +02:00
Szymon Kłos
38731d5818 Allow pasting into document even when DisableCopy is active
From our API description:
DisableCopy
Disables copying from the document in libreoffice online backend.
Pasting into the document would still be possible.

Change-Id: I1f7e272ad3b04208b534eff990fed895951b4751
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-07-28 13:00:45 +02:00
Szymon Kłos
d6d4a5bfed jsdialog: don't request .../undefined when no image
Change-Id: I7ee0e8678350d28da82c983713cac5627d099e54
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-07-28 13:00:45 +02:00
Szymon Kłos
72ac57cce5 busypopup: fadeout also when showing new popup
- be sure overlay will be removed
- show fadout effect also when closing old popup and showing new one

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6565c96d664a2a289a9950cc2a6b60677872a3a9
2021-07-28 11:45:44 +02:00
Szymon Kłos
05f684990e jsdialog: fix buttons alignment
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia5dbe5099bc65c01ab43eb720d676e4fd57c63f2
2021-07-28 10:48:45 +02:00
Rash419
5fba1e6962 loleaflet: use different name for 'Move or Copy Sheet' option when there is only one sheet
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Iea110a5c3e66e8ae1693b42bfedce81d19c6247f
2021-07-28 09:14:50 +02:00
Szymon Kłos
9fc8f7d94f cypress: add simple sidebar tests
- test menubuttons
- test toolbutton popups
- test deck switch

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia928345982b855e9dbf850e969165566cc74f9d5
2021-07-28 08:46:04 +02:00
Gökay ŞATIR
1974629f8b Scroll Section: Bug fixing.
* Scrolling was not smooth.
* Scroll bar was not visible in large files.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I036d3699997ee3b88c2cfc6e8bc5d0e67399f522
2021-07-27 16:38:03 +03:00
Gökay ŞATIR
a9c4aca4f8 PDF View: Update search feature to make it work with PDF view.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I1557e55be4dafebccf06f9bdb2ffd4ed1df71b55
2021-07-27 16:38:03 +03:00
Gökay ŞATIR
bd5a4d8a71 Add case for drawing's mobile view.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Icf1af59a9ba205a8e6bd685788156f94cbe4c911
2021-07-27 16:38:03 +03:00
Gökay ŞATIR
6480bbf153 PDF View: Add drawing of page borders.
So user can see which page they are scrolling before tiles are loaded.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I1fc92eef8ac4de97a7cdc6f8a214f94afd51044c
2021-07-27 14:41:11 +03:00
Rash419
1f550a574e loleaflet: make show option visible only when there are hidden tabs
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I21553d1c45db6bbde342abefa4d863c6305409f2
2021-07-27 12:36:53 +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
Gökay ŞATIR
dc94d47f99 Calc: Buttons for scrolling tabs list were not working.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: If1c37b4516bf90dd48dcf5b21f13b113df09f5f8
2021-07-27 09:53:15 +02:00
Mert Tumer
91dc8a4bba Fix font doesnt change with multiple font selected
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I2010a45433a207b2586778d922946d191c17f33c
2021-07-26 22:25:10 +03:00
Pedro Pinto Silva
e2168e96aa Spreadsheet mobile: Remove styles and fix plus
- Inherit as much as we can from desktop
  - Remove unnecessary styles
- Tab container: fix position
  - No need to add left padding instead let the
	plus icon fix to deal with that
	- Increase plus icon touchable area (was quite
	small)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic8269e5da63406b7f19f0d92ff50f1258f460d7a
2021-07-26 16:30:50 +02:00
Pedro Pinto Silva
9424431d8d Spreadsheet tabs: remove unused padding n margins
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1918e3c87bfd8aef2799e3dde3b9b4267b5d96d8
2021-07-26 16:30:50 +02:00
Szymon Kłos
0d16c274a8 mobile-wizard: hide duplicated paragraph images
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5977aee554daf022fa144d38cf022bc40eef0675
2021-07-26 15:39:07 +02:00
Tor Lillqvist
4f926a450e Print a header in front of the list of last UNO commands
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I1f7194edb833d8569ca7bd87cadd903deb84ef0e
2021-07-26 09:36:58 +03:00
Gökay ŞATIR
db3925f34f RenderingOptions Test: Updated due to status message's update.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Iee592cb9f842ba30b1c9afa819a7e42e04cc8295
2021-07-25 11:58:34 +03:00
Gökay ŞATIR
8556ccd17d Writer: Draw page borders and numbers.
While scrolling, user can see which page is being scrolled before tiles are loaded.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I0d06a3402fdb9166a7df8e45594f5caf189be37b
2021-07-25 11:58:34 +03:00
Gökay ŞATIR
e6d53967c1 Remove unused global variable.
I added it to use for PDF view but didn't need, let's remove what's unused.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I7d052ad5297e3a52c3ac52b9cd7aeb6270d32d6b
2021-07-25 11:58:34 +03:00
Gökay ŞATIR
05d0ccf5a5 Add global multipliers for conversions.
twipsToPixels and pixelsToTwips are added.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I794a7c4ee826510f3bf1b97b4a456bf05ec2f3ae
2021-07-25 11:58:34 +03:00
Gökay ŞATIR
01505278a6 KitHelper: Get page rectangles with status message.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I6a6140d46c16c5ebd9ae1c80a441a7129ad1ada5
2021-07-25 11:58:34 +03:00
Pedro Pinto Silva
ccaa206437 Spreadsheet tabs: Fix dimensions after canvas changes
Update tabs and its parent after:
9f3b72aa6f
2577342e1b

- Fix padding and margins
- Use border-top instead of faking it via shadow
  - border shadow was not being displayed full width
- Make sire spreadsheet-tabs-container is transparent
  - Avoid hiding any element or border
- Gave up on trying to have selected tab looking like a tab
and thus without border top and taller. The code around is
proven to be changing constantly plus we are not gaining
that much of a benefit there. On top of that by keeping it
with same shape as the other tabs we avoid possible problems
with the top of the border of its parent.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I45ce6ed534afe4b264ae5aa0ef8f40f606ff5523
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
e4cab54482 StatusBar: Fix builtin padding for loleaflet-font elemets
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iaf9c5ef4879c8c2fc4b7277940c64be42b159643
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
b6854ec35d Listbox: Fix inconsistencies between sidebar sidebar and
toolbars. Make listbox (combo box drop-down list) similar
with the same: bg and add CSS var.

Also on classic mode: Fix listbox height on toolbar up
- Keep it at 24px so to be the same as the neighboring items

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib4deaa5beec6cebf8d966f15a9e091a298d8b749
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
7ddfb7c2ce Sidebar and resizeCalcInputBar: Remove offset
Removes offset and this the need to get SidebarWidth
- now due to flex element does not need offset

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ief2f93909b070e4a2883b7599b94457bd9e0d4c5
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
700f6ad3b6 JS Sidebar: Fix inconsistent wrapper width and fix mobile glitch
- Makes sure sidebar is always the same width (when selecting objects
etc sidebar was changing)
- Fix mobile glitch: on  load and even during readonly mode sidebar
was first flashing and then appearing

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9ebf306d27430a2c9a6c7105a0dc178020ef12cc
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
294241fb67 JS sidebar: Fix checkbutton font size inconsistency
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ifc7284af413b3807903d91ea9c89306563e15ad7
2021-07-23 17:17:01 +02:00
Pedro Pinto Silva
80c7ffe541 JS Sidebar: Fix hover state and faulty margin
Adds margin to toolbutton and not its child:
- A margin was being added to the img element which in turn
was being visible when hovering it

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