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>
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
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
and don't add event multiple times for every row
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia01ce1e81828d5ec40d84888b82ed2294ffef550
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
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
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
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>
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>
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
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
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>
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>
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>
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>