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

Allow hiding the labels on specific Nodes, and prevent dragging other tabs into them. #163

Open
LiamPClancy opened this issue Aug 25, 2023 · 2 comments · May be fixed by #164
Open

Allow hiding the labels on specific Nodes, and prevent dragging other tabs into them. #163

LiamPClancy opened this issue Aug 25, 2023 · 2 comments · May be fixed by #164
Labels
enhancement New feature or request

Comments

@LiamPClancy
Copy link

Is your feature request related to a problem? Please describe.
No Issue - just looking for some additional optional functionality.

Describe the solution you'd like
I'd like to use the doc control for side bars and bottom bars on my app, to allow users to drag and drop the tabs between these sections.
I have a middle Node that i'm creating that I'd prefer if users couldn't drag it or drop other tabs from other nodes into this tab.

I've made a couple of changes to enable this functionality,

i've added a prop on Node::Leaf hide_label that allow one to set if they what that node to hide the labels - if there are no labels showing it prevents the ability to drag the tab in the node, and i've also used the same setting to prevent dropping other tabs into the node.

to enble this on a node, i've create the additional functions split_left_single... which only accepts a single tab and creates the Node:Leaf with hide_label set to true.

Describe alternatives you've considered
i've added a function to DockArea that allow me to set that no tab labels should be shown - this isn't particularly useful in my use case, as it really prevents the ability to see more than one tab in any node - or drag any of them anywhere.

Additional context
i've created a draft pr into the release-v7 branch because that's the branch that i've been using locally.
just wanted to put it up to see if this is functionality you're interested in.
if you'd like it, I can neaten it up to make a suitable PR into main.

@LiamPClancy LiamPClancy added the enhancement New feature or request label Aug 25, 2023
@LiamPClancy
Copy link
Author

#164

@Adanos020
Copy link
Owner

Hey thanks for submitting this issue. As for the last paragraph: we now only merge bugfixes to main, all new features and breaking changes should go to the release-0.x branches.

I'll take a look at your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants