Skip to content
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

Add FoldableContainer Node #8974

Open
WhalesState opened this issue Jan 26, 2024 · 4 comments · May be fixed by godotengine/godot#102346
Open

Add FoldableContainer Node #8974

WhalesState opened this issue Jan 26, 2024 · 4 comments · May be fixed by godotengine/godot#102346

Comments

@WhalesState
Copy link

Describe the project you are working on

A Godot programs and editor addon that needs an Inspector.

Describe the problem or limitation you are having in your project

while creating a property Inspector to change some of the nodes properties in game, I ran into an issue of making a clean UI for it, I was looking forward to create the same Container used in EditorInspector to add Sections that can be folded.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

While Similar Containers exists as addons like CollapsibleContainer and ExtendableContainer none of them will be customizable easily without a theme.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It's still a WIP since the code needs a review and the docs needs to be generated Pull Request link

FoldableContainer.mp4

If this enhancement will not be used often, can it be worked around with a few lines of script?

This can be made as an EditorPlugin, but customizing it's look if you have many themes for the project you will need to add the custom type manually to each of them and to define a lot of properties.

Is there a reason why this should be core and not an add-on in the asset library?

Because of theming limitation, Also it can be helpful for the godot editor and project settings to organize it, and can replace the editor inspector sections, also it will be useful for game settings and programs like Pixelorama and GodSvg.

@passivestar
Copy link

A foldable container in core would be useful to have for editor plugins, because it will make foldable sections in third-party plugins have the same default look and behaviour as the built-in inspector foldables, making the UX more consistent throughout the editor

@WhalesState
Copy link
Author

WhalesState commented Jan 30, 2024

I have made a speed video to show the new node functionality, I need some help finishing this class and generating it's docs.

foldable_container.mp4
foldable_container2.mp4

TODO:

  1. Add folding_toggled and title_changed signals
  2. Generate the class docs.
  3. Make a review and some tests to insure that the code is clean with no bugs as much as possible.

@WhalesState
Copy link
Author

Fixed all bugs and added the ability to add icon buttons to the title.

@WhalesState
Copy link
Author

This is how it looks now.

Screencast.from.01-15-2025.02.49.58.PM.webm

@KoBeWi KoBeWi linked a pull request Feb 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants