Skip to content

feat(editor): implement dedicated HierarchyPanel with search, context menu, delete key#84

Merged
LyeZinho merged 2 commits into
mainfrom
76-hierarchy-panel
May 14, 2026
Merged

feat(editor): implement dedicated HierarchyPanel with search, context menu, delete key#84
LyeZinho merged 2 commits into
mainfrom
76-hierarchy-panel

Conversation

@LyeZinho
Copy link
Copy Markdown
Member

Summary

Implement a dedicated HierarchyPanel class (issue #76, Milestone M1) with its own .cpp file, refactored from the previous inline header.

Changes

New file:

  • src/editor/HierarchyPanel.cpp — Full ImGui rendering implementation

Modified files:

  • src/editor/HierarchyPanel.hpp — Refactored from 189-line inline-heavy header to clean class declaration; now stores EditorContext* and World* as members
  • src/editor/SceneEditor.hppSceneEditor() constructor passes &m_ctx to HierarchyPanel
  • CMakeLists.txt — Added HierarchyPanel.cpp to doppio executable sources
  • tests/test_editor.cpp — Added 4 tests for panel construction/state

Features per acceptance criteria

  • ✅ Root entities in tree; children indented under parent
  • ✅ Click selects entity in EditorContext
  • ✅ Right-click empty space → Create Empty Entity
  • ✅ Delete key with focus removes selected entity
  • ✅ Search filter (case-insensitive substring match)
  • ✅ Entity context menu: Rename, Create Child, Delete
  • ✅ Drag-and-drop reparenting
  • ✅ All operations wrapped in beginUndo/endUndo

… menu, delete key

Refactor HierarchyPanel from inline header to .hpp+.cpp with member-based
design (EditorContext*, World*). Add search filter, empty-space context
menu (Create Empty Entity), Delete key handling, and undo-wrapped
operations. Wire into SceneEditor constructor and doppio build.
@LyeZinho LyeZinho linked an issue May 14, 2026 that may be closed by this pull request
6 tasks
@LyeZinho LyeZinho self-assigned this May 14, 2026
@LyeZinho LyeZinho added documentation Improvements or additions to documentation enhancement New feature or request planned-implementation Implementations planned according with roadmap labels May 14, 2026
@LyeZinho LyeZinho added this to the Scene Editor Foundation milestone May 14, 2026
@LyeZinho LyeZinho merged commit 98df3de into main May 14, 2026
1 check passed
@LyeZinho LyeZinho deleted the 76-hierarchy-panel branch May 14, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request planned-implementation Implementations planned according with roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hierarchy Panel

1 participant