Commit graph

15869 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
Henry Castro
c8e2d25d24 add initial feedback option
Change-Id: I9357f556474e5ada881e27983c95f7527b284efc
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-08-06 17:21:18 +02:00
Pranam Lashkari
af54c49538 freemium: added missing freemium bits for the mobile bottom bar
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I643e6e6373643798df3e875ee696b4fb56bcfa8c
2021-08-06 17:21:04 +02:00
Pranam Lashkari
dcd6795e57 use pragma instead of header guards in freemium header files
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5b55c2de4a2467503108e4172de84a27e207ba3c
2021-08-06 17:21:04 +02:00
Andras Timar
24214ef955 Android: add common/Freemium.cpp to CMakeLists.txt.in
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibdfe445d0085fe26f74655a265cb2e9208157f7b
2021-08-06 17:21:04 +02:00
Pranam Lashkari
a7b7118b39 cypress: fixed broken mobile annotation tests
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I9d467a0d35c7e57e3737c8175537f9dddcdaad1e
2021-08-06 17:21:04 +02:00
Pedro Pinto Silva
001acdb8c0 Freemium: Mobile: Fix overlay on primary buttons
Does not need to be a badge in this particular case since it's above
a physical primary button; also make it completely white to be consistent
with the button's theme.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8c85fbe33d1b3897f0fddd44dd7a5d0517f92e93
2021-08-06 17:21:04 +02:00
Pedro Pinto Silva
ee6b8c24f7 Freemium: Mobilewizard: Increase difference between locker and its element
Changes to mobilewizard (not mobilewizard.menuwizard)

- Present locker as a floating badge
  - Add shadow to communicate that it's different from the button
	underneath and that it's clickable
- Locker and the icon underneath shouldn't be confused
  - Make that difference clear
	- Change position to it is more deliberated abode the icon but not
	centered, so to not cover the feature
	- Alight to top left since there are many icons using accent elements
	on the top and bottom right

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idf19ddb3965efefdafd4d4be042bc7e47022208c
2021-08-06 17:21:04 +02:00
Pedro Pinto Silva
a660a98184 Mobile: Fix vex to follow latest changes on canvas and positions
With latest changes on positions, Vex on mobile needs now to be set
to fix and additional rules are now not needed. Inherit from main
CSS file.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2b67c0990d625d84077f0114ab198c9fe704a88a
2021-08-06 17:21:04 +02:00
Pedro Pinto Silva
675440ab21 Freemium: Mobile: Fix menuwizard
- Distinguish menuwizard from normal mobilewizard
- Avoid using percentages so we are sure where the things are being
positioned
- When on mobilewizard (not menuwizard) avoid showind two lockers
  - Also do not replace icons, let them be and add additional locker
	so the user can still see which feature is supposed to be unlocked

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4d3d5f331162d16c63cf5cad667f0d5fab4dd9bc
2021-08-06 17:21:04 +02:00
Pedro Pinto Silva
c5eab84ab8 Freemium: Fix sizes for Classic and Mobile
When on mobile do not rely on background position and instead add
img element so we can properly resize it and adjust it:
- Less in your face
- To not disturb or overshadow the actual active elements

When on Classic mode:
- Hamburger items: Use smaller lockers so to do not get in the way
of reading the actual item label

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I46218254a975b3a70d1e4c03eb1795d87f3861c9
2021-08-06 17:21:04 +02:00
Pranam Lashkari
fc9705f0d0 final freemium patch to cover all the UI elements,
specifically more focus on the top toolbar in classic mode

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I33eebe79addebe3acfcea4d20912cc31b759ffce
2021-08-06 17:21:04 +02:00
Pedro Pinto Silva
22b4595e46 Toolbar-up: avoid adding extra padding on the left
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7a36f0a50b2e8867e18744270bb6d84d6c5a917b
2021-08-06 09:48:00 +02:00
Pedro Pinto Silva
3d8507fab4 Busypopup: Center SVG spinner
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I79e15a80efc54549875a8736846853afa53e230d
2021-08-06 09:47:14 +02:00
Pedro Pinto Silva
3e38ec9b7d Synchronize map with TilesSection: Fix CSS
- Fixes map z-index so annotation can be have higher z-index
- Now map and due to the latest changes introduced in:
8ca57fad3344f6da1b42158944bf9903f0ac528b we cannot use
container's border-top as our bezel divider
  - Elements such as annotation need to go under
  - So Fix toolbar-wrapper to use bottom border
- Notebookbar: Fix toolbar-wrapper background-Color which
was being set as transparent and thus elements passing under
were being visible
- Ruler: fix cropped ruler (was not going full width)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8778619da43c51d1994dbb12d1112d4f1d42ff43
2021-08-05 11:09:11 +02:00
Pedro Pinto Silva
189fa6af7f Mobile: jsdialogs: Text import: Fix separator btn position
Depends on: https://gerrit.libreoffice.org/c/core/+/116265

Fixes checkbutton (Use separators) position by placing it
before divider label ('separatoroptions') thus, improving readability. User
can now see it clearly that all those separator options are related
and hierarchically under a main option: #toseparatedby.checkbutton.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I97b133e3e873a76ca75290728adaf1a45c9bcece
2021-08-05 10:39:00 +02:00
Pedro Pinto Silva
af827bae42 Document: Scrollbar: Increase affordance
- Make it thicker
- Make it visible by default
- Hide it only when there is nothing to scroll

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ibffead10c09eda979ef8d3d2201173aca3553503
2021-08-05 09:29:42 +02:00
Pedro Pinto Silva
a39a16cc24 Make it clear when unotoolbutton is disabled
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I666978fa301ba977b4cc3fa8a57a56754d206f6a
2021-08-05 09:29:09 +02:00
Pedro Pinto Silva
2d5d34be2d JS Sidebar: Fix textorientbox (calc)
Do not show radio buttons in this case since we have images
for each option (radio images and  textorient options images
were overlapping ) also fix width and add hover state

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7e3d8ef4da400024137d0c9207c67807ded281c5
2021-08-05 09:29:09 +02:00
Pedro Pinto Silva
6d13b5f080 JS Sidebar: Do not add extra margins to pushbuttons
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I72ea2b2b6ee711842128590d9bf096810d16ffca
2021-08-05 09:29:09 +02:00
Pedro Pinto Silva
95ee1373a0 JS Sidebar: Impress: Fix drawing-area width
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9b0a59a2da75262ec0b89c978d990fc4759a835a
2021-08-05 09:29:09 +02:00
Michael Meeks
4b76b23797 Allow pause & resume section updates to stack.
Use the topLevel flag to keep us safe, and avoid problems when
constructing too.

Change-Id: Ifba6f0204dac359b0b028b3295a7227576b03dd6
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-08-04 17:17:09 +01:00
Michael Meeks
c93b1c8ab2 Pause and resume drawing while clearing comment & redline sections.
Change-Id: Iecf59d48122c15e8baa4de0fbe2b486168b4de41
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-08-04 17:17:09 +01:00
Miklos Vajna
4cfbd6b65c kit: improve StringVector usage in ChildSession::getClipboard()
It returns a temporary.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I5a9df90a4e7dda05cc387e5dc11842ea8e237504
2021-08-04 17:02:16 +01:00
Pedro Pinto Silva
54d63c12af Vex dialogs: Close btn: Fix position
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I66ca8f579c622b19bf72293587ef8f6e660ef200
2021-08-04 14:44:21 +02:00
Pedro Pinto Silva
a8c118ca48 Notebookbar: Fix bigtoolitem size and keep ratio
Some bigtoolitem icons (namely About) were being skewed and others
were being set at a smaller size to what they were supposed to have.
Fix it by adding height value

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5ec375358e9dcf46a6b8b17570bea78963e188c8
2021-08-04 14:04:59 +02:00
Mert Tumer
238ef6182d perf-test: Performance updates
a) removed event firing for catching tile messages
    - injected socket onmessage function and made a middleware instead
    - the middleware can catch any socket messages
b) Replaced "fake sleep" and while loop for keystroke messages
   with setInterval function.
c) disabled processing incoming messages for multiple views
    - Optimizing the front end for JSDOM seems to be hopeless.
      the benchmark numbers for JSDOM and Real browser does not match
      and most of the time are unrelevant. In most cases where JSDOM is
      slower take almost no time for Real browser. These cases will not
      make real experience smoother if somehow fixed. In addition,
      rendering hundereds of socket messages makes nodejs use 100% of the cpu
      and benchmarking the loolwsd or loolforkit properly becomes impossible
      since nodejs cannnot handle messages in time and send keystroke messages
      with respecting the interval.
    - This way we can only focus on the backend performance and find the
      problems that "mesh the keyboard" events produce.
d) Recording stats will now count the num of socket messages received

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: If7d11ecea00ca175463a5d3b8bbe7c29a4b6b32e
2021-08-04 08:20:14 +03:00
Pedro Pinto Silva
cf0c6cc3a6 Snackbar: Remove unnecessary CSS important rule
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic1d91ae036f71902df3da03d8ed32533e7762949
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
ca992a5c35 Snackbar: label: padding and space between button
- Inherit common styles across mobile and desktop
- Set Different padding between Desktop and mobile

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iae158c83eb693ea5a77cb0e532f7db8a80567130
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
066b4d30c1 Snackbar: Fix border-radius on desktop
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie3b56c30b942ea14cf029ed3e1db312b601084e2
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
2bd1ce2652 Snackbar: label: style it differently if there is no action
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I97c1f86fd4ff33cec165d37048cacb18c550e300
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
b7f64082fd Snackbar: make sure no text transform is applied
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7562acf27f76d3ebc5841596d4b126f4ce7d388d
2021-08-02 13:57:27 +02:00
Szymon Kłos
396d4d96fb snackbar: show when disconnected and on desktop
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib8e5a5f32dd04b34da7977fe5b5928a80e81f1f4
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
e3adfb77e5 Mobile: Snackbar: Shortened socket reload message
No need to have lengthily message on mobile in this case
since we already have the action button that clear
communicates that a action is needed from the user side

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I508fb348ef8037501e7f23db518f1477216e3c5d
2021-08-02 13:57:27 +02:00
Szymon Kłos
fb17494b3f snackbar: implemented for mobile
with example of usage: replaced alert when server was reconeccted

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia0f72b118a6ad7c7072bae41f452cc1a70b9aa84
2021-08-02 13:57:27 +02:00
Szymon Kłos
d3f3cf2cc5 Rename mobile popup to be more general busypopup -> popup
we will use it not only for busypopup

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I775d5af3838d2e6caf6bdbda9ff4864b919eb34b
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
55c98a414b Mobile: busypopup: Adding snackbar styles
Snackbar element is intended to replace all w2ui .lock
dialog (alerts) with or without button

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iad836d0dc094be01ad265492eaacf0a8dbf8a06d
2021-08-02 13:57:27 +02:00
Pedro Pinto Silva
6adf6f18b4 JS Sidebar: Style expander and its dialog triggers
- Reduce icon size
- Fix alignment
- Use specific icon (also used in core) as dialog triggers

Simplify expanders ("title bars") by removing icons based on uno command
(that trigger dialogs) so to:
-  Avoid user confusion between those icons and the similar icons from
within the group
- Improve information hierarchy (dialog triggers icons should not be at
the same level as the other action within the sidebar)
- Use a common symbol (same icon) to communicate "Open dialog to see
more actions"

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib060dda2ba1584ce4e0ac132617a4b2900df42d7
2021-08-02 12:49:41 +02:00
Gleb Popov
20c2ab5663 Remove non-abstract unix socket files on shutdown.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I54773de6d4f777f9188921d5aa99c052f0f79b34
2021-07-31 07:43:45 +03:00
Gleb Popov
950a5c4d1a Use more sensible value for #ifdef when checking for abstract unix sockets.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: Icfd849424659c8949f8f3554aa75a8a7ceaf7ac2
2021-07-31 07:43:45 +03:00
Gleb Popov
0dd30ba28f Remove unused private class member.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I38b29c06220d2493dc9d47a0ac9b077e3bafd512
2021-07-30 16:43:29 +03:00
Tor Lillqvist
cebc121921 Bin two functions that aren't used anywhere
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I918c00c5f9ca8f31a90218dd8601909c60f8c252
2021-07-30 16:17:09 +03:00
Pedro Pinto Silva
d768d250a3 NB: Adding missing Zoomin and Zoomout icons
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If8aa3f96cb870620108c8dfdeb003e96ea2dfdc5
2021-07-29 13:29:43 +02:00
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