Commit graph

3065 commits

Author SHA1 Message Date
Caolán McNamara
aaa61e44e5 allow tileprocessed to accept multiple comma-seperated tileids
and bundle them together when emitted from the browser-side

// i.e. FIXME: new multi-tile-processed message.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I69916cbe30c26686fb44a2d8d229704c459b6601
2023-08-04 13:07:29 +01:00
Gökay Şatır
5485bea24e Add arrow key handlers for better accessibility support.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I3f6e81797c63dbe3cc5742ff39382a4052225541
2023-08-04 12:29:19 +03:00
Gökay Şatır
14c84ac453 Improve accessibility of w2ui drop down menus.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I9ff58eec19ccc7229c81b9d1f258bc8c4825634d
2023-08-04 12:29:19 +03:00
Henry Castro
c56ebcc06d browser: remove hyperlink pop-up
Unfortunately, we cannot show the hyperlink pop-up,
in client side based on cell formula, because the formula
had not been evaluated.

=HYPERLINK(A1,A1);

The server should fire event "hyperlinkclicked".

Change-Id: Ie2b743812493e1790b9e54f0050974c585e61e00
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-08-04 08:52:59 +01:00
Pranam Lashkari
cbeee7727e accessibilty: added accessibilty fields to the mobile edit button
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ifdb59ff3463a0354549316994f8e80b341e28133
2023-08-04 09:17:58 +02:00
Szymon Kłos
e8b2ea5ca1 Deduplicate onInitialize method in Column/Row Groups
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I404b9de7159b410f922dd1a66991aadc5dae1c91
2023-08-04 08:12:03 +02:00
Darshan-upadhyay1110
b38a91d1c5 Add check for Insert_buttons to display in tablet view
Added tablet check for Insert buttons to display on dom or not based on passed condition .
 - By default custom buttons will show up in tablet.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I103461b02405bc03d63671b885a31735668d4111
2023-08-03 18:45:50 +02:00
Shehr Bano
1428888afc Writer: Fix to issue #6977, extends vertical space of ui-treeview in Manage Changes
Signed-off-by: Shehr Bano <shehr.bano@collabora.com>
Change-Id: I8551242fc2b987f00c67088caa0ed07ee8526a72
2023-08-03 18:37:58 +02:00
Rash419
c9a9e5635d show copy/paste timeout warning
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I438ca03c8122c6c85acac7dda141f685a94fdc53
2023-08-03 09:43:18 -04:00
Henry Castro
b9a1254126 browser: admin: use access token
The GetCookie was removed due to sensitive
access data because the browser can block to
security concerns.

Change-Id: Ifaeb495202a53125bda9e3705b6e33b7e54e56df
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-08-02 20:23:42 +01:00
Henry Castro
47485adc3e admin: add access token
The access token will validate the session
when a websocket is connected to the server.

Change-Id: I008b04a499ab0d85fd6f95fc06a511f800c0bb2e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-08-02 20:23:42 +01:00
Maks Wolkowinski
1f5919140d Collapse notebook bar from view tab
Signed-off-by: Maks Wolkowinski <m.wolkowinski@beebuzziness.com>
Change-Id: Ic15fb1723bff6861b1fc115ef161cf6caa1b70af
2023-08-02 18:25:37 +02:00
Marco Cecchetti
d99aece12f Improve a11y support for tabbed UI
Provided support for screen reader to report key accellerators
description.

When <alt> is pressed screen reader says something like: "tab control
Home tab selected".
When an accellerator is typed such as "N" screen reader says: "N
Insert tab selected".
When an accellerator for a tab item is typed the screen reader says
the typed letters and the item name as set in the 'alt' attrinute for
the button element.
For instance by typing accellerator for bold style ("1"), the screen
reader says: "1 Bold"

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I64b198f79cb9f7f13dcd1a4fe0890e4317e512dd
2023-08-02 16:43:21 +02:00
Gökay Şatır
7afe5dfe8b Remove tabIndex from container of color pickers.
Turn image buttons into actual buttons.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I51dc5c900bdcf2c06f9768526a9363f4539deb76
2023-08-02 15:18:30 +03:00
Gökay Şatır
e414ac3c86 Rename conflicting accelerator keys.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I926dc7145991b5cb3c251cdba43d2bbd67363482
2023-08-02 15:18:30 +03:00
Gökay Şatır
54b16ea222 Make color buttons interactable with keyboard.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ibf35d6304a717a5870998fb761ca6630db5df4b2
2023-08-02 15:18:30 +03:00
Gökay Şatır
fd7e041c90 Add focus loop to color control when keyboard is used.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ia860c055ac10b31d388bf159eb3dccc4ec101c7b
2023-08-02 15:18:30 +03:00
Gökay Şatır
a73ae5a1a5 Focus on the color input popup when keyboard is used.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ibf189aaa6029b3de1e1b4233d583f42e07be21d6
2023-08-02 15:18:30 +03:00
Maks Wolkowinski
3a8ff4ef3d feat: Add hide menu entry in compact mode
Signed-off-by: Maks Wolkowinski <m.wolkowinski@beebuzziness.com>
Change-Id: Id40312f6731cddaab110dc5e55ee7115ce08d6fc
2023-08-02 14:06:13 +02:00
Gökay Şatır
325ef1be01 Add functionality for setting access keys of buttons which are added via insertbutton post message.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I6c5746c36b89f4ad4d6c383a2ee5144aecefc1ed
2023-08-01 10:35:14 +02:00
Gökay Şatır
429f895bbf Allow notebookbar insertbutton post message to specify accessKey.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I0693cae17a71810a1c957b5c5600700073b1242d
2023-08-01 10:35:14 +02:00
Darshan-upadhyay1110
76fc8f176a Add reset accessibilityKey
On focus away or if NotebookbarAccessibility is disabled then remove accesskey
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I04310f7ee4ab599a0c53c7aceaba459dd7641681
2023-08-01 13:57:14 +05:30
Pedro Pinto Silva
498a02c522 Show userlist on tablets
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7c3b45846e465b608f87fa0a0067828e3d276ecd
2023-08-01 09:26:35 +02:00
Pedro Pinto Silva
218583ce22 Tablet: Hide document file name input field
The input field is already being hidden for mobile. For Tablet and
with the increased amount of UI elements on the top bar best to hide
it also. Renaming the document is a quite rare used action when
compared to any of the other top bar actions (switching tabs, open
sidebar etc). Better to hide the #document-name-input when on tablets
instead of trying to fit everything (and end up obstructing tabs for example)

Tablet user can always:
- Use the integration (already used to do many other file manipulations) to rename the file
- Use the in-app Save as can still be used to save a copy of the current
document with a different name

----

Possible future improvements would be to add the possibility to rename
the file when using a tablet:
- Add menu entry and tabbed view button
  - Control.Menubar.js something like {name: _('Rename Document'), id: 'renamedocumentbtn'}
  - Control.NotebookbarWriter.js add bigtoolitem Rename Document
- Maybe in Control.UIManager.js add a renameDocumentBtn function that
  - Creates a JSDialog with document-name-input element + Cancel btn +
  OK btn
  - Ideally that input element would re-use the functionality from L.control.documentNameInput() -> Control.DocumentNameInput.js

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I968e806a4a9e0018b38b87fc249a57e5af099c78
2023-08-01 09:26:35 +02:00
Szymon Kłos
cf545e8152 Don't steal focus from outside iframe on load Calc
When Collabora Online is inside iframe and we load
Calc spreadsheet, after few seconds we receive CellCursor
message. In case when user was typing outside iframe in
some textbox - we were stealing focus, what caused
that user started to type inside spreadsheet.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I12a5501be6f59f73830ff9bf25c98a00492b6caa
2023-08-01 09:22:01 +02:00
Caolán McNamara
8a715cb04c calc insert comment checks undefined tab field
and so this loop never finds anything, the intent is clearly to find
an existing comment in this cell so use the right field for that.

possibly a problem since:

commit 922ae4924a
Date:   Wed Jan 26 15:08:31 2022 +0300

    calc: Fix new comments do not check tabid on insert

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I11208493ef7eae6a01576d90129b25ed9f792d62
2023-07-31 09:05:23 +01:00
Pedro Pinto Silva
ec67c92264 Tablet: Non-functional sidebar button shown in read-only mode
Do not wrongly switch part of the UI to edit mode when on read-only
mode. Best to be only remove readonly css class when it's not needed as
opposed to removed it whenever refreshNotebookbar() is called.

Before this commit:
- We were showing tabs in wrong mode (readonly mode) -> every-time
refreshNotebookbar() was called. Thus, initial tablet mode was
appearing with icons and actions from edit mode.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6ad9c8c14e60d4c3513f63b75717db0a124b73ea
2023-07-27 16:44:09 +02:00
Szymon Kłos
a56f034dc6 Share code for findTailsGroup
Introduce getTailsGroupRect method which will be
different in every implementation but share findTailsGroup logic
using above function.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I321abaa2579bfdff08c8cd4df2e781cd9a28c3d3
2023-07-27 16:01:40 +02:00
codewithvk
8b5df0c4b3 Fix : Menubutton should have disabled state styling different
Signed-off-by: codewithvk <vivekpatel7202@gmail.com>
Change-Id: I1cd97503e0d3ca4333b11552ca3571093cf10bfe
2023-07-27 12:25:26 +02:00
Darshan-upadhyay1110
16bb328456 Added visual feedback after copy information into clipboard
* Added visual feedback to inform the user that information is already copied
 * Change the image to a check-mark temporarily
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I41debc2421841e4f2235f2d31c49d3687a096339
2023-07-26 18:59:45 +02:00
Darshan-upadhyay1110
2ac7183e44 Add Left or right arrow on a tab label should switch tabs
- accessibility key features
    - focus on tab when press `Alt`.
    - move back and forth tab focus by ArrowLeft and ArrowRight
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Id8c8e2a8bcb57c90e0762dd3916b851fff8e0a6f
2023-07-26 10:24:13 +02:00
Aron Budea
80a390f740 Revert "Fix wrong device detection logic."
On actual iPad (2048x1536 native, 1024x768 browser), in
landscape view in Safari, mobile phone view is shown in
online instead of tablet.

This reverts commit f1e9ee72fe.

Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I2cd4ba6cdcd616760c06c7db479e6d13be3d83b4
2023-07-26 10:08:58 +02:00
Pedro Pinto Silva
5aa5703885 Fixes #6946 and all unstyled kbd elements
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I09583d7c27cffc0f5b9722de1925977089bf832b
2023-07-24 16:30:02 +02:00
Szymon Kłos
fb2932067d Remove view selection on user disconnection
Fixes type error on switching sheets in Calc:

Steps to reproduce:
1. Open Calc spreadsheet with 2 sheets and 2 user sessions
2. Switch user A to sheet 1
3. Switch with user B to sheet 2 and select few cells
4. close user B browser / tab
5. switch user A to sheet 2

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I942becceaabae3a6e1bbbd230e12166348b341b3
2023-07-24 13:56:51 +02:00
Pranam Lashkari
fb5909bc40 theme: use integration theme value from the interation message
problem:
till now we used values from DOM elements which were unreliable,
sometimes they are not discoverable due to nested iframs.
That threw some 404 due to incorrect theming path.

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ibc291ce9f64db799095e1edcb14c598bdd085de7
2023-07-24 10:06:35 +02:00
Pranam Lashkari
d87b7c15d1 formulabar: fixed scrollIntoView caused problems
in some browser scrollIntoView causes problem without parameters
in this particular case problem was entire view being pushed upwords out of view
reproducing steps:
Open a spreadsheet in two views,
With 1st view, navigate to bottom right corner via Ctrl+⬇ and Ctrl+➡,
With 1st view, type something in that cell, and then the cell above (stay editing the cell, don't press Enter),
With 2nd view, start typing in A1.

2nd view's editing view is pushed upwards

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4bc551de321483608eb210718c1d81a622de5a6d
2023-07-20 11:16:40 +02:00
Szymon Kłos
7aeb2f7015 Increase timer for pre-fetching adjacent tiles
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I76cf16e12968e26a73dbddd39fc919b400cecff2
2023-07-20 11:16:23 +02:00
Szymon Kłos
f04d37af44 Mark slide preview as fetched when it arrives
This fixes the problem when we requested a preview but
core didn't answer. This can happen when we have
nviewid mismatch and error is generated in logs:
ERR  Session is not found. Maybe exited after rendering request.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I951a05432c899a8e7d210dec7d57177d6c7aae7c
2023-07-20 07:51:03 +02:00
Pedro Pinto Silva
0e22c2a744 refactor: Toolbar down icons: remove unnecessary !important rule
If we set the initial backgrounds without `!important` then there is
no need to use `!important` for dark-mode (since we are already using
a more specific targe via data-them attribute)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I600629dfc0485edac6ff725f6278de1501e1c9a7
2023-07-19 16:02:12 +02:00
Rash419
c91655a08f fix: failed to play media when using indirection
regresssion from 3c55baf4e2e36c6df43707a7e469dae3fec2c3b0

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I21831ba076140d49a54a56e9c52f7edfca923ef5
2023-07-19 16:45:49 +05:30
Szymon Kłos
96f4120e4f Adjacent tiles prefetching with delay
While scrolling using scrollbar we tried to prefetch
lots of tiles adjacent to the view.

Introduce timer which will protect us from prefetching
tiles we will not need when scrolling is fast.
We will avoid doing it synchronously on every little step.

_update is called a lot in onMouseMove handler:

_update (CanvasTileLayer.js:6220)
...
panBy (Map.PanAnimation.js:51)
scroll (Scroll.js:11)
ScrollSection.scrollVerticalWithOffset (ScrollSection.ts:657)
ScrollSection.onMouseMove (ScrollSection.ts:776)
CanvasSectionContainer.propagateOnMouseMove (CanvasSectionContainer.ts:1097)
CanvasSectionContainer.onMouseMove (CanvasSectionContainer.ts:1403)

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If785fd0c0cc9076043e348b86a09577ad9fa667d
2023-07-19 16:08:48 +05:30
Szymon Kłos
52627ab635 Prevent view from jumping on pressing alt key
this.accessibilityInputElement.focus();

line in onDocumentKeyUp in browser/src/dom/NotebookbarAccessibility.js
caused view to jump, in result half of the screen was white when
document was very long and had comment inside

To fix this insert accessibility input at the beginning of the DOM
so browser will not try to scroll anything when it is focused.

this is regression introduced in:
commit 3e40f3fbe4
Add functionality for notebookbar accessibility keys.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I68a1371928a5a3c02be32a3a9eab2ba909bb8ba0
2023-07-18 17:34:08 +02:00
Pedro Pinto Silva
cfece73517 Don't add outline to ShowInfoModal that have no buttons
Large Clipboard  and document idle modals were being set with tabindex
0 allowing for manual user focus plus were being focused dynamically
for each instance:
    - Transfer all that (just once) to showinfomodal instead for the
    cases where we have buttons
        - This in turn sets the things to the parent (dialog itself)
	and not the subcontianer
        - Set tabIndex with negative value so, it only allows focus via
    code
    - This fixes the weird outline (focus) that sometimes would appear
    on sub containers of that dialog instances

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If40192e05c4b0e25e2ce71bc612ab64fc54a29ec
2023-07-18 17:32:10 +02:00
Szymon Kłos
d696fe57f9 jsdialog: don't block uno commands when snackbar is shown
when any dialog is shown we block executing uno commands
don't count snackbar as a dialog and allow full interaction
of the user when snackbar is shown

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Idb1ec1aff9532ba2f1789157982cb25843df0c31
2023-07-18 16:00:52 +02:00
Darshan-upadhyay1110
fd630d427f Fix Spell checker js Dialog
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Idc0800eaa4ab751601bd34bba6c2e9cfef38de4d
2023-07-18 15:42:35 +02:00
Pedro Pinto Silva
7f2e5df037 Calc: fix document background. It should be white.
With c04c065edc we start to dynamically
set the canvas background. The problem is that for Calc cells do not
have intrinsically a background and thus what we end up to see as the
document background color is actually the canvas color.
	 - Make sure that when we are in presence of calc we set the
	 canvas color (clearColor) with the value coming from
	 documentBackgroundColor
	 - To make it clear: create a new CSS variable to be used as
	 background-document

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4c456e4aeea233609ee58684d967984dd8afd63a
2023-07-18 15:01:25 +02:00
Michael Meeks
226dfe83fb deltas: don't clear useful debugging counters when restoring tiles.
Otherwise when we get under pressure re: canvas' we loose useful
statistics around the number of deltas applied.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I44a089e4af2819007b8f400b506292f8d469ff82
2023-07-18 09:43:34 +02:00
Michael Meeks
ccc3d6277c deltas: fix re-consitution of canvas' from rawDeltas under pressure.
When we need to re-constitute a canvas from the cached compressed
tile.rawDeltas, we could re-enter via var ctx = this._ensureContext(tile);
as we had to populate the canvas with the previous content before
applying our new delta.

Its important to ensure that we don't then try to apply the same
delta (or set of deltas) twice - ie. move the context/re-constitution
before we append the new deltas to the tile.rawDeltas.

Previously showing the same delta applied twice:

Applying a raw keyframe of length 7320
Applied keyframe 0 of total size 264270 at stream offset 0 size 262144
Applied chunk 1 of total size 2126 at stream offset 262144 size 53
Applied chunk 2 of total size 2073 at stream offset 262197 size 2073
Applied chunk 0 of total size 2073 at stream offset 0 size 2073

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ib23bb81e6d3534f140ff3472afed1010c6f98cc2
2023-07-18 09:43:34 +02:00
Michael Meeks
e675dec329 deltas: don't garbage-collect keyframes from visible tiles.
We have no obviously good mechanism for re-fetching them, and
this seems a bit extreme - even if they are otherwise old.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibaa3d5185493de45efb2887d94b0bf1ee7cac245
2023-07-18 09:43:34 +02:00
Michael Meeks
06619df9ef deltas: handle deltas sent to apply to keyframes we garbage-collected.
In the obscure case: we could have garbage collected the keyframe
content in JS but coolwsd still thinks we have it and now we just
have a delta with nothing to apply it to.

+ show a count in tile debug-mode of this case.
+ re-request a full tile ie. with oldwid=0 if we hit this case.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ide95c54086fcc48d0deed1a090b3b9dd4aa49cd5
2023-07-18 09:43:34 +02:00