There was a bug in Writer not allowing to successfully reconnect
after idle state if we were not a first view in the initial document.
Let's update view id even if document size wasn't changed.
Added also additional error logging to be sure we never use -1 viewId which is
a default "bad value" when we enter some unwanted state in the core.
Steps to reproduce:
1. set per_document.idle_timeout_secs to something small, eg. 30, so sessions time out quickly,
2. Open a document with 2 sessions (remember which one was loaded first - A, important!)
3. wait for it to idle out in both sessions
4. activate SECOND session (B) by click on the document area
Result:
in the browser console you can see an exception:
Exception TypeError: this.map._viewInfo[this.map._docLayer._viewId] is undefined emitting event viewinfo: [{"id":0,"userid":"2","username":"LocalUser#2","readonly":"0","color":411298}] cool.html:359:37
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I23775230e169f61cb816b819f2dea56e293b20e1
To manage latency, we need to keep the amount of data-in-flight
manageable, this was previously done per-tile - however this is
less useful in the era of small deltas, and seems over-complicated.
Instead track processed tiles by their wire-id to save time,
space & bandwidth.
Change-Id: I1039d8d4ca96fb172278a824fe1ffd55d9fff23e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Accurate per client tracking of wire-id and avoidance of duplicates
is vital for good delta application, and is done precisely by the
ClientDeltaTracker class.
The inaccurate, _oldWireId tracker imperfectly tracked wireids of
the last tile per session, and used this integer for the boolean
oldWireId used to determine whether to create a delta; in an
un-necessarily complex way.
Instead we more accurately use the TileCache to determine if we
already have a key-frame, and if so use this to encourage Kit to
generate a delta if possible. there seems to be a potential race
though between the Kit's delta-cache size, and what keyframes
we have in the TileCache requiring further investigation, but
this is not a new issue.
Change-Id: If6cec4c1da31f7b715336c60d1dd6f358e1ef6a4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Instead throttle rendering only based on the number of tiles on
the fly down the coolwsd <-> browser socket.
It is almost certainly better to let the Kit process sort and
prioritize rendering with a more holistic view of all rendering
requests, and to elide duplicates - rather than to stack-up some
requests in coolwsd.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I566959306815ddc2742a0fe2694df6a1371c6852
This is in line with MOBILEAPP and GTKAPP and
is independent of __EMSCRIPTEN__.
Replace all application-specific cases, leaving
only toolchain-specific ones (such as include
protection).
Change-Id: Ic44288aa5ace51e0a8b54566170c19120f7bf0dd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We now have at least one C TU and enabling rtti for
the sanitized build breaks things. So we don't enable
rtti for C sources, which was done in error.
Change-Id: If7624993ceb9e7af7aa8ffe3df69069ea4dd153a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
There's a bit of a mobile/wasm munge with wasm considered a subset
of mobile in some places which should be unwound a bit, but for the
purposes of usable wasm by default, don't assume that wasm has an
onscreen keyboard so we don't lose keystrokes on assuming that
there will be an onscreen keyboard appearing when we lose and regain
focus.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I0baae0d414ce9aafd1c27d74bcdad2276d104ee5
the default suggestion uses --enable-qt5 which isn't needed for
LOKit and breaks finding custom notebookbar widgets so online
notebookbar doesn't work with it.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I644924a0f8cdb01d4ec20d70ff7aedb27a2c899f
- previously, when document was getting idle, it was
showing a snackbar "The server is disconnected" which
unnecessary plus the snackbar was persistent even
after reconnection.
- There are two scenarios to be tested,
1. It shouldn't show snackbar on idle
- Set per_document / idle_timeout_secs to something small, eg. 30,
- Open a document, and wait until it idles out.
- make sure it doesn't show "The server is disconnected" snackbar
2. It should show "The server is disconnected" snackbar when you shutdown
the server, when you start the server again snackbar should disappear
Change-Id: I4ccc93dabb4dd260338d5a941b18ebaf8e42b1ad
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
it was previously required to handle comment scrolling separately but not anymore
it was introduced in a3e59d1
current problem:
when a comment is very long that it overflows and has a scroll bar,
it is only possible to scroll using the scroll bar and mouse wheel didn't work
fixes#7735
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I6d9f85c61b837f86e021a795e8af43b375a318d1
Original approach before comment autosave:
When we save a new comment, original DOM element which user was editing
is removed from the DOM and new comment DOM element is created from the data and message sent by core.
Previous comment autosave approach:
When we save a new comment, original DOM element which user was editing
is not removed but kept in editing mode. We register the comment message sent by the core
but react and create new comment DOM element only after user clicks on save or cancel.
This lazy initialization caused many regression due to juggling of the new and old comment DOM element.
All these problems were in JS side only, reloading doc would bring comment in correct state.
This approach gave smoother transition between different comment states without any flickers.
New comment autosave approach:
Simple as the original approach, when comment loses focus we save it as normal comment.
When new DOM element created via core comment message, we immidietly set it to edit mode.
This approach may have a little flicker when we replace old comment DOM element with new comment DOM element.
Overall this approach requires less condition checking which makes it easy to maintain and hopefully reduces any regression from previous method.
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4098085825ede65cdbf2e2243fc4d2bb1f63c716
Helper that is easier to use as has "options" parameter
not a long list of possibly optional ones...
It is first step to refactor old UIManager.showInfoModal
helper, which is less flexible.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I34eae39cab583985ad3d940aa025aee0a374e25e
If administrator doesn't allow some URLs in the coolwsd.xml
under net.lok_allow then when pasting webpage with images
- it might result in missing pictures. We should show the
user what happened.
User can click "don't show this again" to avoid annoying
dialog on every paste.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iec9035860b1c6a332420defd539000e8854447c9
This is a workaround for the bug, when a txt or a csv file was opened,
and there were both the classic menu and the menu of the notebookbar
at the same time at the top of the window. This bug occurred because
regardless of the user's UI mode setting, the read-only mode has the
classic menu. The fix also have a side effect, that is better than
the original symptom. Now when a txt file is opened, and user starts
editing it, the Zotero buttons won't be on the References tab. I
think it's a good trade-off, but FIXME.
Eventually, when we won't have the classic UI mode any more, this
problem would be solved better, for all corner cased (txt. csv, pdf,
read-only shares etc.)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic3f95c02a0b75136a0b8069fa8297ed129b63865