godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Make the individual editor side docks minimizable using keyboard shortcuts #1441

Open albinaask opened 4 years ago

albinaask commented 4 years ago

Describe the project you are working on:

At the moment several, but generally speaking a space game that has some physics elements and a lot of coding.

Describe the problem or limitation you are having in your project:

I develop a lot on my laptop with a screen that is quite small, and optimizing your screen space for what you are doing is really important to get a good overview of what you're doing... for example when I'm coding I want to be able to close the side panels to see my entire if statement for example. It's very nice that you can make them smaller, but at minimum size they are still huge on a tiny screen, ideally they would just snap close when you drag them towards the margin. A keyboard press would also be greatly useful.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

One tiny button on the top of each side panel which closed each of them, leaving max space for scripting or manipulation in the 3D environment or what have you. It would look exactly like the bar on the bottom, but on each side. Very much like blender has the N & T keys that maximizes or minimizes the sidebars.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

if(Input.was_key_released(Input.KEY_T)|| minimize_left_side_panel_button.has_button_been_pressed()|| maximize_left_side_panel_button.has_button_been_pressed()):
     if (left_side_panel.is_visible_in_tree()):
         left_side_panel.visible = false
         maximize_left_side_panel_button.visible = true
     else:
         left_side_panel.visible = true
         maximize_right_side_panel_button.visible = false

if(Input.was_key_released(Input.KEY_N)|| minimize_right_side_panel_button.has_button_been_pressed()|| maximize_right_side_panel_button.has_button_been_pressed()):
     if (right_side_panel.is_visible_in_tree()):
         right_side_panel.visible = false
         maximize_right_side_panel_button.visible = true
     else:
         right_side_panel.visible = true
         maximize_right_side_panel_button.visible = false

probably some logic error, but you get the idea...

If this enhancement will not be used often, can it be worked around with a few lines of script?:

By the right person it can technically be done in a script, but it's not easily made by someone not familiar with exactly how the node tree of the editor works.

Is there a reason why this should be core and not an add-on in the asset library?: One would be able to use an addon, but you'd be required to install it on every small device that anyone uses, I think it would be a feature as used as the "transform object to floor" button and key bind. It is also almost a requirement for someone trying to use the editor on a tablet, or other small screen where every screen square centimetre must be used sensibly to get an adequate experience.

Calinou commented 4 years ago

This already exists in the form of distraction-free mode (in both 3.2.x and the master branch). That said, there are no shortcuts to toggle the left and side panels' visibility right now.

Also, in 4.0, you'll be able to drag docks to external windows (e.g. to put them on another monitor).

invisiblesun commented 3 years ago

I need to work with the scene tree and have no use for the inspector, and like albinaask I work on a laptop.

There is no external monitor. External windows might be a solution but on Mac, however godot does not work well when switching between app windows if they are stacked on top of each other. Accessing the desktop via gesture then selecting a godot app window causes the window to be raised, then it immediately is lowered under the last selected window, causing a visual flash and requiring a second selection. I now close my eyes and perform the operation twice while blind to defray the eye strain it causes.

My proposal would be to add a double click to the ellipsis button that organizes tabs in the docks. It would be consistent with the bottom dock's behavior.

--

And I'm being a bit of an idiot. Tear off the panel you don't want (inspector) to expand space on the main editor window. Still collapsing side panels is common (JetBrains, Eclipse, VisualStudio (IIRC) and Unity (IIRC))

YuriSizov commented 3 years ago

Side note that there are two side panels on each side, not one, making a total of 4 side panels.

igorcafe commented 3 years ago

I think a useful feature based on what you've said would be able to customize the Distraction Free Mode, like this:

1. Default:

image

2. Distraction Free Mode:

image

3. "Even Less Distraction" Mode:

image

For achieving 3, I had to:

  1. Ctrl + Shift + F11, for Distraction Free Mode
  2. Ctrl + \, for hiding Scripts Panel
  3. Editor > Editor Layout > Default (kinda of a hack)
  4. Click Output for collapsing it

Which is a bunch of work just to get a full code window...

nsrosenqvist commented 2 years ago

Instead of a customizable distraction free mode or only exposing the ability to hide the side panels using keyboard shortcuts, I suggest that a clickable area would be added on each side of the editor window that would toggle and collapse respective side's panel. Similarly to a feature in the Lightroom photo editor (see link for video). This would expose the feature to users preferring mouse navigation too. The implementation in Lightroom is very simple and intuitive, easily discoverable, and allows for quickly toggling the desired panels.

Calinou commented 1 year ago

I suggest that a clickable area would be added on each side of the editor window that would toggle and collapse respective side's panel.

Many apps support collapsing a side panel by double-clicking the resizable area. We could implement that too.

PaperPrototype commented 1 year ago

I just want to hide the inspector but still access the scene and filesystem

snoopdouglas commented 5 months ago

I'm aware we've already got a shortcut to expand the bottom panel (when it's opened at all), but AFAIK there's currently no shortcut to toggle the bottom panel entirely (like when you click on the currently opened tab).

Should this proposal include this functionality too? If not, I'm happy to write a new one for this.