godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 92 forks source link

Allow column widths for properties in the inspector to be resizable/adjustable #2497

Open Lunadyn opened 3 years ago

Lunadyn commented 3 years ago

Describe the project you are working on

(Not related to proposal.)

Describe the problem or limitation you are having in your project

For properties with a single value, the inspector presents them in 2 columns. The property name is displayed in the left, and the value of the property in the right.

1

Properties with two values are shown similarly, with an extra row for the second value.

2

In both of these cases, columns automatically use half of the width of the inspector dock, and this ratio is not adjustable. This can be an issue when either the property name or its value is significantly longer than the other.

3

At the moment, the workaround would be to increase the width of the inspector dock. This is not ideal, as it leaves a lot of unused space in one of the columns.

4

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

I suggest allowing the width of the inspector columns to be adjustable.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Unreal Engine's editor allows for the width entire columns to be adjusted. However, this can be problematic, as each individual property name and value may vary in length.

image

Ideally, this adjustment would be possible at the individual property level, rather than having the widths of each row be linked.

5

Properties with three values are shown on a separate row from the property name, with each value taking a third of the inspector dock's width. This is generally not an issue. However, for the sake of completeness, it might be worth allowing these to be adjustable too.

6

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

This is a usability and quality of life improvement for a core feature in the editor, so workarounds would not be ideal.

Is there a reason why this should be core and not an add-on in the asset library?

The inspector is a core feature in the editor, and this proposal provides a quality of life improvement present in other editors like that of Unreal Engine.

Calinou commented 3 years ago

This should be handled in an automatic way by https://github.com/godotengine/godot/pull/41369.

Ideally, this adjustment would be possible at the individual property level, rather than having the widths of each row be linked.

Are you sure you want to spend time resizing dozens of properties every time you resize the inspector? :slightly_smiling_face: I think inspector sizing should be handled with as much automation as possible. It's not something that should get in the way.

PS: You can enable Horizontal Vector 2 Editing in the Editor Settings to make components of Vector2 properties display on a separate line below the property name.

hydescarf commented 3 years ago

While I do agree that I won't be resizing all the time, but can we consider some enhancement on the auto-resize? For example, snapping a screenshot from the link you provided above, we do not need to maintain a big ratio for values like numbers (tho expandable) or boolean. image They can be as short as their values are, and prioritize on expanding the property name instead. But I can see how it could mess up the designs which I think you guys won't be agreeing with that :P.

So instead of that, I'd like to request to at least give type "FILE" a Horizontal Vector 2 Editing checkbox. They usually come with a very long name, so it's best for them to be positioned below the property name instead to maximize the space. As you can see below, we have to expand the inspector to see the whole file name, which is not that great for a small monitor user. image image While I did not try out the proposal version, that looks like it still requires user to expand the inspector regardless

So maybe make a checkbox to align them something like below: Untitled

Or maybe apply that to "TEXT/STRING" in general, I can see button text will have the same issue with a long name. image

mieldepoche commented 3 years ago

This is just an idea so I didnt make a new proposal for it but something that has been bothering me for a while is how having a On checkbox for bool values feels like doing if condition == true. A solution to this and the column width problem (at least for checkboxes) would be to only put a checkbox labeled with the option name: checkbox

Calinou commented 3 years ago

So instead of that, I'd like to request to at least give type "FILE" a Horizontal Vector 2 Editing checkbox. They usually come with a very long name, so it's best for them to be positioned below the property name instead to maximize the space. As you can see below, we have to expand the inspector to see the whole file name, which is not that great for a small monitor user.

This should be requested in a separate proposal :slightly_smiling_face:

This is just an idea so I didnt make a new proposal for it but something that has been bothering me for a while is how having a On checkbox for bool values feels like doing if condition == true. A solution to this and the column width problem (at least for checkboxes) would be to only put a checkbox labeled with the option name:

The issue with putting the checkbox on the left is that you lose consistency by doing so. The value would now be on the left instead of being on the right like all other property types.

hydescarf commented 3 years ago

Ah, I thought it would be related, alright, I will make one later