Skip to content

Add back set_title and get_title to selection containers #3477

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

Merged
merged 3 commits into from
Jun 13, 2022

Conversation

jasongrout
Copy link
Member

@jasongrout jasongrout commented Jun 7, 2022

Add back set_title and get_title to selection containers

Also, we eagerly compute a title list that updates when the children are updated, so that .titles is always reasonable.

This does change the api slightly from 7.x: a title is not allowed to be None, but instead should be an empty string.

In order to better preserve the 7.x api, I also make it so that if you do set_title(index, None), it actually sets the title to ''. However, if you do get_title(index), it won't return None then, so that is a small breakage from the 7.x api.

Fixes #3471.

@jasongrout jasongrout added this to the 8.0 milestone Jun 7, 2022
@github-actions
Copy link

github-actions bot commented Jun 7, 2022

Binder 👈 Launch a binder notebook on branch jasongrout/ipywidgets/settitle

Also, we eagerly compute a title list that updates when the children are updated, so that .titles is always reasonable.

Fixes jupyter-widgets#3471.
This is a breaking change from get_title/set_title in ipywidgets 7.
@jasongrout jasongrout marked this pull request as ready for review June 7, 2022 22:57
@jasongrout jasongrout requested a review from ibdafna June 7, 2022 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reintroduce selection container's set_title/get_title methods
2 participants