Commit graph

20473 commits

Author SHA1 Message Date
Andras Timar
a7f6c285df Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibb745572eb57813fd44c6190b73dc528dd464527
2023-05-03 16:54:24 +02:00
Andras Timar
8bc808d919 Translated using Weblate (German)
Currently translated at 99.5% (497 of 499 strings)

Translation: Collabora Online/UI
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5530505dd5ae264602427dd2725ac53e21984e21
2023-05-03 16:51:49 +02:00
Gülşah Köse
bce7b97d65 Fix the position of dropdown triangle of uno button #6236
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I49be20532bc921e1424b07cb8d96c3477461bf8e
2023-05-03 15:28:45 +02:00
Ashod Nakashian
7d2f736084 browser: catch failure to get localization files
When we fail to download the localizaion javascript
file, for whatever reason, we end up failing to load
the document. This is far from ideal.
Instead, we simply log the error and move on.
The end result in such a failure scenario is that
the document loads, but the UI is only available
in English.

Change-Id: I5d29ff68870d0cd84d86658ccfd4e3185cc62562
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-03 06:52:25 -04:00
Gülşah Köse
f1e9ee72fe Fix wrong device detection logic.
window.screen.width/height returns the width/height
of the screen in CSS pixels. window.innerWidth/innerHeight
returns the interior width/height of the window in pixels.
This includes the width of the vertical scroll bar, if one is present.

That gives better result. eg: responsive mode

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Ibecb9614224cb3bfd6d5d8dc9ad5febe6aa7673b
2023-05-03 12:30:28 +02:00
Szymon Kłos
118d3e4064 Make sure treeview entry focus is visible
focused entry has a 1px border, make sure there is a space for it
in the treeview so we can see laft and right border

also make sure it works with RTL

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iae65811b7e1a2c74f47be1cea09607e48ef661af
2023-05-03 09:54:06 +02:00
Szymon Kłos
9903bec57e Send key events only for mention popup
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I57aaeeeda41f1269d18dca14ef6175b44bd6c781
2023-05-03 09:54:06 +02:00
Szymon Kłos
0348391229 Share code for key event handling in TreeView
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I21de36069867bc69b54c9269214fb7886e7f6fc8
2023-05-03 09:54:06 +02:00
Szymon Kłos
14382f7f4b jsdialog: fix warnings in TreeView
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I94c812013560e1d4307eac14a7e755baa16cc1a9
2023-05-03 09:54:06 +02:00
Szymon Kłos
c4c36980d1 jsdialog: a11y: grid better describes header listbox
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9f564907f00bec147c481021059a25b28bd6f9eb
2023-05-03 09:54:06 +02:00
Szymon Kłos
c3ae2728be jsdialog: select checkbox on keypress in listbox
and don't add event multiple times for every row

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia01ce1e81828d5ec40d84888b82ed2294ffef550
2023-05-03 09:54:06 +02:00
Szymon Kłos
8e11d20edd jsdialog: a11y: handle expand using keyboard in tree view
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I99e02c1c0c53d23a91cb279638fcae0bc6e29dab
2023-05-03 09:54:06 +02:00
Szymon Kłos
43cabc5407 jsdialog: a11y: keyboard navigation for tree view
This can be tested with Writer's Reference -> Add Citiation dialog (left
tree).

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4a3bf6bd0d4f7f061725b6e796437a74f10cf11c
2023-05-03 09:54:06 +02:00
Szymon Kłos
847ade2422 Mention popup focus fix
Previously it used span elements to focus popup listbox.
Now the listbox itself takes focus because entries
don't have tabindex anymore so they are not selected
when tab key is pressed

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5ef87cf1717b1249994bbf435fa9a55738c81a12
2023-05-03 09:54:06 +02:00
Szymon Kłos
ebbcd13a62 jsdialog: a11y: keyboard navigation for header listbox
Can be tested in Writer's Add Citation dialog (right table with header).

from: https://www.w3.org/WAI/ARIA/apg/patterns/treegrid/

Tab:
    If the row containing focus contains focusable elements (e.g., inputs), moves focus to the next input in the row. If focus is on the last focusable element in the row, moves focus out of the treegrid widget to the next focusable element

Down Arrow:
    If focus is on a row, moves focus one row down. If focus is on the last row, focus does not move.

Up Arrow:
    If focus is on a row, moves focus one row up. If focus is on the first row, focus does not move.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I72c8ed0b729965837e939bc327666461dd82beaa

a

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id3f7812e8ce0a29c2ddae92b8b5d4d5a36569de2
2023-05-03 09:54:06 +02:00
Szymon Kłos
7ab931454c jsdialog: update example TreeView JSON
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6ac0f9b0863f3494841621ba73a7506111d7b65e
2023-05-03 09:54:06 +02:00
Szymon Kłos
63b9a06e61 jsdialog: remove unused code in TreeView
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0d27e6a99d7aeed48c52a9910b58e09e12cbc21b
2023-05-03 09:54:06 +02:00
Szymon Kłos
a49efdc68b Share code for icon id in TreeView
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I31976b9fb31564c5c90fed123fdd4e488a27e59e
2023-05-03 09:54:06 +02:00
Szymon Kłos
fa7e76232d Share code for click event in TreeView
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3ffd5df8f9ed86de726be5ee464d4d09f955549e
2023-05-03 09:54:06 +02:00
Szymon Kłos
dd9b703b2c jsdialog: a11y: add aria properties for tree / listbox
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I190929780783845b69c518fc9fe549e1a841cb9c
2023-05-03 09:54:06 +02:00
Alexander Gabilondo
66315f8dc5 Translated using Weblate (Basque)
Currently translated at 98.9% (494 of 499 strings)

Co-authored-by: Alexander Gabilondo <alexgabi@openmailbox.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/eu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id6ffd3de3cb6b130e12b92d57340a91315fa5125
2023-05-03 09:51:36 +02:00
Jörg S
87c8543dc8 Translated using Weblate (German)
Currently translated at 99.3% (496 of 499 strings)

Co-authored-by: Jörg S <joerg.schwerdtfeger@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0c4d73938485ade9c3afaadb01bdd31e0713015e
2023-05-03 09:51:36 +02:00
Joan Montané
0a2e2714ce Translated using Weblate (Catalan)
Currently translated at 100.0% (499 of 499 strings)

Co-authored-by: Joan Montané <jmontane@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ca/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1f6bd63be6028bc3dc9fe4f18ad03ed5ed234e7c
2023-05-03 09:51:36 +02:00
bittin1ddc447d824349b2
5aa6603959 Translated using Weblate (Swedish)
Currently translated at 100.0% (499 of 499 strings)

Co-authored-by: bittin1ddc447d824349b2 <bittin@reimu.nl>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sv/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0042aa82bfe023ac3fc8c07974e3ac84f0e54abb
2023-05-03 09:51:36 +02:00
Ayhan Yalçınsoy
4be6117616 Translated using Weblate (Turkish)
Currently translated at 100.0% (499 of 499 strings)

Co-authored-by: Ayhan Yalçınsoy <ayhanyalcinsoy@pisilinux.org>
Co-authored-by: PhD. Ayhan YALÇINSOY <ayhanyalcinsoy@pisilinux.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/tr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia17bb14fa6cc7360b043aaec1905e2c3d74fe6cf
2023-05-03 09:51:36 +02:00
Andras Timar
246c826765 Translated using Weblate (Hungarian)
Currently translated at 100.0% (499 of 499 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9abc1595922a35c8e7cabf1aaf33a427e4ea5e1c
2023-05-03 09:51:36 +02:00
gallegonovato
180309533d Translated using Weblate (Spanish)
Currently translated at 100.0% (499 of 499 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/es/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iae249950899a761436b76bdea454794effa29324
2023-05-03 09:51:36 +02:00
Ihor Hordiichuk
7925575b8f Translated using Weblate (Ukrainian)
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/uk/
Translation: Collabora Online/Android app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I16dd9f9d826fb262c7e42aaa5f3356f635bccc41
2023-05-03 09:51:36 +02:00
Ashod Nakashian
5d2f27d4cb wsd: test: reorder tests to minimize parallel runtime
Change-Id: Ib308757cd100df83b934995c2eee2d38d3120ecb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
576dc6254f wsd: test: faster httpwstest
Change-Id: Ifa68800ba96fd8adaedd82b1551686213c1bb309
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
1d482cf5cf wsd: test: selectAll and deleteAll improvements
It seems we no longer always issues textselection:
message after these uno commands, so we end up
waiting and retrying for the longest time.

Change-Id: I47b15b9830585ae58e4400fcf760051506ab69dd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
a54416311f wsd: test: time countCoolKitProcesses to catch slow unloads
Change-Id: I26e4382badc4b3e3172d3788e27f024ee7e07c7d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
05ecebe482 wsd: cosmetics and header include fixups
Change-Id: I573e4336b57abfc7bcd77ff0a83042202147e53f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
d8d88c740d make: generate compile_commands.json for all .cpp files
Best to have all .cpp files in compile_commands.json
so they can all benefit from the tools that leverage
it. So now we recursively generate the file for all
.cpp files in all subdirectories. Most notably, now
all test files are included.

Change-Id: I312d812463607b32fe6b9e83b10900c17ae86185
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
86c1dca7b6 make: cosmetics
Change-Id: Id1ebe96edef9f41be05b84e4c27388adde864aa3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Szymon Kłos
4cbec23190 jsdialog: a11y: keyboard activation for menubutton
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I36fda0f5880549e521ea2480be8ca1552ded869a
2023-05-02 12:52:35 +02:00
andreas kainz
603f912d86 Dark Mode add color-scheme: dark setting
see https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Ie563059174471d50b5f9a8e24d1f08b2540799c5
2023-05-02 10:22:20 +02:00
andreas kainz
a963987ff2 dark-mode use correct jquery-ui icons with data-theme value
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I9214fda63f6caea0a36ab8be7c26baf4e1c0f46e
Signed-off-by: andreas kainz <kainz.a@gmail.com>
2023-05-02 10:06:41 +02:00
andreas kainz
6f27bff9fe add missing lc_setoutline.svg icon
icon was needed at writer sidebar default view

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I7da355489f1c0e1b41949f189f31800e4288064d
2023-05-01 08:05:51 +02:00
Pedro Pinto Silva
9de01e11b6 Fixes Menu items hover color are inconsistent #6254
Fixes https://github.com/CollaboraOnline/online/issues/6254

Before this commit and with recent a11y changes generic btn hover
styles were bleeding out to multiple places where icon btns are present

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3855d081595a2d3aa56e58137e21aba5d7bf8532
2023-04-28 16:46:34 +02:00
Pedro Pinto Silva
c4cafd4aff Fixes Impress: Some icons are missing #6249
https://github.com/CollaboraOnline/online/issues/6249
affecting some themes

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3b0a796350243add9615615d569f3b480189cd29
2023-04-28 16:45:35 +02:00
Pedro Pinto Silva
27fddae9c6 Fix down arrow/triangle position in sidebar dropdown icons
before this commit the triangle was misplaced, under the icon instead
of side by side

(might be related to https://github.com/CollaboraOnline/online/issues/6236)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id8d118471dcb02b5bc79399a4319ee514af03c5b
2023-04-28 16:41:56 +02:00
Tomaž Vajngerl
d78082b6e9 fix theme dialog entry in compact view
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I8fbe9e7a8e0aa2020adbe37688fe2e4c6924bdbc
2023-04-28 23:05:29 +09:00
Ralf Becker
5282d1ccfe Fix not working inotify / restart on coolwsd.xml changes
Signed-off-by: ralf <rb@egroupware.org>
Change-Id: Ibab659911e4133437bcee404172e5d8eb0a3f305
2023-04-28 15:27:48 +02:00
Ashod Nakashian
1c4a3bfe1a wsd: test: rulerupdate is an expected message
Change-Id: I42a73914988731fd9d5bdf116d491a8a96070384
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Ashod Nakashian
6f5316ca93 wsd: test: new test for superfluous save commands
Change-Id: I8cdc589bf0fa3e2fee0991987e62ffdae7af6332
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Ashod Nakashian
0f5e2c6570 wsd: track the storage attributes more accurately
We now track the storage attributes in three
distinct states. The first, when we issue an
uno:Save (called nextStorageAttrs), when we
get the save response (called
currentStorageAttrs), and when we upload
(called lastStorageAttrs).

What this does is allow us to separate the
attributes without clobbering them, while
supporting retrying when a failure accures.
Specifically, we shouldn't lose the
attributes of the latest save when the async
upload completes. Similarly, we should
preserve the last upload attributes when
the upload fails.

This approach improves reliability
significantly, as evidenced through the
new test, UnitSuperfluousSaves.

Capture the current storage attributes upon saving

Change-Id: I91756fda7b9ed5887dc4ed9691db536371b5bcad
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Ashod Nakashian
8bbf5e62d0 wsd: process the modified state from uno:Save
A new field, called wasModified, is now published
in the uno:Save result. This gives us an accurate
state of the saved document, whether it had
user-modifications, or was an unconditional forced
save by the user.

Using this flag makes the IsUserModified header,
used during the storage PutFile request, much
more reliable.

Change-Id: I0b7e4421d4a42eef01e19be8d9ee0bee6bff9f03
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Ashod Nakashian
6dd3feeea7 wsd: do not allow multiple saves in flight
It's easy to use keyboard shortcuts to issue
multiple saves within a short period of time,
which is hardly useful to make saves faster.
In fact, they'd make the server and document
slower by adding overhead.

Similarly, we could get autosave requests
on certain occassions (for example when
the last editor disconnects) while saving.
Again, there is no advantage in issuing
another save in that case. We re-evaluate
the save state when we get the save result.

Here we prevent issuing another save while
one is already in flight, regardless of the
reason.

Change-Id: I9503adabc3a9f1dc6cdbbcf93c5cccbc5414fcf3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Henry Castro
0db06a8679 wsd: include CSP server host to ...
load using script interfaces.

There is use case such reverse proxy uses another domain
to request the l10n json resources, but the CSP Chrome triggers:

l10n.js:62 Refused to connect to 'http://192.168.0.2/localizations.json' because it violates the following Content Security Policy directive: "connect-src 'self' ws://192.168.0.1:9980".

request_JSON @ l10n.js:62
String_ctr.<computed> @ l10n.js:85
(anonymous) @ l10n.js:263
(anonymous) @ l10n.js:286
l10n.js:62 Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://192.168.0.2/localizations.json'.

Change-Id: I57fff24c00adebdf7dd06929d6341ea14554a6d2
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-04-28 06:30:57 -04:00