Bug 161296 - UI: Convert the functions list in the functions deck to collapsible sections (tree-like view)
Summary: UI: Convert the functions list in the functions deck to collapsible sections ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Ahmed Hamed
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: 92416
  Show dependency treegraph
 
Reported: 2024-05-27 15:04 UTC by Ahmed Hamed
Modified: 2024-08-20 09:07 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 Ahmed Hamed 2024-05-27 15:04:01 UTC
Description:
This is a new feature that can enhance the user experience of dealing with the functions deck, it will improve searching for a specific function.

Actual Results:
The current design uses a list to show the functions, which is annoying because you need to scroll down till you find your desired section.

Expected Results:
It would be better to go quickly to your needed section using the collapsible view, then search for your function.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 342670dc6b0fc5b93a40b9cf86b8cca67fac88a3
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Andreas Heinisch 2024-06-18 15:28:42 UTC
As discussed in the meeting here some code pointers:
Function Wizard [1]
Functions in the side pane [2]
Panel Factory [3]
UI Elements in the panel factory [4]


[1] https://opengrok.libreoffice.org/search?full=funcpage&project=core
[2] https://opengrok.libreoffice.org/search?full=functionpanel&project=core
[3] https://opengrok.libreoffice.org/xref/core/sc/source/ui/sidebar/ScPanelFactory.cxx
[4] https://opengrok.libreoffice.org/xref/core/sc/source/ui/sidebar/ScPanelFactory.cxx#48

Let me know if you need more code pointers or any help.
Comment 2 Ahmed Hamed 2024-06-25 12:19:31 UTC
I think I am a little stuck here.
I am using the weld::TreeView to implement the collapsible sections, and the list in the FD is actually implemented using weld::TreeView. So, I was going to make this conversion by appending categories, and then append functions as children to these categories, is this right ?
I am doing that by adding this function to the TreeView class:

void append(const OUString& rStr, TreeIter* pRet)
{
    insert(nullptr, -1, &rStr, nullptr, nullptr, nullptr, false, pRet);
}

So I can get a pointer to the inserted category node in pRet, and then call this function to insert the all the functions in this category:

void append(const TreeIter* pParent, const OUString& rStr)
{
     insert(pParent, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
}

But this is not working, so how can I append a child to a parent in a TreeView ? Or is the TreeView not suitable for this job ?
Also I am showing expanders in the .ui file, but they didn't appear, do they only appear if there is a correct parent-child relation ?
Comment 3 Commit Notification 2024-07-19 05:51:41 UTC
AhmedHamed committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5bd284583fe1f891bac3192d8e20083a57830a0a

tdf#161296 Convert functions list in FD & FW into collapsible sections

It will be available in 25.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 4 Andreas Heinisch 2024-07-19 07:24:44 UTC
Thank you for your patch. You may update the release wiki page to reflect this change. Thank you.
Comment 5 Ahmed Hamed 2024-07-19 14:25:11 UTC
Thanks. How can I update the release wiki page?
Comment 6 Andreas Heinisch 2024-07-19 16:21:59 UTC
You may wait till it is available on https://wiki.documentfoundation.org/ReleaseNotes/24.8
Comment 7 BogdanB 2024-07-19 17:11:37 UTC
Wow, nice!
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7d924018f3ea58050081936bde067391714a8bb5
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 8 nobu 2024-07-20 07:17:50 UTC
It may be wrong to request this here.
It would be helpful to show separate categories for built-in add-ins and user registration add-ins.
Comment 9 ady 2024-07-20 09:02:52 UTC
@Ahmed, @Andreas,

When selecting a specific category of functions, the list is shown as it used to be displayed before (which is OK), except for the "All" category, which shows the tree.

I would like to kindly ask you to have the "All" category behaving as any other category (showing the normal list), and to add a new (fake) category in which the list of functions is shown as a tree (i.e. the new tree view). The new (fake) category might be named something like "All (tree view)", or something more succinct/shorter.
Comment 10 Heiko Tietze 2024-07-22 07:31:02 UTC
(In reply to ady from comment #9)
> I would like to kindly ask you to have the "All" category behaving as any
> other category (showing the normal list), and to add a new (fake) category
> in which the list of functions is shown as a tree (i.e. the new tree view).
What is the advantage of a flat list with so many items? You can scroll through the tree with the cursor keys (right/left or +/- to expand/collapse), and we may think about an interaction to expand all nodes (Microsoft does or did with * by default; try with the file explorer *g*).
Comment 11 ady 2024-07-22 07:48:36 UTC
(In reply to Heiko Tietze from comment #10)
> What is the advantage of a flat list with so many items?

The list is also filtered according to the Search field too, not just by Category.

The Category field itself is awaiting for improvements.

Unfortunately, other reports requesting improvements when using the keyboard for the FW are still lingering, among other requests for enhancements and corrections to the FW.
Comment 12 Heiko Tietze 2024-07-22 08:26:21 UTC
(In reply to ady from comment #11)
> The list is also filtered according to the Search field too, not just by
> Category.
This has been done intentionally. Assume you search for SUM, and you know that the requested function is not related to Database, Financial... etc. Plus, users learn in what category to look for the function the next time.