Skip to content

Move script name to top - #1342

Merged
Arctis-Fireblight merged 2 commits into
Redot-Engine:masterfrom
joey-wheeler99:add_script_name_on_top
Aug 7, 2026
Merged

Move script name to top#1342
Arctis-Fireblight merged 2 commits into
Redot-Engine:masterfrom
joey-wheeler99:add_script_name_on_top

Conversation

@joey-wheeler99

@joey-wheeler99 joey-wheeler99 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick from godotengine/godot@206d4a0.

The previous cherry-pick (#1239) hit a regression.

Summary by CodeRabbit

  • UI Improvements
    • Updated the script editor toolbar to show the active script or help page name prominently.
    • Long names are now centered and truncated with an ellipsis for better readability.
    • Moved the method filter and alphabetical sorting controls into a shared toolbar row.
    • The displayed name now updates correctly when switching tabs and clears when the last tab is closed.

@joey-wheeler99
joey-wheeler99 requested review from a team August 7, 2026 04:16
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The script editor now shows the active script or help name in a centered toolbar label. The method filter shares a row with alphabetical sorting. Obsolete filename and script icon members and update logic were removed.

Changes

Script editor toolbar

Layer / File(s) Summary
Toolbar layout and state members
editor/script/script_editor_plugin.cpp, editor/script/script_editor_plugin.h
The toolbar adds a centered, ellipsis-truncated script name label. The method filter shares a row with alphabetical sorting. Obsolete filename and script icon members are removed.
Selection-driven label updates
editor/script/script_editor_plugin.cpp
Script and help tab selection updates the script name label. Clearing the final tab clears the label.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Possibly related PRs

Suggested reviewers: generalprotectionfault

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving the script name to the top toolbar.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@joey-wheeler99

Copy link
Copy Markdown
Contributor Author
scriptname.mp4

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@editor/script/script_editor_plugin.cpp`:
- Around line 747-759: Update the active-tab handling in _go_to_tab() and the
related refresh/selection paths to synchronize script_name_label from the
unfiltered current ScriptEditorBase tab before applying filter_scripts. Use the
current script’s name for an active tab, including hidden, renamed,
history-selected, or refreshed scripts, and clear the label when no tab is
active.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e8d7390d-bf92-4eee-a8b5-2973cca0d2b6

📥 Commits

Reviewing files that changed from the base of the PR and between 89bb193 and 96a5d45.

📒 Files selected for processing (2)
  • editor/script/script_editor_plugin.cpp
  • editor/script/script_editor_plugin.h
💤 Files with no reviewable changes (1)
  • editor/script/script_editor_plugin.h

Comment thread editor/script/script_editor_plugin.cpp

@Arctis-Fireblight Arctis-Fireblight left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works as expected, approved!

Image

Thanks for getting this working properly Joey!

@Arctis-Fireblight
Arctis-Fireblight merged commit c614335 into Redot-Engine:master Aug 7, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants