L.Browser.touch is sometimes nice, but it's ultimately a flawed concept
to use it for input events. Using L.Browser.touch for input handicaps
people with mice if it's too liberal in what it classes as touchscreens,
and handicaps people with touchscreens if it's too conservative. There's
also no sweet spot: it's impossible to choose correctly if someone is
using both a touchscreen and a pointer device, as there's no right
option!
Previously many of our event handlers and some of our UI was gated
behind L.Browser.touch. This commit adds a new "window.touch" property
which is used instead. It has functions to help with event detection,
allowing you to easily make event handlers that work for only the input
devices they are designed for, without gating them behind feature
detection. This has the added bonus that - as you register all the
events - switching between a touchscreen and pointer is now not only
possible but already implemented!
For cases which don't have reasonable events to tag onto (e.g. the
teardrop for cursor movement) this commit adds "hasPrimaryTouchscreen"
and "hasAnyTouchscreen" which use the CSS media queries to detect if
there's a touchscreen attached to your device (either as the primary
input mechanism or at all). This works a lot more similarly to
L.Browser.mode, but being dynamically updated allows you to effectively
swich between touchscreen and not at-will. This still has all of the
disadvantages that L.Browser.touch did when used to register event
handlers, so my advice would be to avoid using it with events.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I9016fc15ad3ccb3664af348fdcdca006495b0778
problem:
some times we order comments before parent-child relation is established,
this caused reply count not being updated correctly for other users
steps to reproduce:
User A open ODT, let us say already with comment or add one, and keep Sidebar open so that comments are short.
user B opens the same ODT with full comments. adds reply
User A does not update ticket number, does not have +1
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: If3360c8dd938c6bd177764d3c1383d7f3f845990
This is safe to do as it's not interactive, so it happens synchronously.
The matching uno command was added on core.git co-23.05 in commit
1f5c20352725cd6133e68e80e8523d865006161f (sw floattable, delete UI: add
an uno command to unfloat frame from context menu, 2023-11-17).
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I74736c7d589c2062a8e9255a42f81bf790b7d3e3
The PopUp dialog is not closed, and side effects
are unresponsive key input
Change-Id: Id72ef0c6d081aa73acb39a07eb3e8b33d0e8dc85
Signed-off-by: Henry Castro <hcastro@collabora.com>
problem:
User A writes Comment 1 and saves
User A replies to himself, write something, click away to autosave, Cancel
user A modifies Comment 1 and OK - comment disappears, although it is there, seen after reload, but without modification.
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5d83936f26939b5a05a0ce3099c01923a55c9606
in:
commit 24f0819337
Date: Wed Jul 12 10:09:10 2023 +0100
tile debug: render updates as well as deltas in the tile.
one is typo for the other
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9cb27d7912aa86373b8ef399fca442f85cfd69fb
- will fix Misaligned ui-tabs in mobile wizard
- also added scrollable property that will handle more fields in tabs if it does not fit into screen
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ib982a59c141d937c7f92eb9684b91fc7f2548df5
Remove unused co-ordinates parameter, and unhelpful L.Log call
locations, ensure that all protocol messages are logged.
Increase the buffer to record startup and replay it for easier
debugging after startup.
Now when enabling "Protocol Logging" in the first minute from
document load, we get:
INCOMING[!fullyLoadedAndReady].statusindicator: find
INCOMING[!fullyLoadedAndReady].statusindicator: connect
INCOMING[!fullyLoadedAndReady].statusindicator: ready
INCOMING[!fullyLoadedAndReady].perm: edit
INCOMING[!fullyLoadedAndReady].filemode:{"readOnly": false, "editComment": true}
etc.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I5d2a8639e8038dbcc31d6e8fd1b8f8ebf2fff7bc
presumably a regression from 158fe2f93:
Trying to init LOKit cause mysterious runtime error...
Change-Id: I28603a98a7c9015afc76d46a302a23ccf4ece261
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Tabbed mode doesn't have a menu bar, instead it has tabs. These can't be
hidden. Unfortunately, the post messages to hide the menu bar have the
side effect of hiding the tabs. This commit prevents the tabs being
hidden when in tabbed mode, and shows the tabs again when switching from
compact mode into tabbed mode.
When switching back from tabbed into compact mode, the state that you
would like the menu bar to be in (hidden/shown) will be remembered and
restored. This includes any postmessages that were not acted on while in
tabbed mode.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I1177903fe965e354538e6e7bbc3c83af3177938e
Previously, when using the Collapse_Notebookbar postmessage or
equivalent ui_defaults (SpreadsheetToolbar=false, etc.), particularly in
compact mode, it was possible to additionally hide the menu bar. As the
button to show the menu bar is on the notebookbar, this meant that you
couldn't reactivate either notebookbar or menubar until you refreshed
the page. This is particularly annoying in integrators that may not
provide an easy way to reload the page
This commit makes it so that hiding the menu bar automatically
uncollapses the notebookbar and won't let it be collapsed again. Whether
the notebook bar should be collapsed (the last thing done to it was a
collapse) is remembered and restored after the menu bar is shown again,
so if you send a postmessage that will affect the state of the
notebookbar after the menu is shown (even though it will not affect the
notebookbar's state immediately)
Caveats:
- If you are hiding the notebookbar to limit the control the user has,
that's broken by this commit as it makes it impossible to hide both
the menu and notebook bars at the same time.
- The notebook bar will be hidden again when re-showing the menu bar,
however there still isn't a way to hide the notebook bar in normal
use (i.e. without using either postmessage or ui_defaults) while in
compact mode (although there is a workaround to show it- switching
into tabbed mode and then back!). It might be nice to have one.
Other considered solutions:
- We could add a new button that allowed you to reopen the menu if both
menu and notebookbar were hidden
- Not sure there's much benefit to this over just doing what we're
doing here, and it's harder to implement
- We could disable the button to hide the menu bar when the notebookbar
is collapsed
- As far as I know, there's no button in the UI to show the notebook
bar. This would make it impossible to hide the menu bar if the
notebookbar was hidden via postmessage or ui_defaults
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ieab6d72a6be181aba88e9a5b21dda16a369b9e54
- before this patch used send uno:ReplyComment on every autosave which was duplicating the comments
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I82b41783d97f5651c486011ac105750acf9589aa
It seems that datepicker control expects only a language input
in regional property (e.g. fr) instead of language-country (e.g. fr-FR).
Signed-off-by: Gabriel Masei <gabriel.masei@1and1.ro>
Change-Id: I7d5ac40cfa4a72cdc7862a8b4c4d14bdecad6c3b
When a document is loaded the Accessibility Support toggle button was
not set to the right state.
The problem affeced Online when integrated in Nextcloud.
Moreover the button label has been renamed to 'Voice Over' in
accordance with what suggested by NGI audit
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I5bc7d8348397691f469b6274af58e18a8d6d603c
At the moment, we try to detect whether the browser is running with a
touchscreen, however this is very imperfect. It's possible an integrator
may have more information about whether COOL is running on a device with
a touchscreen, so this ui_defaults option allows us to specify. Touch
mode binds inputs for touchscreen devices (long press for menu, pinch to
zoom, etc.) and does not bind the normal inputs (right click for menu,
etc.), so it's crucial to get it on all touch devices and no desktop
devices, as input is severely hampered if they are the wrong way round.
The option is called TouchscreenHint. Setting it to 'true' will enable
touchscreen mode, setting it to 'false' will disable touchscreen mode.
Leaving it undefined will keep our detection active.
This option must be set at page load so we can register the right
events at creation time. Therefore, ui_defaults is perfect as a method
to override this.
This is not a long-term solution. Instead, "The right thing" is to look
specifically for touch events and specifically for mouse events, rather
than using the default hammer.js behavior which is to look for both...
that should be an eventual followup to this. However, this was a lot
faster to implement and helps with the most pressing issue: not being
able to override our detection when it goes wrong.
Change-Id: Id28a156fe352fe6565ce6b472b7aa54d0869c48e
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
This is now safe to show, as it'll trigger the frame insert/properties
dialog, which was converted to jsdialog in core.git commit
355681eead2411d70caf4f52f1b802cf8c61a981 (sw floattable: make Insert
Frame dialog async and mark it as a jsdialog, 2023-11-06).
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I910012286416231d607cf79cc9b3811803c52768
A slide preview tile falls into the special case with early return and
no tileprocessed is sent back to the server, so eventually a
'Tileprocessed message did not arrive in time' will be reported
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iab85e5eca535ce377508e91cf67f1435e9242bc4
problem:
when user copy cell with formula and paste it outside of online,
formulas are pasted instead of values.
Ideally we should always put real value in client clipboard
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I93af2fffa501c3cdc3d8ecc78d3c44121784d3e8
This allows the creation of floating tables when an entire table is
selected by the time we dispatch .uno:InsertFrame.
Also add a matching entry in the menubar.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia0614d47275eb8d9127c496a0b06a8993c5f9989
It was reported on some iOS devices that we fail with TypeError
in getCorePxDocBounds - missing this.options.docBounds.
getCorePxDocBounds is used in Cursor class, check if we have
docBounds before use so we don't try to update without valid
data
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia48738edac33ab272e338e23f0d71f7ec4f54086
Currently translated at 63.3% (340 of 537 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 61.6% (331 of 537 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (5 of 5 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 59.4% (319 of 537 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (22 of 22 strings)
Co-authored-by: DPE <danpe_jobo@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ios-app/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/nb_NO/
Translation: Collabora Online/Android lib
Translation: Collabora Online/UI
Translation: Collabora Online/iOS app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iaabb7ffb88433e624d58dad43f3fbadd5aacd681
Currently translated at 100.0% (537 of 537 strings)
Translated using Weblate (Croatian)
Currently translated at 99.8% (536 of 537 strings)
Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I72997ea8388b0047305b9b77ca73cf29b0333f27