X Tutup
Skip to content

Move script name to top#86468

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
KoBeWi:always_has_been
Oct 13, 2025
Merged

Move script name to top#86468
Repiteo merged 1 commit intogodotengine:masterfrom
KoBeWi:always_has_been

Conversation

@KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Dec 23, 2023

Closes godotengine/godot-proposals#8317
image
Fun fact: the script name and icon on top was always there, and even updated properly, but never displayed after hide(). The PR simply makes it visible (I also did some tweaks/cleanup).
Also removed the name on left and moved the sort icon next to filter.

@KoBeWi KoBeWi added this to the 4.x milestone Dec 23, 2023
@KoBeWi KoBeWi requested a review from a team as a code owner December 23, 2023 11:41
@YuriSizov
Copy link
Contributor

I support this conceptually, but we need to make sure it works nicely on small resolutions with any script name. This bar of controls already introduces issues with content overflow in some languages which translate verbosely, like French.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.3 Jan 8, 2024
@KoBeWi
Copy link
Member Author

KoBeWi commented Jan 8, 2024

I checked French editor and there is no problem in 1920, but lower resolutions might have problems.

Though not sure how to make it friendly for low resolutions. If I enable trimming, the text is shrunk to 0. I can't think of a way to have a centered, trimmed text with an icon next to it.

@YeldhamDev
Copy link
Member

What's the point of showing the script's name twice, exactly?

@KoBeWi
Copy link
Member Author

KoBeWi commented Jan 8, 2024

It's not shown when you shrink the left panel (and can still be switched when switching scenes).

@YeldhamDev
Copy link
Member

It's not shown when you shrink the left panel

I think the people who do that does so because they don't have enough horizontal space, the situation where this feature might be a problem. 😛

@YuriSizov
Copy link
Contributor

I think the people who do that does so because they don't have enough horizontal space, the situation where this feature might be a problem. 😛

As someone who had a collapsed script list and made a plugin to turn it into a dock when working on a smaller laptop, I'd say that having a name visible is a necessity in that case. Although I put it on the bottom bar in my plugin:

@akien-mga
Copy link
Member

There's quite a lot of demand in the community for having script tabs at the top, instead of scene tabs, when in the script editor. This may replace the need for such a change if we were to go this way (even detached, the script editor should still have tabs at the top to switch between scripts IMO).

Otherwise, if we don't go this route or keep it configurable, I see the need for making the current script name more prominent. But I have concerns about the usability of the approach here, the top bar is quite busy and the added name doesn't particularly stand out compared to other buttons. And indeed on smaller resolutions / long script names / some locales this could become a problem. Maybe Yuri's approach to put it in the footer would be better.

@YeldhamDev
Copy link
Member

I'm personally more keen to the bottom approach.

@KoBeWi
Copy link
Member Author

KoBeWi commented Feb 15, 2024

It can't be add the bottom, because that's where the errors appear.
image
There is no space.

Also, unlike the top bar, the bottom one is separate per opened script, so the logic will be more complex (it needs to update in case of script rename etc.).

@YeldhamDev
Copy link
Member

It can't be add the bottom, because that's where the errors appear.

Couldn't the error just replace the name once it appears? I don't think it's that important to show both at the same time.

@KoBeWi
Copy link
Member Author

KoBeWi commented Feb 16, 2024

I removed the icon and enabled trimming in the label, so it doesn't enforce minimum size:

godot.windows.editor.dev.x86_64_8pPXY12wj1.mp4

Since moving it to bottom is going to be a hassle, I'd prefer doing that only if the above solution is not sufficient.

@akien-mga akien-mga modified the milestones: 4.3, 4.x May 7, 2024
Copy link
Contributor

@kitbdev kitbdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to take advantage of this empty space, and adding the name helps add clarity.
And its already partially implemented so we should to do something about it.

Also I think it is fine at the top, having it at the bottom but only if there are no errors seems like it would be confusing.

@kitbdev kitbdev modified the milestones: 4.x, 4.6 Oct 12, 2025
Copy link
Contributor

@kitbdev kitbdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
And if we do decide to have tabs in the future, we can reassess this.

@Repiteo Repiteo merged commit 5e7f773 into godotengine:master Oct 13, 2025
19 of 20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 13, 2025

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the edited script filename so it's still displayed when the scripts panel is folded

7 participants

X Tutup