-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Remove the Tabs node in favor of TabContainer #2129
Comments
We're using Tabs over TabContainer in our project at the moment :(
The Tabs vs TabContainer also confused me in the beginning, but that isn't exclusive to those two Nodes. I realise this might be an odd point, but rather than the proposed
I don't immediately have a lot of common use cases for this, but fixing any more complex setups of Tabs with only a |
The reason to remove
That is definitely be a better solution. |
And that is the point of the confusion. I think it's fine this way and is the reason to remove I also don't think there is a need to mix vertical and horizontal tabs, so instead of making two controls it should just be a setting for the container. |
Ah I see. I was under the presumption |
Any updates? |
@Jack2104 10 days is usually not enough time to gather feedback on a big compability breaking change such as removing some existing functionality. We still need more people to agree on it to be considered, I think. Everyone, yourself included, are free to make a PR, though. |
So, after running into a lacking feature set of Currently in the Godot Editor we have only one use case for Another reason to use
I think that both nodes have a right to exist. They have useful perks to them and mixing all of them into a single node doesn't make much sense. However, they can synergize. So what I propose is the following:
Most of the methods are either moved to Dealing with
Closing should work more like a "close request" type of interaction, allowing users to define additional behavior before the tab is actually closed, or preventing it all together. Similar to how
As a built-in feature controls would be automatically repositioned when changes to tabbar happen, so this could be dropped. The API can be as follows
To restore the old This proposal makes #2287, #2250 obsolete, and moves #2318, #2286 to |
Sorry, I read through your message multiple times but don't understand what you are getting at. What can |
@Jummit Basically, Using PS. Alternative option would be to build them from the same base class, but that won't work well, with one being a container and the other not. |
You can create dummy nodes to add tabs, similar to how you add dummy nodes to GraphNodes to add ports. You can then react to the tab switched signal and use it like |
We need to refactor So in the end, tabs of |
Could be closed I think. Tabs is more flexible alternative to TabContainer. Currently TabContainer is limited, for example you can't customize it by adding buttons using add_child(). |
Tabs
in favor of TabContainer
It cannot be closed, because it's already in works, in a way. Edit: Well, I guess that other way is #2514. But I'd still keep this open until we implement it. |
After thinking about it, I like #2514 's solution better. Closing as it has the same level of support. |
Describe the project you are working on
Multiple projects where vertical tabs would be helpful.
Describe the problem or limitation you are having in your project
Currently TabContainer does not have an option to display vertical tabs. I started to implement it, the problem is that all of the tab functionality is duplicated for the
Tabs
control. The obvious move is to refactor the TabContainer to use it (see godotengine/godot#4512, but I propose to delete it. Here are the reasons:Tabs
below)In most cases, you can just use a TabContainer (kinda a repetition of point 2)
This is a weak point, but having both
TabContainer
andTabs
was confusing for me until I looked at the docs, because I didn't know what to use.Why use
Tabs
instead ofTabContainer
?I have only seen
Tabs
being used once, and it's for the scene tabs:Tabs
is used to add the tool panel between the tabs and the scene. This could easily be made a function ofTabContainer
with a method likeset_middle_control
. Again, point 1.Describe the feature / enhancement and how it helps to overcome the problem or limitation
By deleting
Tabs
I could finish implementing vertical tabs and the above mentionedset_middle_control
, making it more powerful, without having to worry about refactoring it and moving the functionality toTabs
. It's my fault I started withTabContainer
, but I think this is the right move nonetheless.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
set_middle_control
toTabContainer
set_middle_control
here:https://github.com/godotengine/godot/blob/8a331070868cf4e4c5aa91d20ca3a22a8cc42a8e/editor/editor_node.cpp#L5971-L5987
TabContainer
If this enhancement will not be used often, can it be worked around with a few lines of script?
Vertical tabs could be implemented in GDScript, but this proposal is about the refactor to make vertical tabs and more possible in core.
Is there a reason why this should be core and not an add-on in the asset library?
It's a refactor in core.
The text was updated successfully, but these errors were encountered: