-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Improve includes of EditorNode
(and everything else)
#75765
Improve includes of EditorNode
(and everything else)
#75765
Conversation
2010ae9
to
857602c
Compare
I'd also move Other potential new folders I see are |
@YuriSizov @KoBeWi I'm not sure a |
The GUI elements I listed don't fall into any of these categories. They are also quite generic and reusable (or directly related to GUI, in case of editor themes and scale). Things like EditorSpinSlider, SceneTreeEditor or EditorZoomWidget could be even used in custom plugins. |
Still though, we could call it "misc" or "widgets" or "elements" or "primitives" or similar. Calling it "gui" seems wrong if there are things outside of it that are also GUI, similar to having a folder called "code" for code that doesn't fit in the other folders. Anyway, that's all I will say, this is not a hill to die on :P |
So the way I see it, I agree that docks can have their own folder, but I'd keep such a change for a separate PR to reduce possible points of friction for this to get merged. I would put If the purpose of |
SceneTreeEditor is just an extended Tree. It's used in multiple docks and dialogs. |
857602c
to
92f5955
Compare
Okay, I also moved Theming classes may want to have their own folder, but are also okay at the top level, IMO. But again, we can change everything later, this stuff is purely internal. I'd prefer to approach the overall organization issue here in steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! The reorganization seems reasonable (and can be adjusted later if necessary). Just needs a rebase.
92f5955
to
ac3f228
Compare
Also start organizing editor-specific GUI components into a dedicated folder, `editor/gui`. Also move `editor_file_server` next to the rest of debugger classes.
ac3f228
to
4154039
Compare
Thanks! |
I'm starting to look into refactoring parts of
EditorNode
and friends (see also #75694).So this PR does a couple of things. I removed some unnecessary includes from
editor_node.h
, which triggered issues in a bunch of other classes which were implicitly relying on them. So I fixed includes in those, removing unnecessary includes in process as well.The second thing that this PR does is establishing the
editor/gui
folder for various GUI editor-only widgets and components. The rooteditor
folder is growing bigger and bigger, and I'm pretty sure that parts ofEditorNode
will be extracted into individual classes. So it makes sense to me to start organizing a place for them. I picked some obvious ones to be the first to move, but there are definitely more that can be shifted to the new folder.I also moved
editor_file_server.h/cpp
from their own folder to thedebugger
folder, so they don't feel so alone on their own. Debugger is the only class that usesEditorFileServer
, so seems reasonable. And I renamedEditorPath
toEditorObjectSelector
, because that name was very awkward and perhaps even misleading.With this and #75694 resolved, it should be possible to start reorganizing the GUI parts of
EditorNode
at least.