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

Make selection container titles a tuple of strings #2746

Merged
merged 4 commits into from
Jan 31, 2020

Conversation

jasongrout
Copy link
Member

get_title and set_title have long been somewhat a wart in our API, requiring people to put several statements after creating a selection container to label each container one by one. This PR makes the titles a proper tuple so titles can be set at creation time or all at once.

@jasongrout jasongrout added this to the 8.0 milestone Jan 22, 2020
@jasongrout
Copy link
Member Author

@pbugnion or @vidartf - any chance you could review this?

@pbugnion
Copy link
Member

pbugnion commented Jan 26, 2020

The interface is much better! Thank you!

The only thing that's a little strange is that we don't enforce that .children and titles is the same length. I'm guessing enforcing that they are the same length would make it hard for users to change the number of children: you'd have to hold trait notifications while you changed both. Not enforcing length consistency therefore seems sensible.

I think this is good to merge.

@vidartf vidartf merged commit 78cdfcb into jupyter-widgets:master Jan 31, 2020
@lock lock bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backwards-incompatible resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants