Commit graph

20331 commits

Author SHA1 Message Date
Ashod Nakashian
8facb429c2 wsd: make removeSockets private
Change-Id: I7171c67bbbe4682cf10e015e600fb25f03d4e5bb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 18:02:14 +01:00
Ashod Nakashian
4968982a3d wsd: better merge new sockets into poll sockets
Change-Id: I4249ba4d35d8dfb2ff17c63af201276c77e2549b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 18:02:14 +01:00
Ashod Nakashian
b82519400f wsd: update the poll round-robin index right before usage
Change-Id: I27f19c914449b689a530495681423a2906281698
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 18:02:14 +01:00
Ashod Nakashian
ec85f78458 wsd: drain the wakeup pipe on each read
Reading larger blocks should avoid having
the pipe back up when we accidentally
attempt more wakes than actual ones.

Change-Id: I7766230f60dbf069668ee7919f766e9093df7017
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 18:02:14 +01:00
Pedro Pinto Silva
0906804b6c Tabbed view: fix button label alignment within tabs
with a11y we now have those labels set via <label> elements and thus
they are getting browser specific default style for line-height
- Set to the same line-height that they used to have before, when they were
<span> and were inheriting the line-height from <body>

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If9afa2217e5d357ea27b8e7fbb0d63f3acdee80c
2023-04-14 16:09:28 +02:00
Pedro Pinto Silva
d1991e177c Tabbed view: Fix tab content being filled with extra white space
This was introduced with the a11y changes (button is getting
browser default padding style)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic648cedc1d3c72e0ae53e8bd244f1a04da868d8b
2023-04-14 16:09:28 +02:00
Ashod Nakashian
fecad56715 wsd: shutdown the Kit socket before terminating to flush
In some rare cases we can't write to the socket
before we terminate, and the last message is
lost. This is observed in tests and especially
when we simulate socket write failure.

Change-Id: I9fb298edfe53de3c7ea0c2f31c02ba370167f96e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
1df26c35db wsd: do not use expired token to lock storage
Change-Id: I733bcb53c50faa2f410af2f10f4c225797f49ecb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
8c6d92bc46 wsd: test: ignore requests after testing has finished
Change-Id: Ifcb28bffb2aecd5c0d9c83fa7cdbd3a203b38f37
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
7547e15d79 wsd: move pollingThread to private
There is no use-case for calling the
thread function of the SocketPoll
from outside.

Change-Id: Id8e87369494817aaab749d03d1cd4cd3724c2da1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
75dbe7af53 wsd: better scope locality
Change-Id: I49156505dfb855ce00815c6afabc762951fcc4c8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
4089302362 wsd: better socket logging
Change-Id: I31b64ce1f174896a3bcfa5cd620e0babd7f425d1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
55c9280e02 wsd: multiple writes to stderr may interleave
Particularly annoying with trace level logs
when they trample over one another.

Change-Id: Ib1a8f8b8117364886af5043120e65ec7cb12e12a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
9dd0636bcd wsd: announce the debug URLs to the user after server runs
The port used for client connections does change when
we cannot connect on the default/first one. There is
no point in announcing the default when we don't
yet know the actual port, and similarly it's not
helpful to do so before the server is even started.

We also move the remote-font-config thread to an
earlier point and merge it with another #if !MOBILEAPP.

Change-Id: Icc28817c7a03d49a7e130b076e545fe3ce2fb81a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Rash419
3ba85eb8f7 js: fix mention popup positioning on large resolution
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I1cc628b682215414611a256986731a9046bb6b35
2023-04-13 15:20:32 +05:30
Pedro Pinto Silva
f78de939d5 Rename Link Picker to Smart Picker
So it's consistent with the latest NC strings

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic1d49c6d871aee86f80aeb5c4e6936b33f3fc93c
2023-04-13 10:25:34 +02:00
Pedro Pinto Silva
c5b95042b6 GitHub project know has its own workflows bultin
Remove custom actions

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia7f2d776d370310834fd29d38ef25a2566d7d054
2023-04-13 09:54:01 +02:00
Pedro Pinto Silva
58bb4b9380 Sidebar: Remove browser's style padding that comes with <button>
Before this commit buttons were being generated with padding
this is not needed ( we already have safe margins applied to
the parent -> 'unotoolbutton' )

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4f1b4328131550d906cde3328c7de02daffd76a1
2023-04-13 09:18:52 +02:00
Pedro Pinto Silva
00375b61e6 Fix button ration
Before this commit we were setting buttons in places such as
the sidebar with weird ratio (not 1:1) this might lead to problems
when aligning, adjusting gaps. Better to adjust gap or margin if we
need bigger spaces in between

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id60cd6353de2ace2a066c0d1624000a09f0ca98e
2023-04-13 09:18:52 +02:00
Michael Meeks
5a2127003f disable fragile TileCacheTests::testTileBeingRenderedHandling.
Fails intermittently under load, responsible for most unit-tile
failures.

Change-Id: I88de8524b51ee7d97a28e31c001534a506d52f0e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-04-12 18:01:40 +01:00
Jaume Pujantell
518acd1127 Disable Change Password button for users who don't own the document
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I2e1fc1e5b6e50cd7ec5ad9d78db36e76ce6426c9
2023-04-12 14:33:07 +02:00
Gökay Şatır
2c0df92a2b Update shortcuts for accessibility.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I26cfae75d65fc2588225b22b752a34571d5abc34
2023-04-11 16:43:35 +02:00
Pedro Pinto Silva
557c336d0d Set missing dimensions to sidebar button images
- re-use btn-size variable
- make it clear that this set of rules is intended to sidebar elements
  - Improve selector (more clear and so it doesn't target other
    elements outside of the sidebar)
  - Move it to jssidebar.css file

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib03c412a1e05fd6ed315f58a70486f14eaf5b9ea
2023-04-11 16:13:01 +02:00
Gökay Şatır
f2637b02a9 Open dropdown menu of a content control when space or enter is pressed.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: If1670f9f2153a4578057cb4b5c7073879f08ea8b
2023-04-11 16:21:14 +03:00
Gökay Şatır
3659b47afa Loop focus on the dialogue regardless of the dialogue type.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I9d74adbd8df235d762d5cdd0133c26bbbae7b549
2023-04-11 16:21:14 +03:00
Gökay Şatır
b3cb61bbd4 Avoid duplicate ids.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ia90a0178796ec18e6a167c378a6de294dfb96b32
2023-04-11 14:05:52 +02:00
Ashod Nakashian
3dbfce54d3 wsd: helper to dump the state of an object as a string
Change-Id: Ib49a47be2dc37663ef06ac80be981c9f3c029814
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
335843f527 wsd: remove unused DocumentBroker::getDeferredLock
Change-Id: I0660b8074227408cb2f9a4009d3de15aac2c11ef
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
f41ba11bad wsd: test: socket context logging
Change-Id: Ib3675985cf0e2d8864ed544d5e7c615d5fde2331
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
a24a07b301 wsd: new Stopwatch utility
Similar code is scattered in the code. This
should help clean them up and make usage
easier.

Change-Id: I02f82c9aa169f591c5688c4b2adca257eecf8221
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
bca82f50ee wsd: better logging of the current socket being handled
Change-Id: Ieca96a685f5cfea24fde7251806746408e0bfbf8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
e960e52636 wsd: remove unused Force flag from enums
Change-Id: I752842f56ab4520a624848b6be2724775189ea51
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
8b2d230c64 wsd: logging and cosmetics
Change-Id: I2c7a2c22e073bebf66d542d5e81b1496b8057319
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Ashod Nakashian
158e1a125f wsd: avoid using the default port for unit-tests
Change-Id: I4d8681491b0aeedbc349c7644551f51052adf63d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Pedro Pinto Silva
8d49e0cff5 CSS refactor: Fix duplicated & outdate px across light/dark modes
Do not place px in light or dark mode css instead use the shared
cool.css :root for that
- This avoid outdated values in the future
  - There was already one like that: --annotation-input-size
  had different values between light and dark mode

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5cd95a36e160003101f6f92108bb5244bfafcdd4
2023-04-11 13:01:54 +02:00
Pedro Pinto Silva
70a5ec53aa CSS Refactoring: one btn-size to rule them all
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iedac492e206e15a1aad65e07dc8cdc3d95a4a488
2023-04-11 13:01:54 +02:00
Pedro Pinto Silva
c1e02d4a2b Expose Translate option to mobile if feature is enabled
Before this commit was impossible to use the translate button
on mobile phone

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia93e1bf009723f3f7791b63f0b15a74467595ab7
2023-04-11 11:03:38 +02:00
Gökay Şatır
c6fef0d233 Use htmlFor attribute for labels.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I64b8fd378abdedf0e97bcb3075da13799460f01b
2023-04-11 09:06:48 +02:00
Michael Meeks
05ae0ab631 TileCacheTests: re-copy documents when repeating tests.
Attempted blind fix for intermittent failure:

[ kitbroker_004 ] TRC  Document::GlobalCallback LOK_CALLBACK_ERROR
[{ "classification": "error", "cmd": "load", "kind": "io", "code": 770, "message": ""}].
filter/source/config/cache/typedetection.cxx:452: caught exception while querying type of ...
"Could not open stream for <file:///tmp/.../disconnectMultiView_5f47c785_setclientpart.ods>
at filter/source/config/cache/typedetection.cxx:1123"

[ coolwsd ] TST  disconnectMultiView-1  [loadDocAndGetSession] (+22012ms):
ERROR: Assertion failure: Failed to load the document
cool/file%3A%2F%2F%2Ftmp%2FdisconnectMultiView_5f47c785_setclientpart.ods/ws.
Condition: isLoaded| helpers.hpp:531

Change-Id: I91062bf4c136dbd6a4cf6def842ff2ae7687c758
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-04-10 19:46:07 +01:00
Pedro Pinto Silva
52fdec0014 Remove unnecessary flex and sizes for notebookbar-shortcuts-bar
Since we have change the generated HTML and now we have proper buttons
and img inside of them, there is not need to resort to this methods
since the img will automatically be centered aligned within its button

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I944f5c677c6d79f2f28645e4e8d081868f094262
2023-04-10 13:09:47 +02:00
Pedro Pinto Silva
bd03ab04eb Fix notebookbar button sizes and shortcuts bar
After accessibility work we need to change how we target those
and also we need to revert that `height: 100%` and replaced with
24px so we can know for sure how much th element will occupy
and to safeguard for cases when the svg is bigger

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia4102ccc5c58d4807d8b05d360342c1ea7128c3b
2023-04-10 13:09:47 +02:00
Gökay Şatır
5c7c7f24f6 Provide a way to focus on the menu from map.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Id5b99bc43cf908940c55af5b5f004513b5cdd05c
2023-04-09 10:49:37 +03:00
Gökay Şatır
0f41b9cd1d Set focus to last element after a popup window is closed.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I99251c1f35b23a5b1a41bbe1820efcf090353db4
2023-04-07 22:22:00 +03:00
Gökay Şatır
54b9040909 Emphasize underlines for access keys when alt key is down.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Idcbca41fbc998b468eb807f35dcd4deff928fe8e
2023-04-07 19:10:51 +03:00
Gökay Şatır
58d417d152 Activate access keys for tabs and popup windows.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Idfa377bb8afed7afb811f33462c471a1261a32cc
2023-04-07 19:10:51 +03:00
Gökay Şatır
04019a0953 Update cypress tests.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I3d5735bec2162e359c012355781ca70de309ff9b
2023-04-07 17:57:24 +03:00
Gökay Şatır
8cb0c44e1f Update cypress test according to latest changes.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I226abb663edbb15384233a5c2461c1e8f3a36455
2023-04-07 17:57:24 +03:00
Gökay Şatır
be04111173 Turn div elements which has button role into buttons.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I60cebd1b02fdc9dc9e5f8a9b57d40b279b085a99
2023-04-07 17:57:24 +03:00
Szymon Kłos
57ff9a3334 Revert of "a11y: TextInput: switch from <textarea> to content editable <div>"
This reverts commit 1d2607e836.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6de00182cee32b37c6ced957431c3c21f2734c24
2023-04-07 12:09:53 +02:00
Pedro Pinto Silva
44a945d817 jsdialog: center radiobuttons without using exact units
This is a follow up on f9ad2ea3c3
with Change-Id: I1c200f2208b4f762d01dc6dd85459dbedce7b03e . It
leverages the flex added there to align and justify items.
What it fixes: Radio buttons not being aligned from the "left"
side and behaving slightly different in terms of alignment
if anything else changes around

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9cb6f24c16603f40acf797c6b68d4305f38cdc58
2023-04-07 11:03:56 +02:00