-
Notifications
You must be signed in to change notification settings - Fork 946
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
Add new description widget attribute specifically for the tooltip text #1864
Comments
Many traits have a |
Could you give some example code illustrating your idea? |
Dear jasongrout, (btw, Markdown in the above figure does what I need, if you hover over the screenshot) Regarding your previous question: I do not really know the ipywidgets innards. Syntactically it could be either an independent trait, e.g. description_long, or an optional separate parameter of description (like in the Markdown syntax, I suppose), performing the same functionality. I am not sure I have answered your questions. |
Perhaps you wanted this. Present code in the screenshot: self.plot_range = Text(description='plot range\nstart,stop\n[,pack]\n[last,pack]',
value='0,500',
layout=Layout(width='22%'),
continuous_update=False)
self.plot_range.style.description_width='36%'
self.plot_range.observe(on_range,'value') Proposed code self.plot_range = Text(description='plot range',
description_long='start,stop\n[,pack]\n[last,pack]',
value='0,500',
layout=Layout(width='22%'),
continuous_update=False)
self.plot_range.style.description_width='36%'
self.plot_range.observe(on_range,'value') |
I think you can also put that info in the placeholder text, which is about as ephemeral as the tooltip: Text(description='plot range', placeholder='start, stop[, pack] [last, pack]') (There are concerns about putting instructions in the placeholder text, but I'm not sure it's any worse than putting it in a tooltip) |
Thanks, I tried it, but the "balloon" still contains the text of the description, not the text that I inserted in placeholder. Besides, I am missing the documentation for advanced features like placeholder (in readthedocs?) Can you please tell me where to look? |
Right - I was giving an alternate way to present that information to the user that works right now. So perhaps the take-away here is to make a new attribute for description widgets ( |
sounds great Roberto |
I changed the title to reflect this |
Let me know if something else needs to be done. |
I would like to outline another reason to deal with tooltip explicitly - for Labels in particular. Problem: Unwanted tooltip over LabelDemoCf. demo notebook in nbviewer.
ExplanationThe ipywidgets Label, which is part of many other core ipywidgets like XSliders, XText, DropDown, etc is the 'culprit'. See source code:
Suggested Remedy
Do this remark / suggested remedy make sense ? |
Add tooltip attribute to description widgets #1864
It looks to me that, as of 7.7.1 the description_tooltip, argument does not work for Dropdown. Is it a bug? |
I think that ipywidget is great, therefore I venture with a suggestion.
Presently a long widget description with not enough space to display produces dots, and a balloon when hovering over the text. The balloon is nice, the dots not so much.
In largish data analysis GUIs, very short help (i.e. a slightly longer description) would nicely fit, in my opinion, in a separate trait, that behaves like the balloon: the description is shown statically, the balloon is shown when hovering over the former.
Or in two separate parameters of the description, short and [long], the latter behaving like a balloon.
I hope you may consider it as a future feature, if others agree with the purpose.
Thank you so much
Roberto
P.S the same applies to other widget/trait pairs that have the same functionality, e.g. ToggleButton/value
The text was updated successfully, but these errors were encountered: