Bug 150262 - Make Autosum button a split button
Summary: Make Autosum button a split button
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium enhancement
Assignee: Matt K
URL:
Whiteboard: target:24.2.0
Keywords: difficultyMedium, easyHack, skillCpp
: 154621 (view as bug list)
Depends on:
Blocks: Calc-Formula-Bar
  Show dependency treegraph
 
Reported: 2022-08-04 12:18 UTC by MartinP
Modified: 2023-11-15 14:20 UTC (History)
4 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 MartinP 2022-08-04 12:18:06 UTC
FORMCONTROLS

Performing a summation of a column of numbers is arguably the most common calculation carried out in a spreadsheet.

Unless I am mistaken the quickest (least clicks) way to do this mouse only is to highlight the column of numbers, hit the sigma dropdown and select "Sum". Bearing in mind that sigma means add I think that should be the default. I'd say one click of sigma to perform an addition. Should the user want min, max etc then they can subsequently select the alternate function from the sigma drop down.
Comment 1 Mike Kaganski 2022-08-05 07:51:14 UTC
(In reply to MartinP from comment #0)
> the quickest (least clicks) way to do this mouse only
> is to highlight the column of numbers, hit the sigma dropdown and select
> "Sum".

No.
As explained in https://wiki.documentfoundation.org/ReleaseNotes/7.0#Other, since 7.0, there is Ctrl+=, which allows you to put cursor under the column (or select the range), and use the shortcut.
Comment 2 Mike Kaganski 2022-08-05 07:51:46 UTC
(In reply to Mike Kaganski from comment #1)
> there is Ctrl+=

Sorry, Alt+=
Comment 3 Mike Kaganski 2022-08-05 08:04:38 UTC
FTR: The drop-down was added in bug 120697.
Comment 4 Mike Kaganski 2022-08-05 08:19:26 UTC
IMO, a very natural and reasonable request.

The code pointer (if UX agrees) is commit 0ec98930888ee9f29032d12185baefc71da8489f itself; it had removed a code for a simple button click, and introduced the drop-down code, changing the button's type from ToolBoxItemBits::NONE into ToolBoxItemBits::DROPDOWNONLY. To fix this, one would need to make it ToolBoxItemBits::DROPDOWN, restore the simple click code, and make it conditional on what was the last used operation. Indeed, the drop-down code needs to update the last-used function.

The persistence of the last used operation could be per-session (the easiest), or stored in the profile (then a mew option needs to be added for that).
Comment 5 MartinP 2022-08-05 08:23:57 UTC Comment hidden (off-topic)
Comment 6 Mike Kaganski 2022-08-05 08:40:46 UTC
(In reply to Mike Kaganski from comment #4)
> and make it conditional on what was the last used
> operation. Indeed, the drop-down code needs to update the last-used function.
> 
> The persistence of the last used operation could be per-session (the
> easiest), or stored in the profile (then a mew option needs to be added for
> that).

Or maybe even make the main button to execute SUM always; that would be even easier implementation-wise, and also not requiring to change button icon dynamically (and having new icons for that).
Comment 7 Heiko Tietze 2022-08-05 08:45:46 UTC
So you suggest to revert bug 120697 in order to have one "sigma" button to just calculate the sum with one instead of two clicks? Sounds wrong to me.
Comment 8 Heiko Tietze 2022-08-05 08:47:37 UTC
Guess you mean a split button with a default action and some other in the menu. Reasonable although more complex. Maybe Martin is happy with the keyboard shortcut. And users might become greedy asking to have the last used action as the default ;-)
Comment 9 Mike Kaganski 2022-08-05 08:58:59 UTC
(In reply to Heiko Tietze from comment #7)
> So you suggest to revert bug 120697 in order to have one "sigma" button to
> just calculate the sum with one instead of two clicks?

Surely no; if you reply to comment 6, then the "main button" (in addition to the overall "make it a split button" topic) implies there's something else (the drop-down) besides the *main* part. So - your comment 8.

(In reply to Heiko Tietze from comment #8)
> Maybe Martin is happy with the keyboard shortcut.

Oh, see comment 5. And don't let me started about users considering keyboard shortcuts "clunky"; but that's life.
Comment 10 Mike Kaganski 2022-08-05 09:01:04 UTC
(In reply to Heiko Tietze from comment #8)
> although more complex

Note that it basically needs to restore one function from the state before bug 120697 (the one that was executed when the button was pressed), and change the button type to ToolBoxItemBits::DROPDOWN. As easy as that.
Comment 11 Heiko Tietze 2022-08-11 13:33:19 UTC
The topic was on the agenda of the design meeting but didn't receive further input. So let's do as suggested.
Comment 12 QA Administrators 2023-02-08 03:24:50 UTC Comment hidden (obsolete)
Comment 13 Mike Kaganski 2023-04-05 12:32:46 UTC
*** Bug 154621 has been marked as a duplicate of this bug. ***
Comment 14 Matt K 2023-07-08 21:36:39 UTC
I don't see a "sigma dropdown" button in the latest dev build.  Instead, the only way to do a summation is to click the sidebar icon for "Functions", then double click the "Sum" row.  This looks to be the speediest way to do a summation; is this bug still applicable, and if so why?
Comment 15 Mike Kaganski 2023-07-09 06:19:18 UTC
(In reply to Matt K from comment #14)

Please double-check, if you look at the correct button. Release notes for v.6.3 include a screenshot of the discussed expanded button:

https://wiki.documentfoundation.org/ReleaseNotes/6.3#Calc
Comment 16 Matt K 2023-07-13 22:37:27 UTC
(In reply to Mike Kaganski from comment #15)

Thanks, I see it now.  Assigning to myself.
Comment 17 Matt K 2023-07-13 23:23:05 UTC
Fix is tracked in https://gerrit.libreoffice.org/c/core/+/154405.  Added Mike to the review.
Comment 18 ady 2023-07-14 01:13:58 UTC
I just hope we don't end up with a "very small" down arrow near 2 "normal" icons (Function Wizard and "Sigma"), which would require from users to be very precise when pointing to such small down arrow.

OTOH, I wouldn't want to end up with even more horizontal area being used, just to avoid one extra click for the SUM() function.

BTW, users can customize a toolbar adding the classic "SUM()" icon to it.

@Matt K (and Mike and Heiko), please consider these points before introducing changes to the formula bar.
Comment 19 Commit Notification 2023-07-14 04:40:52 UTC
Matt K committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b247630d8b5e81041e0ed515572dfede49ccdf46

tdf#150262 Split Autosum button and default to sum on click

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 20 Heiko Tietze 2023-09-08 13:49:07 UTC
Fixed, Matt?
Comment 21 Commit Notification 2023-10-13 13:30:52 UTC
Matt K committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b0496a314b1acee28e22c1029b696cbbc1983853

tdf#150262 Split Autosum button: refactor to deduplicate

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 22 Heiko Tietze 2023-11-15 14:20:14 UTC
(In reply to Commit Notification from comment #19)
> Matt K committed a patch related to this issue.

Guess we can close this ticket.