Commit graph

148 commits

Author SHA1 Message Date
Rashesh Padia
b9ef48310e mobile: add save progress bar on top toolbar
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I14c8a715e922d00b2cfd8f67afd7fc2df2dd9d38
2024-05-24 09:16:39 +01:00
Pedro Pinto Silva
0ad09fda60 Impress: fix slide preview animation and color
Replace svgs introduced in 3efbfaeccd
- Animation and smiley svg: Use gray
- Don't use a smiley face, use instead something more semantic such as
a checkmark

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I38e341ae393c59e785adff9207f8111d68c341ef
2024-05-21 15:06:45 +01:00
Rashesh Padia
f7892edd86 js: show progress bar during background save
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I3608bf597ab8d2c7660a1f884cf2c763c7652415
2024-05-17 13:18:37 +02:00
Henry Castro
3efbfaeccd browser: preview: add initial preview smile
Change-Id: Iad438677637850f8e410e7ba652a30673bea234a
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-15 10:13:30 +01:00
Henry Castro
15338e91c3 browser: preview: replace meta preview place holder
It is required to initial preview place holder,
otherwise, there are some cases that the server takes
time to serve preview_placeholder.svg and it may cause
an ugly effect.

Change-Id: I70ac46c8c464b64a09f091cdf5f8644d208a79d4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-10 14:58:19 +01:00
Méven Car
dab5afac90 postMessage test page: Add messages from editor view
Add CloseSession button.
Also improve spacing of elements.

Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I9999654f9d53d44016eeb0ea587cf3f61b000471
2024-05-09 12:08:43 +02:00
Pedro Pinto Silva
caa132c386 Fix calc-mobile top toolbar and formula bar which are broken
Pedro :
This changes from flex to grid (so we can have multiple columns and 2 rows)

Darshan:
    - adding one more div and wrap all child of toolbar-wrapper execpt 'formulabr' will work here
    - i have tested the css grid approch it is breaking the mobile UI in Calc
    - here i have changed a bit in html and twiked css which covers all cases

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia50fda95e2bef57d707bb4be1dd34e2ec083bfc5
2024-05-02 13:55:25 +01:00
Darshan-upadhyay1110
872ac5ad29 Adjust table elements for mobile view.
- we changed table structure of `toolbar-wrapper` with `div`
- so we also need to consider mobile view
- made some neccessary changes for mobileview because of structure change in cool.html.m4 ('toolbar-wrapper')
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I91cd2c3ffbb0d625a78852398f6773136e9a7f6b
2024-05-02 13:55:25 +01:00
Darshan-upadhyay1110
dd3df946e1 Change table layout to CSS base table structure
- For the editor in the home view, a layout table is used, and it includes the use of IDs. This can
potentially lead to issues with the interpretation of content by assistive technologies
- Layout tables are
meant to structure the layout of a page and should not contain structural markup like th , caption ,
summary , headers , or id.

Solution:
- replace `td` and 'table' tag with `div`
- make some changes on css to be consistent with our prev design
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I136cd8d51b2e5035c6ef4292f759f49519e5bd61
2024-05-02 13:55:25 +01:00
Skyler Grey
f21031c998 mobile: Use SavedUIState=true
SavedUIState is a ui_defaults option to ignore any user preferences for
state when loading, it was added in
https://github.com/CollaboraOnline/online/pull/7575

We need to set SavedUIState explicitly on mobile, which the following
pulls do for iOS and Android respectively:
- https://github.com/CollaboraOnline/online/pull/7908
- https://github.com/CollaboraOnline/online/pull/7912

Unfortunately, setting it to false can cause some nasty bugs, such as
inability to change theme to light. It also intentionally ignores user
preferences when you reopen a document, but this isn't particularly
desirable on mobile.

I believe it to be an oversight that the option was set to `false`
rather than `true`, as `true` was the behavior before the ui_default
option was added and neither change gives a reason for it to be false
rather than true.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I30ce445db1b7e69a3b44eec3fb4689c463233b1f
2024-04-23 08:20:35 +01:00
Miklos Vajna
ad74670af5 cool#8734 browser: allow enabling dark mode from a URL parameter
One way for integrations to ask for dark mode is to set URL parameters.
This works for e.g. the language, but didn't work for dark mode.

There was already a parameter for this, but it was limited to Android.

Fix the problem by exposing the parameter for non-Android as well, and
also extend global.js to default to this, but keep the local storage as
an option to customize the setting if the user wants to.

Tested with 'make run', <input type=hidden> way may need more work on
top of this.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I78c4115a8e337ef2b1ea9e498db2572965762bef
2024-04-11 08:33:21 +01: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
Parth Raiyani
c9ef8c3015 Removed Group download as option from coolwsd.xml
Signed-off-by: Parth Raiyani <pmr642001@gmail.com>
Change-Id: I47c07ed88d68de5fc65b2e5e1e0896bc2a082131
2024-03-29 15:07:07 +01:00
Skyler Grey
50dd9477a6 Stop following text overflowing chip
With some styles the following text was too large for the chip.
Unfortunately, sizing it to be consistent made it unreadably small. To
solve this, we can show only the first line of the text in the following
chip and show the second as a tooltip instead.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I4b5306370c31f4d0b13e1a91bf17a9d491807c45
2024-03-19 10:43:48 +01:00
Szymon Kłos
a0a169920c PostMessage test page: add export with notify set
This allows to test responses.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Idfee8632ac0aeb8a105555e7c9d527288568091e
2024-03-07 06:58:17 +01:00
Andras Timar
18fb549d72 help search input attributes
- type="search" for a11y
- spellcheck=false" to avoid red underlines
- localizable placeholder is added programmatically from 34bf81f146/browser/src/control/Toolbar.js (L552)

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I695990a25ccb00821a16738a9388a51001199112
2024-03-04 12:09:19 +01:00
Skyler Grey
81497efd55 Replace innerHTML with innerText
Previously we were using innerHTML to insert user-generated content
(usernames) into the document. While we were sanitizing these correctly,
it was hard to tell that we were and required a level of knowledge about
what was kept where (e.g. were we getting the usernames from the
sanitized cache or from an unsanitized event?)

By replacing innerHTML with innerText, this commit removes the risk of
someone making a mistake like using the wrong variable and introducing
XSS. It also makes the code more obviously secure

Unfortunately, w2overlay doesn't support using any property that is not
"html" to provide a message, so we can't directly use innerText. For now
I'll move the sanitization process directly above where we set the
message to make it obvious, but for this reason (and typescript) we
should consider replacing w2overlay in the near future

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: If935dc2d765dd5e345ce760cad88386ea98d97b4
2024-02-28 16:07:22 +01:00
Skyler Grey
ade2fa7bd2 Improve styling for the new userlist and following
Previously the userlist and following worked, but were out-of-place
with the rest of the application. This was particularly noticable on
hover where I used a changing border color and text decoration rather
than the usual background change. Additionally, as I was using border
colors to indicate hover rather than a background change this caused
contrast issues on the light theme.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I79373227d6efd397691038ab290a85b2913e0fad
2024-02-28 16:07:22 +01:00
Skyler Grey
e4b8cbe014 Add a chip to show who you are following
The chip displays beside the user list, and has information about who
you are following. It displays in the color of the user you're
following, and connects to the already displayed user avatar.

This chip is the first indicator we have that you are following someone
when you are not in the user list popup. This is important, because it
is easy to forget that you're following someone and be surprised when
you are jumped across the document to wherever they are.

An alternative that was considered was adding a border around the view
in a similar way to Figma's following border, and adding a status box
to the document view in a similar way to Visual Studio Code Live Share's
following notification, however it was decided that these could be
detrimental to people who were zoomed in a lot, and particularly Figma's
border could be confused for a document border.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I112fa572bdae8a7aa43493e0237c7dfae8570294
2024-02-28 16:07:22 +01:00
Darshan-upadhyay1110
38d8944621 Refactor show/hide section code
- we need to add display blok or table-row according to section tag
- add generic function to show or hide any section or sub section
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ib0996842a0c3703a6daf0754e739d4d5e00621cc
2024-02-23 09:57:56 +01:00
Darshan-upadhyay1110
df824e43c7 Refactor main section selection query
- Select section based on dialog type ( either "help-content" or "Keyboard-shortcut-content" )
- There are some section specific to doctype so only consider the section based on current doctype

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I56533b9cea0ad70b445ae864db23256a10ee27d7
2024-02-23 09:57:56 +01:00
Pedro Pinto Silva
3cda990ad6 Help dialog: fix low contrast TOC when using dark mode
Refrain from using hard coded dark text, use instead css var that
changes according to the light/dark mode.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7343c422a06a7415406d6d476adade77810c68c5
2024-02-22 09:45:20 +01:00
Darshan-upadhyay1110
afa593f0aa Show alert effect on input field for un-matched filter terms
- animation on input field if search term is not matched with any section content
- add auto focus in input field on dialog open
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ie0415affeeb59a2a785bf5ffd9f32f1e98471958
2024-02-22 09:45:20 +01:00
Darshan-upadhyay1110
edfaa0d3b9 Add filter content with entry widget in help => online-help
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I7578c621c28b7a5d18c76f2fff834ad2edd68ca5
2024-02-22 09:45:20 +01:00
codewithvk
43db77e66d Add loading indicator for document title saving
To address the lack of visual feedback during the delayed saving of document titles, a loading bar has been introduced below the document name/title input field. This provides users with a clear indication of the ongoing save operation. Additionally, the delay that previously occurred after entering a new document name and pressing Enter has been eliminated, streamlining the save process.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I9c5a41f999d02dcfaa24e7925029499cf310b2e0
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
2024-02-07 13:09:13 +01:00
Henry Castro
fc4a8efefe browser: move function "isLocalStorageAllowed"
The variable initialization does not depend on
the conditional M4 macro expansion.

Change-Id: I39f0079ea668768724e0ca3175070e66dc858b0b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
28236b2405 browser: move iOS app init event listeners
The iOS app add event listeners is not a
conditional M4 macro expansion, so
move into the global.js file.

Change-Id: I3adb767cc191a73f0d9197af692e22dd72c6ab46
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
26dd660681 browser: remove unused function "Base64ToArrayBuffer"
Change-Id: Ibcdaf6a9e06b7cb169a1e59e8efc952a1291a6e5
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
1d08877b01 browser: remove unused function "onSlideClick"
Change-Id: I90ef1fda39c52ac231d6407fb14d1bacde9d3a7e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
a722687c11 browser: simplify getParameterByName
Use built-in URLSearchParams object

Change-Id: I99effedabf39902ccabfa34285d62fc5df2d2e01
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Bayram Çiçek
3c8f6c748b Calc: Update Ctrl+Alt+PageUp/PageDown shortcut strings
- Ctrl+Alt+PageUp and Ctrl+Alt+PageDown shortcut
behavior were updated with 1bf686859d3cf1f5489d2dcebbb1472ca068d1c5

- Documentation in "Help > Keyboard shortcuts" dialog has
been updated as:

  - Go to next sheet. -> Ctrl+Alt+PageDown
  - Go to previous sheet. -> Ctrl+Alt+PageUp

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I5eafb2226788660d53d69c12f698e6c8997c90d9
2024-01-15 11:24:09 +01:00
Andras Timar
890cda88a7 do not display 'Go Offline' button when WASM is not enabled
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I02bde8b9f6ca5cfadc036ae930e7f6eeb23c2587
2024-01-06 19:03:13 +01:00
Andras Timar
00278bc5a9 Set window.savedUIState to false in Android app, too
Similarly to the iOS case seen in #7908 the %SAVED_STATE_UI%
does not get replaced. In mobile apps there is no fileserver
that can replace these variables.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Icb7f9d7550b0990cc0ad1d65253773b49ff97795
2024-01-04 09:13:33 +01:00
Andras Timar
bd649e2d40 Enable grouped 'download as' for mobile apps to save space on notebookbar
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib2388139e0214c9f244796546a362b56cca986ed
2024-01-04 09:13:33 +01:00
Hubert Figuière
738505c4de framed.doc: Added postmessage for Get_User_State
This was introduced in https://github.com/CollaboraOnline/online/pull/7514

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I98b9b5b04742541904afa2361ac961498a54c29d
2024-01-03 15:55:37 +01:00
Patrick Luby
bb6fea0bea Set window.savedUIState to false in iOS app
When building the iOS app, the %SAVED_UI_STATE% does not get
replaced with a quoted string during the build and the resulting
unquoted string causes document loading to stop.

Also, eliminate warnings when running in Xcode by adding missing
CFBundleTypeRole entries in the iOS app's Info.plist.

Signed-off-by: Patrick Luby <guibomacdev@gmail.com>
Change-Id: Ie398955241a078be45af28e54c49387ff673870b
2024-01-01 09:59:40 +01:00
Hubert Figuière
85e36b3bb7 postmessage: Added Action_Fullscreen and Action_FullscreenPresentation
They allow respectively to switch to fullscreen, or to start the
presentation in impress in fullscreen
Action_FullscreenPresentation can get the following arguments:
- StartSlideNumber: the slide to start at
- CurrentSlide: start at the current slide
The options are exclusive to each other. StartSlideNumber takes precedence

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I4d97eadf8c119e70e5738df4063d209feb5db793
2023-12-15 09:47:54 -05:00
codewithvk
367f618689 Fix: Many Icons Not Inverting Color In Dark mode cool-help
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I3015e6a40030d40fe11d2db85703b8be1eefbed1
2023-12-14 15:16:34 +01:00
Hubert Figuière
fa268b8e0e framed.doc: if entering bad message data, recover
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I6337029fe1eeffb7f20acaa100602ea44a0dbc63
2023-12-06 08:53:29 +00:00
Hubert Figuière
3fc8bdffe3 framed.doc: Allow switching app on the fly
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idad883f566a02b1e777c8c7af6b9b52da3a62e69
2023-12-04 11:10:15 -05:00
Hubert Figuière
44b92e18af postmessage: don't send ready message unecessarily
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ia57d19298615fe4cd5b95c60c6b097631d54e4b4
2023-11-30 11:49:39 -05:00
Hubert Figuière
2afa6db0ca postmessage: Added Show_StatusBar and Hide_StatusBar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I86d507f6aad7f3acbc69e82f366e14b4ea78824a
2023-11-29 09:27:52 +00:00
Hubert Figuière
c1f9da92a1 framed.doc postmessage: Hide/Show the ruler
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I1b2f7c4ee0e4faebad4050167ce7aabb6adce275
2023-11-29 09:27:52 +00:00
Hubert Figuière
1ef0ffeb76 framed.doc postmessage: Hide/Show Save work with the notebookbar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ie0b58528d1545948fbf50d095093fd837ef913cd
2023-11-28 16:03:33 +00:00
Hubert Figuière
79e33ab76c framed.doc: Relayout the post message test harness
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idbd1b5d89ea53d4f9925b727e8db2854ac23b17f
2023-11-28 16:03:33 +00:00
Caolán McNamara
afc28b9e69 we want %ACCESS_TOKEN%, etc to exist for wasm
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I58f187c28c158e80fbe97290bb802b3481a44de9
2023-11-27 10:48:44 +00:00
Andras Timar
70e960b564 disable spell check for document name input field
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I23e03ba381aa320511aacf24196aba1ff934fc52
2023-11-23 14:32:13 +01:00
Hubert Figuière
1114af585a default-ui: Allow skipping the UI state saved in local storage.
Pass SavedUIState=false to the ui_defaults

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I2cceffed338440d1fee5b0818e072ecc02379468
2023-11-08 10:12:42 -05:00
Skyler Grey
0bf054c9a3 Stop onscreen keyboard when panning calc on tablet
Before this change, panning a calc spreadsheet would cause the onscreen
keyboard to pop up when in tablet mode. Dismissing the keyboard would
not stop it from being popped up the next time you panned around. This
made it very difficult to pan around spreadsheets in calc without either
using an external keyboard, the mobile app or another device altogether.

This commit introduces a known regression: when you are on a tablet and
have a physical external keyboard, you could previously select the cell
and start typing. Now you must tap into the cell in the same way you
would if you have an onscreen keyboard. This matches the behavior on
mobile devices. I consider this regression a reasonable tradeoff, so
notwithstanding I believe this should be merged.

Additionally, this commit adds 2 POST messages, "Hint_OnscreenKeyboard"
and "Hint_NoOnscreenKeyboard". These can be used to override our guess
if you know more about whether the device has an onscreen keyboard than
we do.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I8f3683ccb9e57f0c4a5bf8e415f9aabef917dd78
2023-10-31 16:32:33 -04:00
Hubert Figuière
8ca2adcb16 postmessage: added message to collapse / extend notebookbar
The new messages are: Collapse_Notebookbar and Extend_Notebookbar
As a side effect they also hide the classic toolbar the same way

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ic9d04876acb06f2885a6be1e171df7f87e513ed8
2023-10-30 11:40:52 -04:00