Commit graph

24064 commits

Author SHA1 Message Date
Michael Meeks
f8a0d6c086 Callbacks: minor efficiency wins, avoid tokenizing where we can.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I2ef647fd0af7bc83b7b40fd3ce7a49dc799f4339
2024-05-09 17:47:15 +01:00
Michael Meeks
6f49f9398e Split outbound callback processing from incoming message queueing.
Now we always send callbacks as soon as possible back to wsd from the
kit. This has several implications:

1. even when InputProcessing is disabled we will send outbound
   progress updates.
2. we should send callbacks much more quickly without waiting for
   other queue events to be processed eg. tilecombine:

We also drastically simplify storage of callbacks, avoiding lots of
re-parsing of the same strings, and allow much more efficient
comparison and merging at a small space cost in queue size.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ia1ede5406767f895616a52775316ee6ab1c5db09
2024-05-09 17:47:15 +01:00
Michael Meeks
320606c225 KitQueue - remove more un-necessary code, and helper use.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic11db8ac1391bd22b4adcae40c99fa4ca99790f1
2024-05-09 17:47:15 +01:00
Gökay Şatır
70ff910f20 Fix variable type error in "setDesktopCalcViewOnZoom" function.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Idcd7040271e26bad4d04921bcb19dfb0ed45169b
2024-05-09 18:24:47 +03:00
Ashod Nakashian
6f725087a1 mount: remove test-mount directory
Change-Id: Iff128a22ac7d0fa3e6514e62e1f4ea92a60f052b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-05-09 15:32:26 +02:00
Ashod Nakashian
b33f822871 wsd: mount: safeRemoveDir will not error when unmount fails
safeRemoveDir is tries to unmount blindly, so there
is little point in erroring when the directory
in question isn't a mount-point at all.

Change-Id: I6db0fd9406493060ce52a69f7d935b0958e2d2be
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-05-09 15:32:26 +02:00
Ashod Nakashian
dac5c0341f mount: avoid hard-coding
Change-Id: I6857510a9d0442cc357886b453d369f1e4b8f53f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-05-09 15:32:26 +02:00
Ashod Nakashian
4d8d1119a2 mount: reduce failure noise
Change-Id: I2709a4a220f6d1db42e5259e0a883d4c74066bef
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-05-09 15:32:26 +02:00
Neil Guertin
5a9c6a0e37 Cypress: Add cypress-terminal-report printLogsToConsole option
This is already the default behavior. Writing it here just
makes it easier to change.

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Iebde47f5b64ae1509e7f37b884ad71fdc067b164
2024-05-09 08:27:42 -04:00
Neil Guertin
982f865cc7 Skip failing test desktop/writer/invalidations_spec.js
Test is failing because of an extra empty invalidation
when clicking between the body and the header

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I887c9bc028f2b831d205bba2944c734cafb1743d
2024-05-09 08:27:37 -04:00
Gökay Şatır
62239215da Update the test for now - it omits visibility check.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I9c55379afa9175360e16e036e7620b83168ce9f8
2024-05-09 13:28:54 +03:00
Gökay Şatır
e0e5a6a418 Cypress updates.
Change the cell selection circle color in dark mode.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I23826bdf0a09fa7e8b1c25132842f98e37997034
2024-05-09 13:28:54 +03:00
Gökay Şatır
9b3038c70f Initialize CanvasSectionContainer as soon as the canvas HTML element is initialized.
Move section definitions under canvas initialization.
Use app.sectionContainer instead of painter_sectionContainer.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ie10bfa36fca30bd1dda42adab2bbf2a16c418717
2024-05-09 13:28:54 +03:00
Gökay Şatır
f64521caa1 Fix indentation.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I9b5334ee7b8178503eef7c4790acb8a5ac1f8340
2024-05-09 13:28:54 +03:00
Gökay Şatır
5a28490394 Remove unused CSS class targets.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ibf93bf3f28b6ae06374bc992cc733f9ad9b0a419
2024-05-09 13:28:54 +03:00
Gökay Şatır
975385f0d2 Move canvas sections and section container into canvas folder.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I952e1770b5708381cef5cfbf1f02e6ec4b0502ad
2024-05-09 13:28:54 +03:00
Gökay Şatır
a15e4e25e0 Use CellSelectionHandle sections on mobile view.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I4409981e8de2fca6211236590f3096b765456ed6
2024-05-09 13:28:54 +03:00
Gökay Şatır
ecdcc369d6 Replace _textSelectionStart and _textSelectionEnd with SimpleRectangle(s).
Also move them into their sections.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I677a100c859ac8986f5609d9caa5187ef81818dd
2024-05-09 13:28:54 +03:00
Gökay Şatır
b9e7d071a2 Add functions for sections' shown status.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ia480364c76b149177643971a0a29a2410c32475e
2024-05-09 13:28:54 +03:00
Gökay Şatır
932b99cf12 Finalize text selection handles.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I3d7a9a01903455c2b4c9303a27dd37702650cbb3
2024-05-09 13:28:54 +03:00
Gökay Şatır
8a0843764b Move DropDownSection into its own file.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I4cab2546f6828ab3c76ba8a4e06601904a06502e
2024-05-09 13:28:54 +03:00
Gökay Şatır
551b9cb104 Replace textselection markers with textselection handlers.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I2de0c4720250022d5547f3f657e277949721ba92
2024-05-09 13:28:54 +03:00
Méven Car
6fc6f07572 UI: improve combobox appearence
Since f7491e1f62de5401529db40b8b899e5c0563badc all combobox started
having a with and min-width of 100px, this wasn't meant to be.
Restrict this width setting to .jsDialog.

Add 5 px left padding to combobox, this looks better.

Set the font combobox width to 5em instead of 50px.

Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I0f0247471376e4633f3bbffab89285e16f78cde9
2024-05-09 11:24:44 +01:00
Bayram Çiçek
6300853c4d fix prettier error
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I666337388d570898720b1055145d7dfe3b4b80cf
2024-05-09 12:19:01 +02:00
Szymon Kłos
fcbd08f98c Mention: share more code
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic9fd29a05cbc2e62abb9f3651cdb771ab1d9adf0
2024-05-09 12:19:01 +02:00
Bayram Çiçek
e92d048926 add AutoCompletePopup.ts base class
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I60e69fcc7eda3c76cf6e3309cdbc6ab777a90292
2024-05-09 12:19:01 +02:00
Szymon Kłos
81722df0ab Add missing types in Mention.ts
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia3909dd8a1e55a4872e38d5b3d0e8493401d475b
2024-05-09 12:19:01 +02:00
Bayram Çiçek
368c2218ec more conversion of Control.Mention.js to ts
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Ida4be8f63b05aad9db80acd6eba7e8e403587ac7
2024-05-09 12:19:01 +02:00
Gülşah Köse
a46147588f Convert Control.Mention.js to Control.Mention.ts
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I575d9e14562b1a77f30d355024a2106d7955fe6a
2024-05-09 12:19:01 +02:00
Méven Car
dab5afac90 postMessage test page: Add messages from editor view
Add CloseSession button.
Also improve spacing of elements.

Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I9999654f9d53d44016eeb0ea587cf3f61b000471
2024-05-09 12:08:43 +02:00
Hubert Figuière
dbd3bc1482 calc: Properly handle the disable state
Doesn't hide the grid when the Function wizard is open anymore
when disabling the ToggleSheetGrid button.

Depends on https://gerrit.libreoffice.org/c/core/+/167370

This is a follow up for issue #8066.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I79ba99716eb1103e7239fe5cc302c64827c9ef53
2024-05-09 05:46:49 -04:00
Michael Meeks
f4265ce8a7 KitQueue - move methods from header to source and simplify.
also rename and dissolve the previously virtual _impl methods.

Change-Id: Id77a5c3ce79b27406301ef336ac1c9a40ead15bf
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-09 09:50:08 +01:00
Michael Meeks
ebb4eda3df Move common/MessageQueue.cpp -> kit/KitQueue.cpp.
This is not common code, it's used only in the Kit.

Rename TileQueue -> KitQueue as well as unhelpful member variable naming.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If158597f99f302cbc27e8eab139972f57a2fc3bb
2024-05-09 09:50:08 +01:00
Michael Meeks
aacc957f23 MessageQueue: squash into TileQueue.
Avoids unhelpful virtual methods which are not used anywhere, simplifies
several code-paths, improves readability, and perhaps performance.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I7528fab77698546545bf81d7ccacdda9a0002833
2024-05-09 09:50:08 +01:00
Michael Meeks
466c31d59a MessageQueue cleanup, and avoid accidental use in tests.
The MessageQueue is not a generic message queue, it has much more
un-anticipated functionality; so don't use it where we don't need to.

In particular unexpected re-writing and merging of messages
during tests is probably not a great idea.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I657738307e611be18f5f83e11c055bf8a88826da
2024-05-09 09:50:08 +01:00
Caolán McNamara
c1724983f7 cool#8744 ensureCanvas on preloading tiles
So we front load at time of request as much work as possible when we are
basically idle rather than do it when the tiles arrive.

https://github.com/CollaboraOnline/online/issues/8744

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ief643f1e98cf4a853d56a68d82b48ff092e5a963
2024-05-09 10:36:48 +02:00
Caolán McNamara
cfae2097b1 ensureCanvas takes two arguments, the 2nd the lastRendered time
make the current uses that just pass the 1st argument explictly
set null for the 2nd arg and retain the orig lastRendered time
in that case.

This lastRendered gets overwritten by _tileReady after calling
_applyDelta.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I237d34e8d1fde94c95eb778c054e4ac5985c2a50
2024-05-09 10:36:48 +02:00
Skyler
3dd2087bae Stop page scrolling
Sometimes an input we are focusing on is considered out of the viewport
by the browser. This is not always the case, and, even when it is, it's
not trivial to move it back in.

Instead, this change detects scrolling and re-scrolls the view to 0, 0.

Doing so is not without consequence, as there is a slight jitter before
we can scroll back, however this is substantially better than having the
controls off-the-page.

Signed-off-by: Skyler <skyler.grey@collabora.com>
Change-Id: Ie5003f9244ce1c0e8a183de5fdbcf3a880b13a13
2024-05-09 10:06:56 +02:00
Szymon Kłos
fcfb95638f jsdialog: css: use available aspace for ui-txtarea
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I824dd5addaa93a1ae779b0070de9d8971f7797ea
2024-05-09 08:47:39 +02:00
NickWingate
1bc78e8059 Expose object name and description dialogs
It can be used to apply name to an object so it will
be presented in the navigator as something unique

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: Ica06259dc3007d638a4998ccc2cce03ad1a5ca05
2024-05-09 08:47:39 +02:00
Caolán McNamara
70a89a4d43 allow a test to start without sidebar
instead of starting with sidebar and then removing it

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If2ea433cd3d5fc18ad549bd3df095de15c126ad0
2024-05-08 21:04:48 +01:00
Caolán McNamara
399afd123f tile.canvas is always true after a successful _ensureContext(tile)
_applyDelta returns early if the initial "ensureContext" of the tile
fails.

i.e.

  var ctx = this._ensureContext(tile);
  if (!ctx) // out of canvas / texture memory.
    return;

and ensureContext already calls ensureCanvas, so tile.canvas is
always true in the remainder of this function.

The "defer constructing the image & applying these deltas until the tile
is rendered via ensureCanvas." implied a sort of deliberate optimization
to wait until render time to apply the delta which doesn't actually
exist.

Also move the stray "// 'Uint8Array' delta" comment back to where it
originally came from as documentation of the type of the param, as in

commit 4140bf8741
Date:   Sat Nov 6 11:11:13 2021 +0000

    Bring back the delta application JS from the 6.4 branch.

...

 _applyDelta: function(tile, delta) {
         // 'Uint8Array' delta

...

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If15a897c3251f28639c9f1112687e543421e457d
2024-05-08 20:47:10 +01:00
Caolán McNamara
e40bcccc4f update impress/apply_font_shape_spec.js to pass
probably since merge of

commit 5140abd2c94b96f2a32f0f7416ae79239a2af187
Date:   Fri May 3 14:14:26 2024 +0500

    tdf#152906: use correct Y offset

or similar of that topic

change 3285 to 3286

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4bd3509313c7a5801d5284eebc3882bf3550eed9
2024-05-08 18:53:46 +02:00
Michael Meeks
5357b0e81f bgsave: update unit tests to exercise races in modified state.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I60d861f78b592fc39b88c23c0dece771ec8260a3
2024-05-08 16:42:29 +01:00
Michael Meeks
c66940cf9a bgsave: close race of typing while a background save completes.
We need to mark core unmodified so we can track modifications
to the core that date from after the background save process is
forked.

We avoid telling WSD about our new modification status until
we are sure the background save completed successfully, and only
in the case that we have not been subsequently modified.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I2c9fbce942ff0af2bb727c3685f4ec479e18fa27
2024-05-08 16:42:29 +01:00
Michael Meeks
7f6b59b180 bgsave: improve unit tests.
Force background saving in the config for this test.

Use stamp files to force sequencing between Unit test and Kit.

Change-Id: Ia2c60c3dcfdad87c9c9754e8f20a3c36dbcf74d5
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-08 16:42:29 +01:00
Aron Budea
80a6f97518 Bump version to 24.04.2.1
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I56c4be6de327c7b678cc9a534b90f7fe2a916190
2024-05-08 17:13:49 +02:00
Gökay Şatır
396d835f53 Container is rendered on the server side.
It should always be visible when the function is called.
Rename the function to _setPreviewContainerTop for readability.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ib90da34574b0a5a44c9a2e7a2b2d64cdd2d59938
2024-05-08 16:00:23 +03:00
Pedro Pinto Silva
45c51c42de Slide sorter: presentation toolbar: Remove ui break
There is no need to add a visual break/divider between "Fullscreen
presentation" and the "Insert Slide" buttons:
1. They are visually very well distinctive so there seems to be not a
need for a division
2. There is not so much white space so the more we can reduce visually
the better

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I27b84782e5af987d9aec3734f7557c746a03667c
2024-05-08 13:18:23 +01:00
Neil Guertin
c54683f349 Fix failing test mobile/writer/table_properties_spec.js
Was failing in moveCursor after slowdown introduced by
https://git.libreoffice.org/core/+/ca31493a
Rewrote test to use the same select helper as all the other
tests in the file

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5197a095d47e727526636b232df1f3be45e5bb52
2024-05-08 10:58:17 +02:00