godot icon indicating copy to clipboard operation
godot copied to clipboard

Too many plugins on the bottom panel make it impossible to resize side panels

Open TranquilMarmot opened this issue 1 year ago • 8 comments
trafficstars

Tested versions

Godot v4.3.stable.mono

System information

Godot v4.3.stable.mono - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

Issue description

https://github.com/user-attachments/assets/4b64ed61-6bb4-4522-bef9-61d6edad51ac

Screenshot 2024-08-16 at 8 51 49 PM

With enough plugins, the list on the bottom panel gets unwieldy and makes it impossible to resize the side bars. This makes working on a smaller screen nearly impossible. I'm on a 1440x900 Macbook with the default display scale of 200%.

It would be nice if the bottom panel tabs got arrows like all the other tabs, for example the right side bar when it's smaller: https://github.com/user-attachments/assets/87c353b0-ea61-4965-a912-f44b0af5404d

Steps to reproduce

Install a few addons that add to the bottom panel

Some examples:

Additionally, using the dotnet build of Godot adds an "MSBuild" tab. You can also move the "FileSystem" tab to the bottom which contributes to the problem.

Minimal reproduction project (MRP)

See comment below (thank you @tetrapod00 !!!)

TranquilMarmot avatar Aug 17 '24 03:08 TranquilMarmot

MRP: mrp-too-many-plugins.zip

If you have enough long named plugins, the inspector disappears.

Godot_v4 3-stable_win64_VAbh50JBhp

You can even hide the workspace buttons:

Godot_v4 3-stable_win64_Tao7wsGlA3

tetrapod00 avatar Aug 17 '24 05:08 tetrapod00

related:

  • https://github.com/godotengine/godot-proposals/issues/7156
  • https://github.com/godotengine/godot/pull/84114

kitbdev avatar Aug 17 '24 15:08 kitbdev

Using HFlowContainers would still break things in the degenerate cases in my MRP. It would also have some undesirable effects in cases where you have enough short named bottom panel buttons that they start taking up vertical space instead. Possibly limiting the names of bottom panel buttons could be done. Likely not a hard limit, but instead display them as "A Very Long Bot...".

tetrapod00 avatar Aug 17 '24 16:08 tetrapod00

We can use a TabBar which i don't think will be ideal for fixing this.

Or a ScrollContainer and hiding it's horizontal scroll bar while also allowing focusing the buttons to enable ScrollContainer follow focus.

Or an OptionButton like how blender deals with docks.

Or an HFlowContainer which also may not be ideal since it will keep increasing it's vertical size when we resize down the window width.

Or we make all the buttons to use fill expand and we allow trimming their text, and we set the tooltip to the button's text, and we give each one a minimum width of 32 pixels.

Or we use Icons for bottom tabs and we show the text when we hover the icon. This should be applied by providing a default icon for the plugins that doesn't provide an icon (for compatibility).

Like this : plugin until they update their plugin. example add_control_to_bottom_panel(control: Node, text: String, icon: Texture2D = DEFAULT_PLUGIN_ICON)

Or we turn each bottom panel into a dock! This will allow more freedom like moving them anywhere and host any other dock not just the FileSystem and we also will be able to make them floating.

Or we create a new Container from scratch for the BottomPanelButtons.

WhalesState avatar Sep 18 '24 21:09 WhalesState

It seems to me that an implementation using TabBar would solve this problem

JekSun97 avatar Sep 18 '24 23:09 JekSun97

They may look like this, since we will need to reuse the Button styles with a limitation that the selected tab can't be hovered.

Also we will be unable to change a specific tab's font color like the debugger.

image

WhalesState avatar Sep 18 '24 23:09 WhalesState

I'll attach my MRP as it demonstrates a real case where there are indeed a lot of buttons/editors at the bottom of the editor mrp.zip

JekSun97 avatar Sep 27 '24 12:09 JekSun97

What about making all the buttons horizontal size flags to fill + expand and we set text_overrun_behavior to Ellipsis.

Also we can assign a minimum width of 32 pixels to each button.

https://github.com/user-attachments/assets/4b299f4d-fa18-4a5c-b9b6-4d1262b0a5cb

WhalesState avatar Oct 01 '24 18:10 WhalesState