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

Alternative script list UI #5477

Open
zinnschlag opened this issue Sep 23, 2022 · 1 comment
Open

Alternative script list UI #5477

zinnschlag opened this issue Sep 23, 2022 · 1 comment

Comments

@zinnschlag
Copy link

zinnschlag commented Sep 23, 2022

Describe the project you are working on

Project with a lot of scripts in a deep and wide directory tree

Describe the problem or limitation you are having in your project

This proposal is intended as an alternative to #4081. Summary: The current script list has usability issues (too much horizontal space) and a tab bar isn't a good solution either.

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

This proposal is build on top of #5461 (also borrowing a screenshot from there for illustration). If we add the script name (including full path if space allows it) to the script editor menu bar, this new UI element can be turned into a button that pops up the script list (vertically arranged). The list stays open only as long as it is needed and therefore reduces the space requirements during regular editing down to 0.

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

ui_sketch

The new list should take all the functionality of the old one (including context menu) and since we now have enough space we can even have a separate close button per script. There will also be enough space to show the entire path (if so desired).

Left-clicking a script will select the script and close the list. All other interactions (close button, menu) should keep the list open since the user is likely to take more action. And of course the list should also be keyboard navigable (maybe with a search function similar to quick open).

The script editor title bar button should also have a keyboard shortcut associated with it so that the entire interface can be navigated with the keyboard only. Further more since the title bar is higher than on ordinary line of text we have enough space to style this button in a way that makes it clearly visible which should alleviate the discovery issues resulting from this new interface.

This UI has two downsides:

  • It requires one additional click compared to the script list or the proposed horizontal tab interface.
  • One can not see at a glance which scripts are currently open (without taking an action first)

I believe the first point is negligible. If you are selecting a script via mouse you aren't going for max UI performance anyway (working with mouse is kinda slow-ish compared to keyboard). And using the keyboard shortcut approach is actually faster than what we have now.

The second point is a clear downside. But how often do we need to check which scripts are open without actually wanting to access a separate script?

Edit: I just noticed that the screenshot still has the old script list. This would go away then. The member list (functions and variables) can probably stay were it is. This list is less important (people can configure it away if they suffer from space limitations) and the issue there isn't as big to start with (hopefully people keep variable and function names short).

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

Used very often and AFAIK can't be done.

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

This is a core element of the editor UI.

@rainlizard
Copy link

https://github.com/rainlizard/ScriptNameOnTop

Here's a plugin I just now put together for Godot 4.0, it's only the basics and doesn't have all the features you outlined. I very much dislike the Scripts Panel stealing away so much screen space so I always disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants