You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behaviour hasn't actually changed, but we made the background around the notebook 'page' grey, so it's much more obvious now when things extend beyond the page.
We're not sure what to do about this, because we do think the grey surround looks much nicer when things aren't extending outside the page.
The original issue came up in ellisonbg's office and he requested that I submit the screen shots. To investigate the possibility of a difference, he requested that I go back to ipython 2 and rerun the code (then submit those screen shots). These are the resulting screen shots:
Side note: Agreed, the grey surround does look much nicer.
Looking back at this, I was under the impression that in IPython 2.x images were resized to fit in the page, based on the screenshots people showed. Going and fiddling with IPython 2.x myself, I can easily get images to spill out of the page area. Possibly we've just made the page area a bit narrower for IPython 3?
So if we revert #7721, the behaviour of wide images in outputs is consistent across browsers, but it's a regression for Chrome users who like image output resized to fit in the notebook.
I think resizing is probably the right thing to do for images in markdown cells, though.
I don't know the details for this one, but making complex applications behave as you expect in the browser, especially across different browsers, requires a pile of hacks. If we're doing things on resize events, I seriously doubt that we can get rid of that without breaking something else fairly badly.
Activity
takluyver commentedon Feb 6, 2015
The behaviour hasn't actually changed, but we made the background around the notebook 'page' grey, so it's much more obvious now when things extend beyond the page.
We're not sure what to do about this, because we do think the grey surround looks much nicer when things aren't extending outside the page.
JeremyMMulcahey commentedon Feb 6, 2015
The original issue came up in ellisonbg's office and he requested that I submit the screen shots. To investigate the possibility of a difference, he requested that I go back to ipython 2 and rerun the code (then submit those screen shots). These are the resulting screen shots:
Side note: Agreed, the grey surround does look much nicer.
JeremyMMulcahey commentedon Feb 6, 2015
It appears the image dimensions, and the plot dimensions, are contained within the notebook. Hope this helps!
takluyver commentedon Feb 7, 2015
I've marked this as 3.0 to ensure one of us takes a look at it.
jdfreder commentedon Feb 9, 2015
It's not that simple. We can't set the width to 100% because that's used by the resize handle.
takluyver commentedon Feb 9, 2015
@jdfreder's PR #7718 would put oversize outputs in a scrolling box instead of letting them spill out of the page. Is that preferable?
Could we set max-width?
jdfreder commentedon Feb 9, 2015
That worked.
Yet another alternative solution, which I attempted but didn't have any luck achieving, is to make the page resize to the output contents.
takluyver commentedon Feb 19, 2015
Looking back at this, I was under the impression that in IPython 2.x images were resized to fit in the page, based on the screenshots people showed. Going and fiddling with IPython 2.x myself, I can easily get images to spill out of the page area. Possibly we've just made the page area a bit narrower for IPython 3?
takluyver commentedon Feb 19, 2015
It's a Firefox/Webkit difference - If I open the same notebook in Chromium, the images are resized to fit the notebook page.
takluyver commentedon Feb 20, 2015
Gah, browsers and CSS flexbox. It's all inconsistent.
Firefox with or without the #7721 fix (it appears to make no difference):
Chromium with #7721 applied:
Chromium with #7721 reverted:
So if we revert #7721, the behaviour of wide images in outputs is consistent across browsers, but it's a regression for Chrome users who like image output resized to fit in the notebook.
I think resizing is probably the right thing to do for images in markdown cells, though.
takluyver commentedon Feb 20, 2015
I don't know the details for this one, but making complex applications behave as you expect in the browser, especially across different browsers, requires a pile of hacks. If we're doing things on resize events, I seriously doubt that we can get rid of that without breaking something else fairly badly.
@jdfreder @minrk or @Carreau may be able to fill in the details.
Backport PR #7718: Disable output contents from overflowing page width.
Backport PR #8098: Remove image resizer