Bug 142653 - Missing Contextual Single toolbar in Calc
Summary: Missing Contextual Single toolbar in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Notebookbar-ContextualGroups Calc-Toolbars
  Show dependency treegraph
 
Reported: 2021-06-04 14:32 UTC by Stéphane Guillou (stragu)
Modified: 2023-06-29 12:10 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of Contextual Single user interface in LO 7.2 (69.58 KB, image/png)
2021-06-04 14:34 UTC, Stéphane Guillou (stragu)
Details
screenshot of default Contextual Single toolbar for 4 main components (LO 7.2) (100.29 KB, image/png)
2021-06-06 11:15 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2021-06-04 14:32:25 UTC
Description:
The Contextual Single user interface doesn't show any toolbar whatsoever in Calc (apart from the ubiquitous formula bar).

Steps to Reproduce:
1. Open Calc
2. Use the menu: View > User Interface...
3. Pick "Contextual Single" and click "Apply to Calc" or "Apply to All"

Actual Results:
The is no toolbar, only the formula bar.

Expected Results:
There should be a single toolbar above the formula bar.


Reproducible: Always


User Profile Reset: No



Additional Info:
Tested with:

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 774be6d793203183fe1856ffb8b720f00b48c2bb
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-03_19:22:06
Calc: threaded

and:

Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2021-06-04 14:34:57 UTC
Created attachment 172623 [details]
screenshot of Contextual Single user interface in LO 7.2
Comment 2 V Stuart Foote 2021-06-05 00:02:30 UTC
Sure it does. Insert something into a cell that needs a TB other than the Formula Bar.
Comment 3 V Stuart Foote 2021-06-05 00:07:25 UTC
The docked single pop-open TB are "contextual" (And why this is one of my favorite MUFFIN modes).
Comment 4 Stéphane Guillou (stragu) 2021-06-05 02:50:12 UTC
(In reply to V Stuart Foote from comment #2)
> Sure it does. Insert something into a cell that needs a TB other than the
> Formula Bar.

Stuart, I'm not sure I agree it looks as it should. Have you seen the attached screenshot?

Looking at the other main components of LibreOffice (which support this Contextual Single interface), they all have a default toolbar with icons for a set of essential controls and most-used features.

Impress, Writer and Draw all start with "Undo" and "Paste". They also all have an icon to insert a Table or a Table. And then, a bunch of other default controls that users are likely to want to have handy at all times.

In my opinion, Calc not showing a default icon toolbar with the main feature and controls, just like the three other main components have, looks inconsistent and feels like a bug.

Furthermore, I don't think that "inserting something into a cell that needs another toolbar" is even working as intended currently. Try for example:

1. write some plain text in a cell, press enter
2. click on the cell: no text formatting toolbar
3. double-click on the cell, select the text: still no text formatting toolbar

Even when that works (for example when clicking on an image), you end up with a top toolbar that pops in, moving the viewport. This does not happen with the other three main LO components with Contextual Single.

For these reasons, I think Calc's Contextual Single user interface is not working as expected, and inconsistent with the rest of LibreOffice to the point that it feels like a bug.

Reopening for some more input.
Comment 5 Stéphane Guillou (stragu) 2021-06-06 11:15:41 UTC
Created attachment 172656 [details]
screenshot of default Contextual Single toolbar for 4 main components (LO 7.2)

This screenshot puts side-to-side the default Contextual Single toolbar of all 4 main LibreOffice components, at startup, before performing any action on the new document. From top to bottom:

- Draw
- Impress
- Writer
- Calc

Notice how the three first components have a default toolbar with many useful tools, without requiring any extra action. They also have some items in common, like the Undo, Paste and Insert Image elements, which in my opinion should be present in the default toolbar of all 4 main LO components.

Calc does not have one, and the formula toolbar cannot be considered to be the "contextual single toolbar" as it does not change significantly or disappear depending of what the user is editing (for example, it is still present when an image is selected even though formula are irrelevant to images).
Comment 6 V Stuart Foote 2021-06-06 14:27:48 UTC
(In reply to stragu from comment #5)
> Created attachment 172656 [details]
> ...
 
> Notice how the three first components have a default toolbar with many
> useful tools, without requiring any extra action. They also have some items
> in common, like the Undo, Paste and Insert Image elements, which in my
> opinion should be present in the default toolbar of all 4 main LO components.
> 
> Calc does not have one, and the formula toolbar cannot be considered to be
> the "contextual single toolbar" as it does not change significantly or
> disappear depending of what the user is editing (for example, it is still
> present when an image is selected even though formula are irrelevant to
> images).

The observation is valid. Not sure if it was intentional or an oversite as Contextual Single was being refined. Standard (Single) 'Single Toolbar' shows a TB, and IIRC the full NB Single was dropped as for bug 125040, which does remain open.

@Maxim, Andreas -- thoughts? Still work to do maybe, and did Maxim's conceptual approach [1] for bug 125040 (agreed to in bug 124835) actually get implemented?  Looked, but I get a bit confussed following the 'Contextual Single' mode in source.

=-ref-=
[1] https://bugs.documentfoundation.org/attachment.cgi?id=151110
Comment 7 Heiko Tietze 2022-05-19 09:05:37 UTC
(In reply to V Stuart Foote from comment #6)
> @Maxim, Andreas -- thoughts?

Kindly reminder.

This ticket should consider bug 135501 challenging the number of UI variants.
Comment 8 Maxim Monastirsky 2022-05-26 07:50:03 UTC
(In reply to V Stuart Foote from comment #6)
> and did Maxim's
> conceptual approach [1] for bug 125040 (agreed to in bug 124835) actually
> get implemented?
What a mess. The discussion in Bug 124835 was mainly about the sidebar, and I didn't realize the agreement was actually about Bug 125040. And the comments in Bug 125040 suggested the discussion is still open. So I didn't implement anything.

(In reply to Heiko Tietze from comment #7)
> This ticket should consider bug 135501 challenging the number of UI variants.
If that is the case, why would anyone put time and energy into something whose future is uncertain. Suppose I start now to work on this - how can I be sure that my work won't be thrown to the trash after some time?
Comment 9 Heiko Tietze 2022-05-27 10:02:14 UTC
(In reply to Maxim Monastirsky from comment #8)
> how can I be sure that my work won't be thrown to the trash after some time?

You never know what the future brings. Some comments favor the Contextual Single variant over the Single Toolbar (so Notebookbar is the better choice than the classic toolbar). But if we put effort in, for example, XML based NB rather than Glade your work might be lost.

What is your take from the developers POV how to implement different UI variants and how to make it customizable for both user and developer/designer?
Comment 10 Maxim Monastirsky 2022-05-27 15:41:08 UTC
(In reply to Heiko Tietze from comment #9)
> You never know what the future brings. Some comments favor the Contextual
> Single variant over the Single Toolbar (so Notebookbar is the better choice
> than the classic toolbar). But if we put effort in, for example, XML based
> NB rather than Glade your work might be lost.
I was asking more about a single line arrangement _in general_, regardless of how it is implemented. Given that we want to reduce the number of available UIs, it wasn't clear if such UIs will survive. On the other hand, regarding XML vs Glade, I would guess that XML is safer, as it's also used by the standard toolbars, which likely to stay.

> What is your take from the developers POV how to implement different UI
> variants and how to make it customizable for both user and
> developer/designer?
The key for extensions and customization support is to have a well structured in-memory representation. But that's nearly impossible with a "freeform" on-disk format like Glade, so it likely will need to be replaced. The new format can be XML or JSON or whatever, it doesn't matter. We can even try to enhance the current toolbar XML to reuse some code (not sure if that's feasible).

But the hardest part IMHO is not the format but the correct behavior of the UI control, i.e. context switching, collapsing, resizing, a11y etc. I have no insights on that part.
Comment 11 Heiko Tietze 2022-05-30 12:03:10 UTC
(In reply to Maxim Monastirsky from comment #10)
> I was asking more about a single line arrangement _in general_

Pretty sure we will keep such an option.

> But the hardest part IMHO is not the format but the correct behavior of the
> UI control, i.e. context switching, collapsing, resizing, a11y etc. I have
> no insights on that part.

Maintainability is key too. There are so many lines of code for the NB itself and the UI variants. There is no simple way to change the UI. To bring it to the point: the UI itself should be extensionisable.
Comment 12 Heiko Tietze 2022-06-27 10:31:23 UTC
Discussion has apparently come to an end, so let's add the "Contextual Single" variant for Calc. See also https://opengrok.libreoffice.org/s?path=notebookbar_single.ui&project=core - we have it
Comment 13 Justin L 2023-06-29 12:08:34 UTC
repro 24.2+