Bug 154917 - Remove Random Number Generator from the context menu and add it to the Insert menu at the NBs
Summary: Remove Random Number Generator from the context menu and add it to the Insert...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Justin L
URL:
Whiteboard: target:24.2.0
Keywords: difficultyBeginner, easyHack, skillDesign, topicUI
Depends on:
Blocks: Notebookbar-Tabbed
  Show dependency treegraph
 
Reported: 2023-04-19 22:03 UTC by Rafael Lima
Modified: 2023-10-16 13:25 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-04-19 22:03:48 UTC
So I've been using the Random Number Generator a lot lately and I noticed that it is not accessible via the Tabbed UI.

Since it is not used by that many people, I suggest we add it either to the "Insert" or "Data" tab inside those dropdown menus on the right side.

The command is .uno:RandomNumberGeneratorDialog
Comment 1 Stéphane Guillou (stragu) 2023-05-03 07:33:41 UTC
Looking at a recent master build, the Insert tab is not too busy, I wouldn't mind seeing it there.
Discoverability of the function through menus (Sheet > Fill Cells) is not great, so even worse for Tabbed UI users.

UX team, thoughts?
Comment 2 Heiko Tietze 2023-05-03 14:00:39 UTC
The Insert tab exceeds our minimum screen size right now. And adding a (literally) random function, one could ask for any other too, makes it not better. Adding it to the context menu sounds sensible, however. 

Other opinions?
Comment 3 Stéphane Guillou (stragu) 2023-05-03 14:36:11 UTC
(In reply to Heiko Tietze from comment #2)
> The Insert tab exceeds our minimum screen size right now. And adding a
> (literally) random function, one could ask for any other too, makes it not
> better. Adding it to the context menu sounds sensible, however. 

If space is a problem, I suggest adding it to the existing "Field" dropdown.
The "Field" label is already erroneous: the dropdown allows adding a static time or date value, as well as actual fields when in edit mode. The dropdown could therefore be relabelled "Fields and Values", and include Random Number Generator (in the Values section).
Comment 4 Stéphane Guillou (stragu) 2023-05-03 14:39:22 UTC
Other options:
- Data tab, in the Statistics dropdown (but that would be at odds with the current menu)
- As Rafael suggested, in the right-hand-side "overflow" Insert dropdown.
Comment 5 V Stuart Foote 2023-05-03 14:59:56 UTC
 (In reply to Rafael Lima from comment #0)
> So I've been using the Random Number Generator a lot lately and I noticed
> that it is not accessible via the Tabbed UI.
> 
> Since it is not used by that many people, I suggest we add it either to the
> "Insert" or "Data" tab inside those dropdown menus on the right side.
> 
> The command is .uno:RandomNumberGeneratorDialog

Actually it is already there, just a bit obscure.

It is on the 'Home' tab -> 'Row' or 'Column' button lb with the other 'Fill' sequences. Taken from the Sheet -> Fill... of the main menu.


(In reply to Stéphane Guillou (stragu) from comment #3)
 
> 
> If space is a problem, I suggest adding it to the existing "Field" dropdown.
> The "Field" label is already erroneous: the dropdown allows adding a static
> time or date value, as well as actual fields when in edit mode. The dropdown
> could therefore be relabelled "Fields and Values", and include Random Number
> Generator (in the Values section).

+1, there as well on the supplementary 'Insert' menu at right.

But really is it an Insert action or a Fill action?
Comment 6 V Stuart Foote 2023-05-03 15:15:59 UTC
Sorry more precisely the main menu entries are Sheet -> Fill Cells -> Fill Random Number...

And the Row or Column button on the MUFFIN NB Tabbed UI offers the same block of controls as the main menu 'Fill Cells' submenu including the 'Fill Random NUmber..." dialog button.
Comment 7 Stéphane Guillou (stragu) 2023-05-03 16:46:44 UTC
(In reply to V Stuart Foote from comment #6)

> And the Row or Column button on the MUFFIN NB Tabbed UI offers the same
> block of controls as the main menu 'Fill Cells' submenu including the 'Fill
> Random NUmber..." dialog button.

Ah, good spotting! Terrible placement for it, hidden in the "Layout" tab, duplicated in Row and Column dropdowns even though it can be applied and any rectangular selection... It absolutely needs a better home.
Comment 8 Heiko Tietze 2023-05-04 09:26:49 UTC
The function fills the selection or whatever you specify at cell range but not the row/column. So let's move it out of these menus. And it seems we have an agreement on the Insert dropdown menu (the function is not a field like date/value).

However, moving 

<menu:menuitem menu:id=".uno:RandomNumberGeneratorDialog"/>

from 

sc/uiconfig/scalc/popupmenu/row_operations.xml and sc/uiconfig/scalc/popupmenu/column_operations.xml

into 
sc/uiconfig/scalc/ui/notebookbar.ui
sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
sc/uiconfig/scalc/ui/notebookbar_compact.ui

underneath

<object class="GtkMenu" id="Menu Insert">

as
the command is uno:RowOperations

has the drawback to also affect the standard toolbar where the Row/Column menu also pops up. But I think it's not a big deal since we have the function at the main menu, where it is better located anyway.
Comment 9 Stéphane Guillou (stragu) 2023-05-04 10:05:58 UTC
(In reply to Heiko Tietze from comment #8)
> has the drawback to also affect the standard toolbar where the Row/Column
> menu also pops up. But I think it's not a big deal since we have the
> function at the main menu, where it is better located anyway.

I see it as an improvement rather than a drawback, as the expectation might be that the action would fill the whole row or column if only one cell is selected. Removing it from that standard toolbar dropdown is the right thing to do.

Thanks Heiko!
Comment 10 Justin L 2023-10-15 01:28:15 UTC
In the classic menu, this is under Sheet - Fill Cells.

The other Fill Cells commands are also grouped in the notebookbar. Makes sense to me, so I won't remove it (since it does not harm here).

 https://gerrit.libreoffice.org/c/core/+/157986
Comment 11 Justin L 2023-10-16 13:23:50 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/956b07c825d55f6c7556d55046c5f75e376f22f1

tdf#115485 sc notebookbar: add MenuInsert-RandomNumber...

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Justin L 2023-10-16 13:25:25 UTC
I'll mark as fixed, since removing from the not-full place where other people have already found it doesn't make sense.