Commit graph

23442 commits

Author SHA1 Message Date
Ashod Nakashian
b2c980a91a wsd: refactor setting wopiInfo into the session
Change-Id: Id2850c43843cbb418e7c188efcd6d2e6bf652165
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
deb60c095d wsd: simplify uriPublic in DocumentBroker::download()
Change-Id: I5ca31e08716db4c0a47a952b89e6529b330b6370
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
e9591cfa25 wsd: pass uriPublic explicitly to downloadAdvance
Change-Id: I0ac6f32894ada50be59e9801b68a1918affd6a9e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
ac589f5563 wsd: formatting
Change-Id: I365121f2ccfc1bf1f73f4f8e41a8d84e920da1ce
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
577c1fb0d3 wsd: refactor the plugin processing
This reduces code duplication and makes
the code more readable by extracting
the huge block that processes plugins.

Change-Id: I2dc243173a4122ae1d5fc5b3fa2b40daff9664e4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
04526159df wsd: minor formatting
Change-Id: Ibe9d9d946fc9aba1b2ac754ef952dc6adda47961
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
96bfccd5ae wsd: remove MOBILEAPP for parsing CheckFileInfo json
Change-Id: I72b916d9ed9266afca21934278f8d01c1d97928e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
84fd030707 wsd: DocBroker with wopiFileInfo
Change-Id: I32c7be67a191df063f97d3c5d7f20ba2a57256da
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
ec2e9ccdc3 wsd: CheckFileInfo parses the JSON response
Change-Id: I5a9cd984930c6312de9088acd39b83acf1c07eb9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
4c19afdd01 wsd: capture the file size in StorageBase::FileInfo
Change-Id: I842c730a51cbb336e108f26e717a17b12f12eb49
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
de985834e2 wsd: simplify DocumentBroker construction
Change-Id: I5e908f0f5aed9146e14175eb79335fe9c80db2f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
062574341f wsd: move wopi stub/dummy interface to MobileApp.hpp
Change-Id: I58ac7467c4e74059e4de08c914546614ed6fe883
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
9782e3eea9 wsd: more accurate load error message
Since we have a more accurate reason
for failing to load, that's what we
should always return.

Change-Id: If9d38cf6de6d41310ba94857efcd073e3f4ef8b7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
21c3b4d3ed wsd: merge single-use findOrCreateDocBroker overload
Change-Id: Ib8087891d793effa3192b4a2b893733eec275f40
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
8e14087ef1 wsd: Support ahead-of-time document loading
Change-Id: Ia1cc7e42f7eea530097a37cce723b8833b998357
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
6bed4e631b wsd: create DocBroker once CheckFileInfo clears
Change-Id: Ie38070b9e8bddd7d546070a00c8bf3779f6e8cf4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
708e4a7746 wsd: uninitialized member
Change-Id: I2eefc58eb0105999277114c70c2b17bf3a615ccd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
034ea8b290 wsd: structured binding in findOrCreateDocBroker
Change-Id: I3387ff00cf11d848bbd24d490f879a17471d7f7c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
f38f5edd7d wsd: move overloaded findOrCreateDocBroker to RVS
Change-Id: I6a35a49ef3631769c4c38f8c63f86ce3e51aa695
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
9148996509 wsd: simplify findOrCreateDocBroker call
Change-Id: I8765b887d6fde34bdbb8ff361af6636d494f2ddd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
042e4366ef wsd: cosmetics
Change-Id: Ib5fd54abcda44ce8c62171cbbf8c51ffcd530344
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Pranam Lashkari
f29fe2a197 kit: set creation date when online creates file from template
problem:
when online created file using WOPI clients, creation dates were never set.
in online files are created using templates, even empty files are created using
an empty template

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I312d7af17bf322ca55b6e20bba344e4fc6628e66
2024-04-03 13:26:24 +01:00
codewithvk
c0ab567b31 Added additional menu entries and a new sub-entry under Conditional formatting
- Added 'Contains text...' and 'Duplicate...' as menu entries under Conditional > Condition...
- Introduced a new sub-entry Top/Bottom Rules' under Conditional, with the following options:
    - Top n elements
    - Top n% (n percent)
    - Bottom n elements
    - Bottom n% (n percent)
    - Above Average
    - Below Average

These changes enhance the functionality of the Conditional formatting menu by incorporating commonly used options for users.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I1c3c06b21a9d26e6a8966782c0af07381403c08f
2024-04-03 12:09:29 +02:00
Miklos Vajna
ea8202268c Related: cool#8648 clipboard: use JSON when requesting HTML only
Visit the
/cool/clipboard?WOPISrc=...&MimeType=text/html,text/plain;charset=utf-8
endpoint, you get a JSON with HTML and plain text. Visit
/cool/clipboard?WOPISrc=...&MimeType=text/html, you get HTML with a
custom header that is only possibly to skip easily because HTML itself
has as well-known header.

This is decied in ChildSession::getClipboard(), which has 3 cases: 1)
single specific format 2) multiple specific formats and 3) all formats.
So far only 2) used JSON, but the new async clipboard copy will want to
(als) request just plain text, where skipping our own custom header is
hard, given that the text itself has no well-known header (unlike HTML).

Solve the problem by always using JSON when a specific format is
requested, so both the HTML and HTML+plaintext case gives JSON.

The client side of this is the recently introduced Clipboard.js
parseClipboard(), which can cope with JSON already.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I8298f3f82d2a3871777c369f5aee6bb81d66a553
2024-04-02 21:41:57 +01:00
Darshan-upadhyay1110
5b6042f896 A11y improvements
Problem:

    - At various places, form elements are linked to the same label both through the 'for' attribute in the
associated label, and through the 'aria-labelled by' attribute in the element itself.
    -  This double linkage
can lead to confusion and redundancy, especially when using assistive technologies.

What should we do:

    - Remove Redundant Linkage: In most cases, the 'for' attribute in the label is sufficient to
    establish a clear linkage. The 'aria-labelled by' attribute can be removed in this case to avoid
    redundancy.

    - Consistent Use of Attributes: Ensure consistent use of attributes throughout the website. Use
    either 'for' or 'aria-labelled by' depending on the context and requirements, but avoid double
    linkage

Solution :

    - as we made label `for` attribute value consistent with `id` value for its corresponding `input/select` element
        - https://github.com/CollaboraOnline/online/pull/8646
    - now we can remove 'aria-labelled by' as there is already linkage present
    - there are some cases where labels are not present, we must use `aria-labelledby` in that case.

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: I389d271280a80835fd7345e8221e3777f8f8ed51
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-04-02 18:35:56 +05:30
Szymon Kłos
a214088801 Convert SearchBar.js to TypeScript file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I12dc1f0f6744d76a863ed0598185340a898a8b58
2024-04-02 15:02:53 +02:00
Szymon Kłos
13a16ace0a remove-w2ui: convert mobile search bar to JSDialog
- fix typo in cypress function name
- unify mobile and desktop searchbar controls

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2212f588ca720634b073111b1c78f10c6ee6b7ea
2024-04-02 15:02:53 +02:00
Miklos Vajna
25342ed317 Related: cool#8648 clipboard: extract parseClipboard() from Control.DownloadProgress.js
This way it can be reused in future code in Clipboard.js when
navigator.clipboard.write() is used, without duplication.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I843577e55802bcb7ad6cbdc5f83919172bc7d3e0
2024-04-02 13:32:23 +01:00
codewithvk
7e63d2e9d2 fix : Format -> Conditional Menu Button Not Working
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I6d23bc3c1c4b080ade32a97dd8408149f49d160d
2024-04-02 10:25:20 +02:00
Darshan-upadhyay1110
2009123f18 Direct Label Association
Problem:

- The labels for the <select> elements are being associated with a <div> element that surrounds the
corresponding <select> element instead of directly linking it to the <select> element.
- This creates an unclear semantic relationship between the label and the actual form element, affecting usability for
users with assistive technologies
- this was not only issue with `select` element but for all input selection elements in JSDialogBuilder

Solution:

- `lable` and it's corresponding `input/select` element should have same `for` and `id` values
-  this patch will make `for` attr of `label` equals to `id` attr value of 'input/select' elements
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: If341174edcdb72af6fde3da14d5ed36ba0c3ae95
2024-04-02 09:54:31 +02:00
Szymon Kłos
855f520989 Fix TypeError on accept formula button
- in the formulabar in Calc
- type "=" then click "accept formula"

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I120f655766bc5e2b4688aec0e598da9c847478a8
2024-04-02 08:54:39 +02:00
Szymon Kłos
ad5826e4c3 cypress: make mobile toolbar tests more reliable
- wait for enabled state
- then click internal button

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7663deb668de2e98b007fbace60386a4a7157058
2024-04-01 14:04:08 +03:00
Szymon Kłos
db86e87c30 cypress: make table_operation_spec.js more reliable
- it failed due to click on disabled button
- make waiting for idle click be aware of that
- add small waits after doing table changes to
  allow updates to be applied

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If19352923aeca4c18024f3a2ffcc3731a8aff96f
2024-04-01 14:04:08 +03:00
Szymon Kłos
128ce410f1 remove-w2ui: stop using old toolbars on tablet
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id8fd8e67c80eab7f48d1c519ecddb3d8dfd16062
2024-04-01 14:04:08 +03:00
Szymon Kłos
fb017302f1 remove-w2ui: convert mobile top bar to JSDialogs
- use dispatcher to invoke commands
- TODO: checked state for buttons + cypress check

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I652a163ea0c831b47ce7725ffd0f9f190a98d9bf
2024-04-01 14:04:08 +03:00
Szymon Kłos
7a087600e9 jsdialog: use attribute not class for disabled state
- but still use class for css rules
- after rework in styling to use attribute we can drop that

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I568eedf45440f6636c31430cb98adcfdeab6aa4e
2024-04-01 14:04:08 +03:00
Gökay Şatır
5224c3c72e Diverse the ray casting into smaller functions.
Add guard for notebookbar data  and tab existence.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ied5ef0f75735db12b108a9348062bcd48fd25fd2
2024-04-01 13:24:49 +03:00
Oli
a003dc90e5 Arrow keys traverse focus around notebookbar
When focus is in the notebookbar, arrow keys allow focus to be moved.

Signed-off-by: Oli <oli.baker@collabora.com>
Change-Id: Iccc9122f77c224e0190f25732ff9e4a24e4eab3e
2024-04-01 13:24:49 +03:00
Szymon Kłos
2aaadcc298 Fix TypeError on context change
it happens on context change (eg. shape selection) in
compact mode where context change handler used wrong
instance of toolbar

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9b080786454a3e7ecbf5273ba609671de3f3eb01
2024-04-01 11:30:29 +02:00
Szymon Kłos
5c7fb35e0f user-list: invoke by KeyboardShortcuts and dispatcher
- this helps to reuse code and keep it clean

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I029ac4f5d84f878f36a0d5d9abcecabe0ec63ad1
2024-04-01 11:26:51 +02:00
Szymon Kłos
dc943b31ed user-list: hide follow chip when clicked on it
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I35e6b5baf9c7569b8fa1e54a01a26f48024ffb05
2024-04-01 11:26:51 +02:00
Szymon Kłos
41e151a03a user-list: center name vertically, avatar ratio
- avoid resized avatar due to text padding

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3d7b48b3981303096a42a1d8901012cec8a64be9
2024-04-01 11:26:51 +02:00
Szymon Kłos
5cdb826829 remove-w2ui: use JSDialog dropdown for user list
- reuse JSDialog Dropdown
- remove hack with overflow which was needed to show
  any popup above notebookbar
- fixes scrollbar visible above compact toolbar when
  switching from notebookbar mode

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0366dbd68df20991d5fb26d116c38fb657e64c6d
2024-04-01 11:26:51 +02:00
Szymon Kłos
91701db744 jsdialog: css: put toolbuttons rules in btns.css
- put in single place with other button rules
- apply also to .jsdialog case (selected, hover)
  so it will be used in new toolbars

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic04e1939908e0030e710902d38846ba50954fe23
2024-04-01 11:20:36 +02:00
Szymon Kłos
7b1acd8684 remove-w2ui: update toolbar item status
- toolbar had it's own status updates
- adjust the old code to use new toolbar functions

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6da6b75b40678ed8d32500151b7c1e2c436a8cfe
2024-04-01 11:20:36 +02:00
Rashesh Padia
f4696be0ca helm: update README
- added recommendation for resource values for production enviroment

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Ia9a4b730bb7fd4c990d8c34531230b04c3a7f250
2024-04-01 12:37:20 +05:30
Aron Budea
47fcdd0cbc browser: Add Accept / Reject and Move to Next to tabbed bar and menu
Also fix Accept / Reject, which didn't show up.

Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: Ia27b19d640fb59e24b4f7ccabc0df7f2d1fa2498
2024-03-31 13:32:33 +10:30
Flavio F. M
506e489d5e Translated using Weblate (Portuguese (Brazil))
Currently translated at 90.9% (20 of 22 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 98.1% (108 of 110 strings)

Co-authored-by: Flavio F. M <flavius_androiduser@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/pt_BR/
Translation: Collabora Online/Android app
Translation: Collabora Online/Android lib
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibc54266fea67e85ff6151b88d6b759f630171718
2024-03-30 15:30:15 +01:00
Besnik Bleta
04c175daaf Translated using Weblate (Albanian)
Currently translated at 98.2% (572 of 582 strings)

Co-authored-by: Besnik Bleta <besnik@programeshqip.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sq/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I8e683218df997cdf83acf44f9fa692f6d7f843f0
2024-03-30 15:30:15 +01:00
Méven Car
3b2b186615 Translated using Weblate (French)
Currently translated at 96.7% (563 of 582 strings)

Co-authored-by: Méven Car <meven.car@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/fr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia991b53cfc8bf5a5fc6407e35fc9e84f1151f0b1
2024-03-30 15:30:15 +01:00