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

ScriptEditor: Show name of currently open script in top bar #5461

Open
alazifk opened this issue Sep 19, 2022 · 9 comments
Open

ScriptEditor: Show name of currently open script in top bar #5461

alazifk opened this issue Sep 19, 2022 · 9 comments

Comments

@alazifk
Copy link

alazifk commented Sep 19, 2022

Describe the project you are working on

GDScript Programming

Describe the problem or limitation you are having in your project

It is harder to see what script I have currently open than it needs to be. My eyes tend to wander to the scenes tabs which is a result of insufficient visual hierarchy.
bad
Here I have some unrelated script open and a Debug scene and it looks like I have a Debug script open. That the script is highlighted in the side panel is not good enough for various reasons including:

  • Gestalt laws: It is disconnected so it is not perceived as an unit
  • If I scroll away I don't see the name anymore
  • The placement is not fixed

Overall it is just too unclear that this is primary information.

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

Add the name of the script in the center of the top bar.
Make it visually distinct. I suggest:

  • fatter font
  • slightly raised or lowered

It could also be used as a button for a drop down. This could e.g. be used to select from a list of recently used scripts and pinned scripts.

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

good

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

no

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

yes

@zinnschlag
Copy link

Related to #512? This one places the script name in the status bar instead. But it is basically the same feature.

@YuriSizov
Copy link
Contributor

Related to #512? This one places the script name in the status bar instead. But it is basically the same feature.

I believe it might've been suggested separately from my proposal (though I can't find anything at the moment). But yes, the top bar is rather crowded, especially on lower resolutions, so this placement might not be the best.

@alazifk
Copy link
Author

alazifk commented Sep 21, 2022

@YuriSizov The post is towards the end of #512. I think we should try if things get squeezed at low widths. If it happens there are a number of ways we could deal with it, you could just hide the file name at very low widths, you could shorten it "T..." and show the full name when hovered, you could take space away from other elements e.g. "Online Docs" and "Search Help" could be shortened or elements could get collapsed. But we'd have to test if this is even an issue.

IMHO the best alternative would be to redesign the side bar with the scripts to actually make it look like vertical tabs.
vscode-vertical-tabs I would still also put the script name at the top. I believe in the long run the script editor should be redesigned to a detachable window that supports both horizontal and vertical tabs. Meanwhile putting the script name at the top seems good enough.

@Torguen
Copy link

Torguen commented Sep 26, 2022

Also related with #3697

@bfedie518
Copy link

bfedie518 commented Oct 15, 2022

This would solve a glaring problem: there is currently no way to see what script you have open if you close the script list. The only way to see which script is open is to see what is highlighted in the script list.

@rainlizard
Copy link

related plugin: https://github.com/rainlizard/ScriptNameOnTop

@Krigu
Copy link

Krigu commented Apr 11, 2024

Even after using the Godot Editor almost daily for a couple months, I still find it confusing when the title on the active tab and the currently opened script do not match. Since I usually hide the script panel to save some space, displaying the name of the currently openend script on the toolbar would personally help me a lot.

The save some space the buttons "Online Docs" and "Search Help" could only be displayed as an icon (like most other buttons in the editor).

The implementation could look something like this:
filename_in_titlebar

Whether the script name gets shown could optionally be toggled in the editor settings.

Since there are a lot of ongoing discussions about UX and the editor layout, any chance a PR implementing this proposal could get merged?

@Calinou
Copy link
Member

Calinou commented Apr 11, 2024

I'd make the path display the full res:// path if possible, or if space is lacking, display the last path components (e.g. res://scripts/weapons/sword/fire_sword.gd is shortened to .../sword/fire_sword.gd).

The save some space the buttons "Online Docs" and "Search Help" could only be displayed as an icon (like most other buttons in the editor).

I wouldn't remove labels for existing icons, as unlabeled icons are known to be a UX antipattern. They should be reserved for purposes where there's really no alternative (e.g. in Tree).

Since there are a lot of ongoing discussions about UX and the editor layout, any chance a PR implementing this proposal could get merged?

You can open a PR for this, but like any other PR, we can't guarantee it'll be merged.

@Krigu
Copy link

Krigu commented Apr 12, 2024

I wouldn't remove labels for existing icons, as unlabeled icons are known to be a UX antipattern. They should be reserved for purposes where there's really no alternative (e.g. in Tree).

So how about renaming them to something shorter, like e.g. Docs and Help?

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

8 participants