Skip to content

[Merged] Migrated UID Viewer from bottom‑panel dock to editor tool#1252

Merged
Arctis-Fireblight merged 2 commits into
Redot-Engine:masterfrom
Selciner-Games:master
May 11, 2026
Merged

[Merged] Migrated UID Viewer from bottom‑panel dock to editor tool#1252
Arctis-Fireblight merged 2 commits into
Redot-Engine:masterfrom
Selciner-Games:master

Conversation

@TheAenema
Copy link
Copy Markdown
Contributor

@TheAenema TheAenema commented May 11, 2026

This change migrates UIDViewer from the legacy bottom‑panel dock into a standalone Editor Tool window. The tool is now instantiated and managed directly by EditorNode with a new Tools‑menu entry and proper open/close lifecycle handling.

The UI has been reorganized into a dedicated window container, signals have been rewired to the new class and the old UIDViewerDock implementation has been removed. File locations were updated to live under editor/file_system and the tool now integrates cleanly with the editor’s windowing and scaling systems.

image

Summary by CodeRabbit

  • Refactor
    • UID Viewer tool is now accessible from the Tools menu as a popup window instead of a bottom dock panel, improving accessibility and workspace organization.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Walkthrough

This PR refactors the UID Viewer from a dock-based container to a tool window with Window base class. EditorNode instantiates UIDViewer during initialization and wires a new Tools menu shortcut to call _open_tool() for managing window display and focus.

Changes

UID Viewer Tool Window Refactor

Layer / File(s) Summary
Class Definition & Type Setup
editor/file_system/uid_viewer.h, editor/editor_node.h
UIDViewerDock (VBoxContainer-based) replaced with UIDViewer (Window-based). Header adds _open_tool() public method and _on_tool_closed() private handler for window lifecycle. Forward declaration added to EditorNode. Includes updated for Window UI dependencies.
Member Declaration & Constructor
editor/file_system/uid_viewer.cpp, editor/editor_node.h
EditorNode gains private uid_viewer member pointer. UIDViewer constructor creates window with search bar, UID tree, and context menu. UIDViewer instantiated in EditorNode constructor and added to gui_base.
Core UID Filtering & Interaction
editor/file_system/uid_viewer.cpp
Refresh scans filesystem and populates UID tree; search filters tree by UID/path; tree activation navigates resource in FileSystemDock; context menu copies UID or resource path to clipboard; helper methods recursively control tree visibility; tool lifecycle methods manage popup show/hide and signal connections.
Editor Node Wiring
editor/editor_node.cpp
Include swapped from UIDViewerDock to UIDViewer; Tools menu gets "UID Viewer..." shortcut mapped to TOOLS_UID_VIEWER; menu handler calls uid_viewer->_open_tool(); old bottom-panel dock creation removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Redot-Engine/redot-engine#1144: Main PR refactors the earlier UIDViewerDock into a new Window-based UIDViewer and updates EditorNode to instantiate/use UIDViewer instead of UIDViewerDock.

Suggested labels

enhancement, topic:editor

Suggested reviewers

  • Arctis-Fireblight
🚥 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 specifically describes the main change: migrating the UID Viewer from a bottom-panel dock to an editor tool window.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch master

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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/file_system/uid_viewer.cpp`:
- Around line 266-273: The reopen logic should also check actual window
visibility: update UIDViewer::_open_tool to treat the tool as "not open" when
it's not visible (use is_visible_in_tree() or equivalent) so that Tools → UID
Viewer will call popup_centered() again; implement: if (!is_open ||
!is_visible_in_tree()) then (if !is_open connect close_requested to
&_on_tool_closed), call popup_centered() and set is_open = true, otherwise call
grab_focus(); reference UIDViewer::_open_tool, is_open, popup_centered(),
grab_focus(), and _on_tool_closed.
🪄 Autofix (Beta)

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

Run ID: ae91719f-0a86-403d-a02b-b822c4fca889

📥 Commits

Reviewing files that changed from the base of the PR and between 300d075 and 47bc78e.

📒 Files selected for processing (4)
  • editor/editor_node.cpp
  • editor/editor_node.h
  • editor/file_system/uid_viewer.cpp
  • editor/file_system/uid_viewer.h

Comment thread editor/file_system/uid_viewer.cpp
@Arctis-Fireblight Arctis-Fireblight added this to the Redot LTS 26.2 milestone May 11, 2026
@Arctis-Fireblight Arctis-Fireblight merged commit 793bbca into Redot-Engine:master May 11, 2026
17 checks passed
@TheAenema TheAenema changed the title Migrated UID Viewer from bottom‑panel dock to editor tool (Repull 2) [Merged] Migrated UID Viewer from bottom‑panel dock to editor tool May 11, 2026
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.

2 participants