Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabBar workbench selector does not add tabs for workbenches not already loaded #13630

Closed
2 tasks done
furgo16 opened this issue Apr 24, 2024 · 5 comments · Fixed by #13721
Closed
2 tasks done

TabBar workbench selector does not add tabs for workbenches not already loaded #13630

furgo16 opened this issue Apr 24, 2024 · 5 comments · Fixed by #13721
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD DWG Input or discussion from Design Working Group needed Feature FR for improvements or new features UI/UX

Comments

@furgo16
Copy link
Contributor

furgo16 commented Apr 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Steps to reproduce:

  1. With the TabBar enabled¹, click on the + (plus sign) at the beginning of the workbenches tabs.
  2. Choose a workbench from the context menu shown
  3. Actual: the workbench is loaded, but there is no tab for it. The tab of the last workbench in the existing tabs is activated (in my case, the Assembly tab, issue TabBar wrongly activates the last tab when loading a new workbench #13602)
  4. Expected: the workbench is loaded, and a new tab for that workbench is added. The tab for the newly loaded workbench is activated.

#13602 (comment) mentions that this is intended behavior to be able to keep the tab list from growing, and thus it is fixed. While I understand the screen real state concern, I feel having tab-orphaned workbenches has a negative impact on usability and is not consistent with the existing tab navigation.

[1] Edit > Preferences... > Available Workbenches > Workbench selector type => TabBar

Proposal

  • Keep tab list as fixed width
  • When an additional workbench is loaded, it should have a tab as the rest
  • As the list of tabs grows beyond the original list's width, leverage the existing tab scroll arrows already present in the code. These are shown when the list cannot be displayed in smaller screens. Effectively it's the same principle Firefox uses to be able to access additional tabs (Chrome uses the opposite principle, whereby it squeezes all tabs until they become unreadable. I would not recommend this).

image

Full version info

OS: Ubuntu Core 22 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36961 (Git) Snap 996
Build type: Release
Branch: main
Hash: c4c453312d148fd67bd893366c42b559e28a85e6
Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Installed mods: 
  * OpenTheme 2024.4.20
  * BIM 2021.12.0
  * Curves 0.6.35
  * ExplodedAssembly
  * BillOfMaterials 0.0.8.2
  * Ondsel-Lens 2024.4.16.01
  * Assembly4 0.50.12

Subproject(s) affected?

Core

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@furgo16 furgo16 changed the title TabBar wrongly activates always the last tab when loading a new workbench TabBar workbench selector does not add tabs for workbenches not already loaded Apr 24, 2024
@maxwxyz maxwxyz added Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD UI/UX Feature FR for improvements or new features labels Apr 24, 2024
@maxwxyz
Copy link
Collaborator

maxwxyz commented Apr 24, 2024

So you mean: Just display the current WB on a fresh start and add new tabs if you want to change a WB?

@furgo16
Copy link
Contributor Author

furgo16 commented Apr 24, 2024

Not exactly (unless I haven't understood it correctly)

Currently:

  • The tabs list contains only the auto-loaded workbenches
  • The + sign opens a list of the rest of installed workbenches
  • Choosing a workbench from the list loads it, it displays it, but it does not create a tab for it

This proposal:

  • The tabs list contains only the auto-loaded workbenches
  • The + sign opens a list of the rest of installed workbenches
  • Choosing a workbench from the list loads it, displays it, and creates a tab for it. If the list of tabs exceeds the list's fixed width, the scrolling arrows are shown.

At the end of the day, this issue is about not having orphaned workbenches without tabs.

I hope this clarifies things.

@maxwxyz
Copy link
Collaborator

maxwxyz commented Apr 24, 2024

Why not use it like a tab in the file browser / terminal / web browser?

  • Just load the defined WB which is set as default/start WB.
  • If you create a sketch or double click a sketch or spreadsheet it automatically opens/adds the Sketcher WB as new tab (like you can open a link in a new tab in a web browser).
  • You can manually open tabs with the + and choose from all active but not opened WB and these stay open as tabs.

You won't have many tabs open, only the one you need for your project. Toolbar stays clean and you can easily switch between the relevant WBs and add new ones only if you need them.

@maxwxyz maxwxyz added the DWG Input or discussion from Design Working Group needed label Apr 24, 2024
@furgo16
Copy link
Contributor Author

furgo16 commented Apr 24, 2024

That covers the essence of the proposal, which is not having tab-less workbenches, so I'd be fine with that too. A quick note:

  • I still think it's useful to have a set of auto-loaded workbenches that are opened as tabs at startup. It's useful for quick access: you cannot always double click on an element and open the desired workbench. E.g. if I'm on the BIM workbench and I need to convert wires to a face to build a wall, I'll quickly switch to the Part workbench and then choose Part > Make face from wires. If I had to load the Part workbench explicitly first with the + button, it would add more overload.

@furgo16
Copy link
Contributor Author

furgo16 commented Apr 24, 2024

Trying to mention @FreeCAD/design-working-group for input does not seem to work, although it's the convention described at https://github.blog/2012-05-09-introducing-team-mentions. Does that team already exist? Is it mentionable only by members of the FreeCad organization on GitHub?

kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue Apr 29, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 4, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 4, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 5, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 5, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 6, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 6, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
kadet1090 added a commit to kadet1090/FreeCAD that referenced this issue May 6, 2024
This changes back placement of the "more" button of the WB TabBar to be
at the end, where it should be naturally placed. In order to ensure that
it is always visible the control was reworked to show this button always
after the tab bar widget which now is dynamically sized. This is
behavior that is well known from browsers.

This commit also ensures that active workbench is always visible in the
TabBar by adding additional temporary tab when necessary. This tab will
automatically dissapear when not needed.

Fixes: FreeCAD#13720
Fixes: FreeCAD#13630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD DWG Input or discussion from Design Working Group needed Feature FR for improvements or new features UI/UX
Projects
Development

Successfully merging a pull request may close this issue.

2 participants