Delete html fallback message.#2007
Conversation
This reverts jupyter-widgets#1674, since we discovered some problems with the classic notebook and html outputs. Fixes jupyter-widgets#1777 Fixes jupyter-widgets#1951
|
I'll also add a docs page explaining what to do if you see this, but were hoping to see widgets, basically containing the helpful text here. |
|
Note: The |
Good point. Can we try it out and see? At least it's informative of what you're missing, instead of boilerplate text that gets repetitive after a while. |
If this is only intended as a stop-gap measure until #1777 / jupyter/notebook#2980 gets fixed, then sure. My preferred long-term solution would be a short HTML entry with a link to an entry in the docs describing the possible causes of seeing the message. Use case where the repr is longer than the current message: pythreejs, e.g. https://github.com/jovyan/pythreejs/blob/master/examples/Animation.ipynb |
mwcraig
left a comment
There was a problem hiding this comment.
This seems fine as a temporary workaround.
I agree with Vidar about where we want to end up eventually.
ipywidgets/widgets/widget.py
Outdated
| @@ -708,7 +708,6 @@ def _ipython_display_(self, **kwargs): | |||
| # http://www.iana.org/assignments/media-types/media-types.xhtml. | |||
| data = { | |||
| 'text/plain': repr(self), | |||
There was a problem hiding this comment.
If we want to ensure this never gets too big, how about repr(self)[:160] (or some other appropriate number).
There was a problem hiding this comment.
I think it is nice to have the full repr available, I'm just arguing whether that should be the fallback format or not.
There was a problem hiding this comment.
Since you can always do repr() to get the full repr, I think chopping it off (and appending an ellipsis) is a good compromise for the fallback.
+1 |
This prevents huge text output when it is a fallback. Length 110 is chosen as it fits on a single line in the classic Notebook.
|
LGTM |
|
As long as we agree on the long term solution, I'm happy with the suggested solution. |
|
Great, thanks! |

This reverts #1674, since we discovered some problems with the classic notebook and html outputs.
Fixes #1777
Fixes #1951