Bug 104487 - Function Wizard should remember Category selection per session
Summary: Function Wizard should remember Category selection per session
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.6.0
Keywords: needsUXEval
Depends on:
Blocks: Function-Wizard
  Show dependency treegraph
 
Reported: 2016-12-08 07:21 UTC by peekaa
Modified: 2023-05-15 11:13 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 peekaa 2016-12-08 07:21:01 UTC
Function Wizard should remember last category and offer it this to us during actual session. Its really irritating when you teach 10+ students, each student in hour uses Function Wizard 10+ times, and all the time they have to switch to Last Used Category, or another. Pls add this to application. Thank you.
Comment 1 Joel Madero 2016-12-10 19:34:24 UTC
Please provide better reproducible steps. It's always better to have enumerated steps that clearly tell us what to do and what you see. Examples can be found here:

https://wiki.documentfoundation.org/QA/BugReport#Good_Examples

Don't assume we have any clue what you're trying to accomplish - many QA members and devs don't use most of the features in LibreOffice so users need to clearly delineate the steps. Also, superfluos text like how irritating something is doesn't help anyone ;) Thanks
Comment 2 peekaa 2016-12-10 20:21:04 UTC
Firstly, sorry for the irritating word.

* Run Calc.
* Write few numbers.
* Click Function Wizard or Insert - Function.
* Select category Last used instead All.
* Choose f.e. Average, select numbers and OK. You have average of those numbers.
* Click Fucntion Wizard again /assume you like to have max of numbers/. 
* Now we would like to see category Last Used /as we have choosed it before/ and not All again. Now you have to click category again and Last used again. 

Hope its more clear.
Thank you.
Comment 3 Buovjaga 2016-12-11 17:48:50 UTC
Thanks, confirmed and edited summary.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 1fce5b024e9f25c3fcef2537a22474ece0dc416f
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on December 10th 2016
Comment 4 andreamassimo03 2023-03-09 20:44:58 UTC
I tested this but I couldn't reproduce it. "Last used" seems to be default now, and function wizard does remember the category selection.

Windows - 10.0.22621 - AMD64
Version: 7.6

Please correct me if I am wrong.
Comment 5 Buovjaga 2023-03-10 06:12:33 UTC
(In reply to andreamassimo03 from comment #4)
> I tested this but I couldn't reproduce it. "Last used" seems to be default
> now, and function wizard does remember the category selection.
> 
> Windows - 10.0.22621 - AMD64
> Version: 7.6
> 
> Please correct me if I am wrong.

For me, "All" is the default and the wizard does NOT remember the category selection.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 013fbfb592f71c1f0a60b6a7ec08aded375515ac
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 9 March 2023

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a179f6c91692076e7e17babf4890638caa398384
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded
Comment 6 ady 2023-03-10 06:16:29 UTC
(In reply to andreamassimo03 from comment #4)
> I tested this but I couldn't reproduce it. "Last used" seems to be default
> now, and function wizard does remember the category selection.
> 
> Windows - 10.0.22621 - AMD64
> Version: 7.6
> 
> Please correct me if I am wrong.

I can repro with:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0484a9a3f5e2ecb678f6fb41bbb251529e89c00d
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded

I don't recall the Function Wizard ever gave me the "Last Used" Category as default.

When I open the F.W. I always get "All" as Category by default, no matter which category was selected when I used it before / last time.
Comment 7 Commit Notification 2023-05-09 15:39:24 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/421d4fc533498d058a91f9686c47b35114e6a6c9

tdf#104487 - Function wizard: remember last used function category

It will be available in 7.6.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 8 ady 2023-05-10 12:31:06 UTC
Tested with 7.6.alpha built today. The Category that is shown when the Function Wizard is opened depends on the function that was used last time.

For example, if the initial Category is All and I select to use SUM(), the next time the Wizard is opened the Category field will show Mathematical.

IOW, the Category field is not the same as the prior time, but rather the field opens up on the same Category to which the prior used _function_ belongs.

This means that, for example, Category All will be opened as default only the first time, and the Last Used Category is also not opened as default, ever. Of course users can select those categories (as we have been doing in the past), but they are not selected by default when the Wizard is opened (in follow-ups).

When typing-in the name of the function in the Search field, the Category field goes back to All. This is OK; otherwise we would be limiting the search to the selected Category only, which would require additional steps, generally speaking.

From users' perspective, I would say that there is still room for additional improvement.
Comment 9 Andreas Heinisch 2023-05-10 16:37:20 UTC
I am always open to improve it further. What are your thoughts?
Comment 10 ady 2023-05-10 20:30:22 UTC
(In reply to Andreas Heinisch from comment #9)
> I am always open to improve it further. What are your thoughts?

Currently (after your patch) the Category is initially selected depending on the _function_ that was used the prior time the Wizard was run.

Suggestion:

1. First use of the Wizard in the session, the default Category should be "All". This is already happening now.

2. If the user selects a specific Category in one run of the Wizard, then the next time the Wizard is used, the Category should be the same as it was selected previously, at the end of the prior run of the Wizard. The default Category should _not_ vary depending on the function that was used in that run.

3. Point 2 above would also solve the case of the Category in the prior run being either "All" or "Last Used". For example, if I already selected the "Last Used" Category in the prior run of the wizard, then when the Wizard is used again the same "Last Used" Category is still selected. For instance, if the selected Category was "Last Used" (or "All") and the function was SUM(), then the next run of the wizard the Category will still be "Last Used" (or "All" if that was the selected Category in the prior run of the Wizard), not automatically changed to "Mathematical".

4. If the user types-in strings in the Search field, the results should not be limited to one particular Category; i.e. the Category immediately jumps to "All". This is already happening now. If I used the Search field in the prior run, then Category "All" was last used (unless I change it during the selection of the function), and that should be the default Category the next run (or whatever specific Category I selected after using the Search field during the same run of the Wizard).

I think this logic minimizes the selections / clicks / time. Examples of use-cases:

* If the user keeps using the same small amount of functions, he would leave the Category in "Last Used" as the default when the Wizard is opened (starting from the second run of the Wizard in the session), seeing the list with the desired functions already listed.

* If the user needs the same Category of functions (say, Statistical) several times in succession, then once the Category was selected the first time, that would be the same Category the next time he opens the Wizard. The functions pertaining to that Category would be listed and on display, ready to be used by one click (or one small scroll and one click).

* If the user types-in in the Search field, the "All" Category is selected, and after finalizing the run of the wizard, the same Category, "All", will be the default the next time.

I hope I was clear and that it makes sense.
Comment 11 Andreas Heinisch 2023-05-11 09:22:45 UTC
(In reply to ady from comment #10)
> (In reply to Andreas Heinisch from comment #9)
> > I am always open to improve it further. What are your thoughts?
> 
> Currently (after your patch) the Category is initially selected depending on
> the _function_ that was used the prior time the Wizard was run.

Imho, this also was the case before my patch. I open the function wizard and select sum and click ok. The function wizard closes. Again I open the function wizard shows the structure tab. If I change back to the functions tab, the mathematical category is selected.

> 
> Suggestion:
> 
> 1. First use of the Wizard in the session, the default Category should be
> "All". This is already happening now.
> 
> 2. If the user selects a specific Category in one run of the Wizard, then
> the next time the Wizard is used, the Category should be the same as it was
> selected previously, at the end of the prior run of the Wizard. The default
> Category should _not_ vary depending on the function that was used in that
> run.

The function list and the category are linked together and I don't know if we should change that.

> 
> 3. Point 2 above would also solve the case of the Category in the prior run
> being either "All" or "Last Used". For example, if I already selected the
> "Last Used" Category in the prior run of the wizard, then when the Wizard is
> used again the same "Last Used" Category is still selected. For instance, if
> the selected Category was "Last Used" (or "All") and the function was SUM(),
> then the next run of the wizard the Category will still be "Last Used" (or
> "All" if that was the selected Category in the prior run of the Wizard), not
> automatically changed to "Mathematical".

Yep, see my answer to point 1.
> 
> 4. If the user types-in strings in the Search field, the results should not
> be limited to one particular Category; i.e. the Category immediately jumps
> to "All". This is already happening now. If I used the Search field in the
> prior run, then Category "All" was last used (unless I change it during the
> selection of the function), and that should be the default Category the next
> run (or whatever specific Category I selected after using the Search field
> during the same run of the Wizard).

This is the case atm.

Maybe we can have some input from the design team.
Comment 12 Heiko Tietze 2023-05-11 09:45:22 UTC
The category is remembered within the current session, which makes sense as one scenario may include similar functions. And at the next app start it is reset to All, as this scenario might involve different functions. IMO it's good as it is.
Comment 13 ady 2023-05-11 11:24:42 UTC
(In reply to Andreas Heinisch from comment #11)
> Again I open the
> function wizard shows the structure tab. If I change back to the functions
> tab, the mathematical category is selected.

The whole point of the request is about the F.W. Category / behavior when the cell is empty, or at least with no function already introduced in the cell. When I said "next run of the F.W." I don't mean in the same cell as the prior run, where there is already a formula that was just introduced a second ago. I skipped this phrase in my comments because (for me, and probably for other spreadsheet users too) it was evident from the initial request. Apologies.

> 
> > 
> > Suggestion:
> > 
> > 1. First use of the Wizard in the session, the default Category should be
> > "All". This is already happening now.
> > 
> > 2. If the user selects a specific Category in one run of the Wizard, then
> > the next time the Wizard is used, the Category should be the same as it was
> > selected previously, at the end of the prior run of the Wizard. The default
> > Category should _not_ vary depending on the function that was used in that
> > run.
> 
> The function list and the category are linked together and I don't know if
> we should change that.

I understand. Perhaps this relation should not be direct one-to-one. The function is part of a group (Category), and the request is about the default group that is displayed when the F.W. is opened (on an empty cell), not about the last-used function.

This also explains why the "Last Used" Category is never the default, which makes the "Last Used" Category much less used in practice.


> > 
> > 3. Point 2 above would also solve the case of the Category in the prior run
> > being either "All" or "Last Used". For example, if I already selected the
> > "Last Used" Category in the prior run of the wizard, then when the Wizard is
> > used again the same "Last Used" Category is still selected. For instance, if
> > the selected Category was "Last Used" (or "All") and the function was SUM(),
> > then the next run of the wizard the Category will still be "Last Used" (or
> > "All" if that was the selected Category in the prior run of the Wizard), not
> > automatically changed to "Mathematical".
> 
> Yep, see my answer to point 1.

See my clarification about the basic premise.


> > 
> > 4. If the user types-in strings in the Search field, the results should not
> > be limited to one particular Category; i.e. the Category immediately jumps
> > to "All". This is already happening now. If I used the Search field in the
> > prior run, then Category "All" was last used (unless I change it during the
> > selection of the function), and that should be the default Category the next
> > run (or whatever specific Category I selected after using the Search field
> > during the same run of the Wizard).
> 
> This is the case atm.

Yes. Point 2 is the important change, with point 3 being a sub-case (or an explicit important example), for clarity. Points 1 and 4 are currently the behavior already. I mentioned the 4 points in order to make it clear which behavior should be kept and which behavior should be improved. I was afraid that, by not mentioning the complete expected behavior, the request would be misunderstood and something that was already OK would be modified, unintentionally.

Apparently the original reporter and additional comments all skipped the important part where we are talking about cells that are initially without formulas, where the request makes more impact. There might be possible improvements on non-empty cells, but not without improving the current situation on empty cells first.

> 
> Maybe we can have some input from the design team.

(In reply to Heiko Tietze from comment #12)
> The category is remembered within the current session, which makes sense as
> one scenario may include similar functions. And at the next app start it is
> reset to All, as this scenario might involve different functions. IMO it's
> good as it is.

You are not mentioning the "Last Used" Category. Please read what I just answered to Andreas, and then perhaps you might want to re-read the whole RFE with that clarification and the "Last Used" Category in mind.
Comment 14 Andreas Heinisch 2023-05-12 16:03:53 UTC
Hm, for me it is not clear if this minimizes the clicks in the function dialog. You may also provide a patch for the function itself because it is just setting a static variable (https://gerrit.libreoffice.org/c/core/+/151565). I may review the change.
Comment 15 ady 2023-05-12 22:23:12 UTC
(In reply to Andreas Heinisch from comment #14)
> Hm, for me it is not clear if this minimizes the clicks in the function
> dialog.

The current behavior is useful only when the usual functions that are being used are all from the same Category. For any other case, users have to either use the Search field (i.e. "All" Category), or click on the Category field in order to select the "Last Used" Category. This is relevant for empty cells, or for nested functions, while you are building a complex formula.

When the recent functions that were/are being used are part of different Categories, having the "Last Used" Category ready allows to keep using them: a single click to select, versus at least two clicks or typing-in in the aforementioned situation (which is the current behavior).

Moreover, the same proposed behavior also allows one click selection when the functions are from the same Category, because they are also part of the "Last Used" Category.

The only case in which there is no relative advantage in the proposed behavior is when the user is using "much more than just a few" functions in the recent runs of the F.W. while all those functions come from the same Category. If the functions are not from the same Category, then there is no "cons" either.


> You may also provide a patch for the function itself because it is
> just setting a static variable
> (https://gerrit.libreoffice.org/c/core/+/151565). I may review the change.

Sure, except that I am not a developer so I have no idea how to do it :(.
Comment 16 Andreas Heinisch 2023-05-13 09:58:01 UTC
So, what is your proposal?

If there is an empty cell with no function, we should select the "Last Used" category?
Comment 17 ady 2023-05-13 20:38:03 UTC
(In reply to Andreas Heinisch from comment #16)
> So, what is your proposal?
> 
> If there is an empty cell with no function, we should select the "Last Used"
> category?

I thought I presented my proposal in comment 10. Then I clarified it further in comment 13, and then in comment 15. Let's try again.

Try to reproduce the steps I described, paying attention to the default Category each time you open the F.W.

Start on an empty cell, choose one function in the F.W. and introduce a complete formula in that cell.

Then move-on to another cell and use the F.W. with a different function from a _different_ category.

Repeat for 3 or 4 cells, with different functions from different categories. Which Category do you see by default when you open the F.W. in each empty cell before introducing a formula? Is the "Last Used" Category _ever_ the default? If it isn't, then imagine what would happen if it was in this particular scenario? Do you think it would reduce the amount of clicks if you were to need those same 3 or 4 functions again (and again...)? What would happen if a formula in one cell is composed by several nested functions from different categories?

Then imaging a user having to introduce functions from the _same_ Category.

* The advantage of having Category "All" by default on empty cells (i.e. behavior before your patch) is discover-ability.

* The advantage of having by default the same Category (whichever that might be, including "Last Used" and/or "All") as the last time the F.W. was used in the session (i.e. proposed behavior) is efficiency.

Having the default _Category_ being remembered (which is not always the same as using the category of the last used function) from the last time the F.W. was used (in the same session) allows for all scenarios. Some use-cases would prefer "All", others would go for "Last used", and other use-cases would select one particular Category (e.g. "Mathematical") again and again – only the latter being your patch from comment 7.

The same user sometimes would prefer one use-case, and sometimes another.

In all these scenarios, typing-in within the Search field of the F.W. would immediately show the Category named "All", as it happens currently.
Comment 18 Andreas Heinisch 2023-05-14 10:57:17 UTC
Imho it is clear now, but I would prefer a new enhancement report since this would break the connection between the function category and the function list below. So if there are any regression we would not revert this report but just the new one. Thank you!
Comment 19 ady 2023-05-15 11:13:45 UTC
(In reply to Andreas Heinisch from comment #18)
> I would prefer a new enhancement report

OK. That is now bug 155316. And thank you for these improvements.