Allowing to stack commands in a toolbar

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Allowing to stack commands in a toolbar

Post by yorik »

Werner, this is more for you I think. I'm thinking it would be interesting to be able to stack different commands into a drop-down toolbar icon, a bit like you did for the Raytracing WB recently... Ideally one could be able to use the same system as submenus, in python workbenches, you can use appendMenu(menu,commandslist) or appendMenu([menu,submenu],commandslist). The same could happen with appendToolbar... Should I extend the ToolBarItem stuff in ToolBarManager? I'm not too sure how to do proceed... Any tip on how to do that?
Thanks
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Allowing to stack commands in a toolbar

Post by wmayer »

Hi Yorik,

we had this discussion in the very beginning of FreeCAD. Since Jürgen was inspired a lot by Catia we also thought about their stacked commands but decided against it. The main problem is that if several commands are behind one icon in the toolbar you never know where to find the command you need now. Especially for newbies this can be very frustrating. And also from a practicable point of view it's not very efficient. For example, you have a command A and B. First, you need A, then B, then A, ... then you always need two clicks instead of one.

So, IMO only commands that you don't need that often can go into stacked commands but then the question is why putting them into a toolbar at all.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Allowing to stack commands in a toolbar

Post by triplus »

Nice example of what wmayer is describing is Workbench Switcher! I must say i agree this shouldn't be used beyond use cases when it makes sense to use it like for inserting preferred drawing/raytracing template. In the long run Workbench Switcher will probably need to evolve to something else too if we are after efficient interaction.
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Allowing to stack commands in a toolbar

Post by yorik »

wmayer wrote:we had this discussion in the very beginning of FreeCAD. Since Jürgen was inspired a lot by Catia we also thought about their stacked commands but decided against it.
Hm yes, I see, it makes sense indeed.

The case where I wanted to use it is in the Arch module: Below the "window" tool, which draws a window from scratch, there would be several "presets" (a simple window, a double window, etc...). They would be more like templates. But maybe it's more intelligent to have one tool, then in the task panel you can choose a preset...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Allowing to stack commands in a toolbar

Post by NormandC »

The Microsoft Ribbon bar now found in many Windows software uses stacked icons. If Microsoft decided to use stacked commands, you can safely bet it is not a good idea! :mrgreen:
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Allowing to stack commands in a toolbar

Post by triplus »

The case where I wanted to use it is in the Arch module: Below the "window" tool, which draws a window from scratch, there would be several "presets" (a simple window, a double window, etc...). They would be more like templates. But maybe it's more intelligent to have one tool, then in the task panel you can choose a preset...
For inserting templates in Drawing/Raytracing Workbench it works good in my opinion. Probably because of the fact it's not used in a way multiple tools would be squeezed inside drop down menu instead it just enables to select multiple options for single tool. Selecting from multiple templates when inserting new rendering project or drawing and here user probably isn't confused because it's still only using one single tool located/visible on toolbar!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Allowing to stack commands in a toolbar

Post by triplus »

In the long run Workbench Switcher will probably need to evolve to something else too if we are after efficient interaction.
Just a side note i think on the long run tabs are it? Each workbench has its dedicated tab and switching between them changes toolbars (and workbenches)? Basically yes vertical tabs for toolbars on top/bottom of the screen and horizontal tabs for sidebars? Or for sidebar there is another nice possibility as done in GIMP tabs are still horizontal on top of the sidebar and users can add/remove them as he/she chooses.

The most basic scenario: tabs on top just like in Firefox and where "address area" is located in Firefox well there is where user would have toolbars? I wouldn't say this is Microsoft Ribbon because then toolbar would have to change too a bit it's basically just adding tabs for switching between workbenches method commonly used in wide range of software?
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Allowing to stack commands in a toolbar

Post by yorik »

triplus wrote:Each workbench has its dedicated tab and switching between them changes toolbars (and workbenches)?
This can become annoying the day we have many, many workbenches :)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Allowing to stack commands in a toolbar

Post by triplus »

yorikvanhavre wrote:
triplus wrote:Each workbench has its dedicated tab and switching between them changes toolbars (and workbenches)?
This can become annoying the day we have many, many workbenches :)
Yes BUT Workbench Switcher if compared to tabs is more or less annoying? I think tabs beats Workbench Switcher as less annoying option when huge number of workbenches is used? I can't imagine using Workbench Switcher with for example 50 workbenches but 50 tabs in Firefox are quite manageable?

And then again i find Workbench Switcher annoying enough to constantly think about how we should crack this cookie and i would probably feel the same if only 2 workbenches would be used. :lol:

More and more i have a feeling if workbench tabs could be shortened to just one icon like Pin tabs are in Firefox and below them having workbench specific toolbars this might work quite OK.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Allowing to stack commands in a toolbar

Post by triplus »

And this is how i imagine it could be done. I took the following image from Firefox and modified it for purpose of creating FreeCAD mockup. Image says it best:

Image

-Workbench Tabs could be pinned and only Workbench Icon would then be shown.
-Workbench Tabs could be shown with Workbench icon and Text beside them if they would be unpinned.
-There should be possibility to rearrange tabs with drag and drop!
-Workbench tabs could be closed and just as easy added back if + tab would be pressed.
-If user would close the tab for Sketcher Workbench and editing sketch from Part Workbench would need to open the Sketcher Workbench then Sketcher Workbench tab would simply automatically be loaded as unpinned tab!

I do see something like this as good possibility to replace current Workbench Switcher. Could something like this be implemented and what do you think do you like the idea in the first place or not? I see it as something quite efficient and accustomed to average computer user. Toolbar could still be dragged to the side of the screen for vertical placement or ideally this could be done with Workbench Tabs too in pinned state!
Post Reply