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

Label layout regression - clarification of #1010 #1246

Closed
britishbadger opened this issue Mar 31, 2017 · 8 comments
Closed

Label layout regression - clarification of #1010 #1246

britishbadger opened this issue Mar 31, 2017 · 8 comments
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@britishbadger
Copy link

britishbadger commented Mar 31, 2017

Would it be possible to clarify what the expected behaviour of the Label widget is following closure of #1010 ? We have lots of notebooks, all with truncated labels following the upgrade to ipywidgets 6 and it isn't clear as to whether the pull request that enables was reverted or not based on the above. If it was reverted, which release would this be included with ?

I've used the latest jupyter/minimal-notebook docker stack, pip installed latest widgets, enabled the plugin and ran the following:

widgets.Label(
    value="A reallly long piece of text",
)

I get the output
A reallly lo...
The HTML widget works fine so we could transition to that if required. A label with such few charachters seems a little bit pointless though IMO.

@jasongrout
Copy link
Member

The Label widget is meant to be a drop-in replacement of the description label next to controls. We apply the same styling (e.g., a limited width) like we do to control descriptions so that the Label widget plays nicely with the default control layout, which is based on a fixed-width control (but you can set the layout.width to have a wider label if you want).

If you want freeform html text, please use the HTML widget, which applies minimal styling. If you need freeform html with math, then please use the new HTMLMath widget.

@jasongrout
Copy link
Member

In what context were you using Label? Was it for the descriptive labels next to controls?

@britishbadger
Copy link
Author

Thanks @jasongrout for replying, yes we are using the label next to components to provide descriptive labels. We tried setting the width too but that seemed to have an upper bound, even when it it was just the label in a cell. This meant it wast not possible to display the full description we'd set for the label regardless of width set.

Moving to the HTML widget would be fine as it looks like it looks like we would need to make a change eitherway. For the moment though we've reverted to ipywidgets 5.2.2 as 6.x. also breaks some of the complex layouts we have in on particular notebooks built using HBox, VBox and flex layouts.

I'll close this issue for now.

@jasongrout
Copy link
Member

yes we are using the label next to components to provide descriptive labels.

@britishbadger: Great - that's what it is for. I think we've heard now from enough people trying to use labels in this way being frustrated with the width that we should revert the length restriction. I'll make a new PR, which should be included in 7.0, hopefully out pretty soon.

@jasongrout
Copy link
Member

For the moment though we've reverted to ipywidgets 5.2.2 as 6.x. also breaks some of the complex layouts we have in on particular notebooks built using HBox, VBox and flex layouts.

@britishbadger - can you describe the problems you were seeing in a new issue? We're drawing close to a 7.0 release, and we'd like to look at the pain points people had moving to 6.0.

@jasongrout jasongrout added this to the 7.0 milestone Aug 4, 2017
@jasongrout
Copy link
Member

@britishbadger - ipywidgets 7.0 has been out for a while now. Have you seen any issues with upgrading to 7.0?

@britishbadger
Copy link
Author

Hi, Sorry. I've since moved off the project using this as I've moved companies and I'm unable to check.

@jasongrout
Copy link
Member

Okay, thanks for the response.

@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

2 participants