Commit graph

6873 commits

Author SHA1 Message Date
Gökay Şatır
de62c0f359 AutoFillMarkerSection: Refactor rectangle vars.
Now the size and color are easier to see and update when needed.
Debugging code is deleted.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I9f89d71507a8fe7553f921e4c26c2097d3222b9b
2021-04-02 11:24:14 +03:00
Gökay Şatır
49be5105e5 AutoFillMarkerSection: Follow up patch.
Remove unusued variables.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1b9b343d1e9388bb2b01da337da36f7dd3dc325b
2021-04-02 11:24:14 +03:00
Gökay Şatır
359ad0c80c Cypress test update.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ie6474f66e2996e8c6786b4b19c233361fe362334
2021-04-02 10:10:15 +03:00
Gökay Şatır
8c27a9f2f1 Enable AutoFillMarkerSection.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ic2cf7edbec1ca09259b555fee5d5972467cea291
2021-04-02 10:10:15 +03:00
Gökay Şatır
e381f9abd3 CanvasTileLayer: Remove _cellAutofillMarker svg element.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I0516faa46d4693a7744df7e5bc13f1d566eba177
2021-04-02 10:10:15 +03:00
Gökay Şatır
e6a17878c0 LOUtil: Rectangle class follow-up.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ib314aad2b1bd9faf6548857b27268c36a7c739de
2021-04-02 10:10:15 +03:00
Gökay Şatır
f2af95a797 CanvasTileLayer: Add pixel based variables for cursor and selections.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ic1659e8eb562f82f136ddf59a7d59681d99855e6
2021-04-02 10:10:15 +03:00
Gökay Şatır
f3853f4dd3 LOUtil: Add rectangle class.
Which will be working with core pixels.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I2d2a9320d3eb9bd3899219bca4e9a2d3b951e3f2
2021-04-02 10:10:15 +03:00
Gökay Şatır
6973bc0b87 Calc: Add AutoFillMarkerSection.ts
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I5e934cb8eb7113390194c083a65b1580df7ee179
2021-04-02 10:10:15 +03:00
Ezinne Nnamani
f700867731 Loleaflet: Impress slide previews in vertical orientation are modified to fit
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: I49e69d5ecb765e09bcd1d9c584883a1e2841ac0d
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2021-04-01 14:14:08 +01:00
Ezinne Nnamani
330b3bced2 Loleaflet: Paste shortcut CTRL + V does not work on comment dialog
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: I3bdf05ab3cd4159cb6e42f8705ad6987fa58ff08
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2021-04-01 18:42:09 +05:30
Pranam Lashkari
b8c85e7237 impress: hide regular slides in master view
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I2b1ececba67fb8855187baafdc42cb5baa051635
2021-04-01 14:02:46 +02:00
Pranam Lashkari
8487972256 leaflet: comment wizard: update comment wizard without closing it
in addition now newly added comments will be highlighted by default

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I130674753d0b34fb9afed778e99907d1848daf76
2021-04-01 17:20:12 +05:30
Tor Lillqvist
fc19f64bfc Fix UTF-8 decoding and fix handling of non-BMP codepoints for IE11
The UTF-8 decoder here was buggy, and additionally it tried to feed
the Unicode codepoints it had constructed directly to
String.fromCharCode() even if that function takes UTF-16 units, not
Unicode codepoints.

The function in question is used only on IE11, apparently, so
presumably the problems had not been noticed.

Change-Id: I78f8ecea6ce6349e4121066774ae5c3fcfa87363
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-04-01 13:37:55 +03:00
Pedro Pinto Silva
fbba996383 Fix background color in which document page is placed
Avoid pure white and instead use another color for canvas background

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4cc9dffd19932bc631f5b880e53f8d413357d662
2021-04-01 10:13:11 +02:00
Gökay Şatır
7588255b3d CanvasSectionContainer: Add getter functions.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I413c56a9d03236d733cb35636ba743ec49ce8400
2021-03-30 18:01:55 +03:00
Gökay Şatır
9cdcd61831 CanvasTileLayer: Add app.sectionContainer pointer.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I4fef4b3544c1a356bf800da5983547ce29258055
2021-03-30 18:01:55 +03:00
Gökay Şatır
a15597de9c Merge GridLayer+TileLayer+CanvasTileLayer
Some of the functions were overwritten by the child classes. They are
removed.
CanvasTileLayer was experimental when we first created it. But now it's
used for all document types.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1687c8d3e00d24a0bb2031ab74e4a3af044d9ca7
2021-03-30 14:36:05 +03:00
Gökay Şatır
86d3a3cd38 CanvasSectionContainer: Enable getTestDiv for all sections.
It wasn't usable when section is added by pushSection function.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I09a9db4fe27daad857f8f941606f0853e0e03399
2021-03-30 14:22:28 +03:00
Gökay Şatır
216cfbb6bd Remove extra check for positionOnMouseDown
We unintendedly solved the same bug with Szymon (while working on
different tasks), i removed the second
check.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I33b22364b58036fb57809476ebc689d9b542b4bc
2021-03-30 14:22:28 +03:00
Gökay Şatır
ffd61d848f Move map._socket to window.app.socket
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ia3f2b9d5d4516427d5b3b918cb4e5a503d9a79cf
2021-03-30 10:02:58 +03:00
Pedro Pinto Silva
c9b593741c Notebookbar: Improve shortcuts and fix top bar layout on tablet
- Desktop:
  - Shortcuts is now centered
  - Avoid setting hard min width for document title
- Tablet: Better presentation when on read only mode
  - Document name is now fully visible using all available space
  - Fix layout when on using tablet in portrait
  - When editing:
    - All top elements are now vertically centered
    - Document name uses better the available space
- Tablet: document-name-input: Fix shadow on iOS
  - Safari was overriding it with its own styles
- Generic:
  - Document name: do not use ellipsis if the text fits

when porting this please be sure that 81a5d029e was reverted first

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I82abe930ba5e26c004b387fbf4047de8412b8a36
2021-03-29 09:34:35 +02:00
Pedro Pinto Silva
44f420fd01 Revert "NB shortcuts-bar vertical alignment update"
This reverts commit 81a5d029e0.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8bfd3fec1d869be5ce0717091e27d59f6f331c25
2021-03-29 09:34:35 +02:00
Pranam Lashkari
eabdc70dda leaflet: set cursor to text if blinking cursor visible
problem:
when hovered over the scroll bar and then moving away from scrollbar,
mouse cursor would not be set to text even if cursor visible

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie27783cab0edfa3e264df41d584d81379e0afe79
2021-03-27 13:26:35 +05:30
Gökay Şatır
6a2d9c5923 Notebookbar: Sync tile container size after collapsing / expanding tabs.
Canvas element wasn't sync with map element.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I7771f662fb9a244b2acb1d450413343f4c450b1f
2021-03-26 17:39:16 +01:00
Gökay Şatır
3e1eaf4631 Calc: Enable freeze-panes on mobile.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I7d4b86b010527adb8dc110246db5d4356b1cd2d3
2021-03-26 09:57:43 +03:00
Dennis Francis
4dfdd7b3af fix: calc-desktop: noticeable prev zoom grids
Partial revert of "reduce white flicker when zooming" patch for calc
desktop case. Without this revert on zooming in desktop calc, there are
remnants of previous zoom grids on the canvas till just before the
redraw. This is very noticeable when there is a cursor active. This
needs more investigation for a correct/better fix.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8b0b99a73188d1b79f4fd8ff035ae802703ef8fd
(cherry picked from commit 1e9e199db4ad2d969bfa0ef80e4f9da16a9fa1e6)
2021-03-25 22:37:53 +05:30
Dennis Francis
0c1ceee541 fix: avoid marker/overlays at wrong position during final animation
Move the code that makes the hidden svg-overlays/markers visible again
to after when the map view is set with final zoom.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I60aa03593b5428e6c2bb5386e1ac000b1cb23ade
(cherry picked from commit e737291fc68365cd5194d76654d6eda02b297f92)
2021-03-25 22:37:53 +05:30
Dennis Francis
0dfda44d14 reduce white flicker when zooming
Fix description:
Before this patch when zoom is changed whole canvas is cleared and the
tiles are painted. This causes a white flicker when tiles take some time
to arrive and get painted after the canvas is filled with white. To
reduce the effect only clear the tile area just before they are painted
when they arrive.

In case of writer and impress there is the complication of document
content area not being the same as the view area. So we need to still
clear the "margins" outside the content area in that case.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib9d6c41fee0b1624da6280f4f9e3d8f85756e375
(cherry picked from commit 577d2ceefbe0d9400924f372b1699de0e00b5495)
2021-03-25 22:37:53 +05:30
Dennis Francis
4da948e549 fix: onscreen keyboard pops up during zoomanim
Problem description:
Currently we have a fake animation after pinch zoom animation, the
keyboard pops up just after the pinch zoom ends.

Fix description:
To avoid this lets disable the text-input element for the scope of the
"fake animation + map-view setting". Rename the map state
variable from "_inZoomViewPanning" to "_ignoreCursorUpdate" and
introduce [enable|disable]textInput methods which makes the intention
clear and could be used elsewhere when we need to disable onscreen
keyboard and ignore cursor update messages.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If49c83cd7e8172845aee362ba8b37c245fe4a946
(cherry picked from commit 939ca55d22828aedf172f7134f227de01dde3c09)
2021-03-25 22:37:53 +05:30
Dennis Francis
60dff49f32 fix: pinch zoom ends with an abrupt scale change
Fix description:

Before this patch in the final frame of the pinch zoom animation we draw
it at the 'final integral zoom' but this is perceived as a sudden jump
from the last pinch zoom factor to the final zoom. To improve the UX,
lets add a linear animation from last pinch zoom to the final integral
zoom. Meanwhile lets also initiate tile fetch for final zoom and center.
Also ensure that no tile painting or canvas clear happens while animating.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib542cd712704876b5164e7c6bdb9a7782b58efd9
(cherry picked from commit e790ed9439f10cd6a405e15dd6098519b74ce58f)
2021-03-25 22:37:53 +05:30
Pedro Pinto Silva
d1031e0e45 Notebookbar: Writer: References tab: Fields: rm duplicated & fix layout
- Remove duplicated of "Field" (Fields dialog)
  - Retain bigtoolitem
  - Remove menutoolitem with label
- Fix alignment of remaining field items
  - Group it in two groups
  - Vertically so to use notebookbar space more efeciently

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I40f74dbf7818d19ddead0d7e36f1f42f3ce59032
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
2f1ad35983 Draw: Notebookbar: File tab: Stack options and add download as png
- stack odg and pdf options, allows for better placement of future options:
  - svg
  - tiff
- Add download as png and respective icon

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I81b11a79d80898aca6288cea6e4e02559d9a0c51
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
5ec75c0a2a Draw: NotebookBar: Fix Print control
- Make it as bigtoolitem instead (to be consistent with the other apps)
- Make use of command

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I801802d81ba558f3778ea31a95d183c28bc70302
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
1c2c52c291 Notebookbar: File tab: replace instead of removing ellipsis
- Safer approach
  - iteration from https://github.com/CollaboraOnline/online/pull/1767
  - in response to https://github.com/CollaboraOnline/online/pull/1767#discussion_r596834601

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If5f3f1f2ed9b39e419911d39553df9e3fd9f19f4
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
f618744206 Notebookbar: References tab: InsertMultiIndex is too long
- Icon and label occupy a lot of horizontal space
  - Dramatic in smaller laptops
  - Limit width of that long label without increasing height

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1e78257f0c6c166372b585b2a5a47e2811f54129
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
53196acd4f Notebookbar: File tab: Remove ellipsis from Print and _saveAs
In sequence of issue #1285:
* https://github.com/CollaboraOnline/online/issues/1285#issuecomment-764556056
  * @kendy we are actually using the right variant
  which is the one used also in core tabbed layout but it also has those
  ellipsis
* Removing the ellipsis in the most visible case (File tab) for Print...
  and Save As... shouldn't be problematic as it does not had any extra
  condition and instead just slices the string under their respective
  object's property

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I04b01d8fb8b3ecb242fa684019a293cb5aaf51b8
2021-03-25 17:27:26 +01:00
Pedro Pinto Silva
b0c3de8317 Calc: Notebookbar: Download as CSV fix alignment
New section has been wrongly back-ported and was being set inside of
existing group instead of a new one. This was resulting in a column with
3 elements and thus the whole notebookbar content was vertically
misaligned.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I21683caf5d2d47b825b4c11eabdea98e516364e4
2021-03-25 17:27:26 +01:00
Henry Castro
3a5c56bac7 mobilewizard: check if "_docLayer" object exists
Change-Id: I875ebed7d2e8d0f8813c39a221e945988d511043
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
ad26e90596 Mobile: Macro Selector: Only show ellipsis when in empty state
- Display ellipsis inside of #command element when a library is still
  not selected
	- To communicate clearly to the user that there is still stuff to be
	selected
	- But also to hide that visual (ellipsis) when there is content to show
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>

Change-Id: I5d0a1e627de9e83908c2d79e0d52abd428f0280c
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
4ac5b9d2bb Mobile: Macro Selector n Warn: Layout improvements and style..
- Warning
  - File name: Increase contrast
  - Add icon to dialog
- Make it visible when a command is selected (commands get border)
- Use consistent radius
- Use consistent colors (CSS vars)
- Add bottom border to each li so to make it clear that there are more
  elements (and that is a list) and that it can be scrolled
- Avoid fixed height for Commands list
  - it was resulting in odd extra space when a library group has only
    one macro
- Macro Name: Use ellipsis in the content until the use selects library
- Add parent id to css rules( #MacroSelectorDialog )

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0e5aaf40e143b708104462da39b506feb29f6569
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
a0328fc627 Mobile: mobilewizard: use outline style for cancel btn
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I341d1d5f03d4582fa08f03a496aff46c56ae6bae
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
0c6bf9c28c CSS var: Add one more gray and replace instances
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8091ebd6e720dba8b6af4c503f515899e7f5f2d1
2021-03-25 17:24:57 +01:00
Pedro Pinto Silva
2610689d10 Mobile: Hamburger Menu: do not show Run Macro when in readonly
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id2b40f142c45e25b4af3adeaeb81490253424ead
2021-03-25 17:24:57 +01:00
Gökay Şatır
9f7e2e7344 Calc: Sync tile container size after expanding / collapsing input bar.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1dbe63587d9714101416dcf91726fcc40f8eedf8
2021-03-25 16:35:30 +01:00
Pedro Pinto Silva
738e50d17d Notebookbar: unnobutton: no need to increase size on hover
Already been set properly with
e23bf9fb30c75228d9a435504c98eddbabc322dd

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I731ba3883144e4fb34015434fa876d06be9d96e8
2021-03-25 13:24:29 +01:00
Pedro Pinto Silva
3ad3a7cc5e Notebookbar: Increase select status of unobuttons
in the sequence of the idea started in
https://github.com/CollaboraOnline/online/pull/1212
- by adding padding to unobuttons (independent of its status)
- do not really solely on margin

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iad3389226297b7a8504def148b5d869db936fd19
2021-03-25 13:24:29 +01:00
Tor Lillqvist
761ea64851 tdf#141217: Fix several keyboard shortcut problems on iOS
On Apple devices shortcuts like Copy, Paste, etc use the Cmd key
(also known as the ⌘ key), not the Ctrl key. We shouldn't check
KeyboardEvent.ctrlKey but e.metaKey. Introduce a function _isCtrlKey
that checks the proper property depending on platform.

That Cmd-V still doesn't work for plan text put on the pasteboard by
another app needs to be fixed in core.

Change-Id: I4e8a05afaed0bde193d00a7ded52fcebf3536b5f
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-25 11:01:25 +02:00
Gökay Şatır
f1aef821bd Scrollbar: Fix flickering.
Scroll bar animation was flickering after mouse leaves its area.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ie4d96d98dee806e6b02c8c8a23dd4eaccabbf7b0
2021-03-25 10:34:03 +03:00
Pranam Lashkari
cd1f4f6e95 leaflet: removed Obsolete property fullscreen
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Idb7742730294e6891e2971be8e63914c4985603b
2021-03-24 18:23:08 +05:30