notebook display results - side by side instead of on top of each other

976 views
Skip to first unread message

oscar6echo

unread,
Sep 26, 2017, 6:59:36 PM9/26/17
to Project Jupyter
If, like me, you want to display contents side by side to get a more compact output, check out this package:
As the name suggests the layout is transparently CSS Flexbox.

Questions:
- I have seen that when a notebook/cell is untrusted the manual css is ignored. I through only javascript was deemed potentially dangerous. Does anybody know for sure ?

- Will this work in jupyterlab too ?

- Is there a specific reason why such a convenient and simple feature is not in the notebook yet ? Any plan for jupyterlab ?

I'd be grateful for any insight !

Olivier

Thomas Kluyver

unread,
Sep 27, 2017, 8:21:35 AM9/27/17
to Project Jupyter
On 26 September 2017 at 23:59, oscar6echo <olivier....@gmail.com> wrote:
If, like me, you want to display contents side by side to get a more compact output, check out this package:
As the name suggests the layout is transparently CSS Flexbox.

Questions:
- I have seen that when a notebook/cell is untrusted the manual css is ignored. I through only javascript was deemed potentially dangerous. Does anybody know for sure ?

Yes, it is (or should be) ignored. I believe that clever CSS could hide a malicious code cell or disguise it as an innocent one, in order to trick a user into running something they wouldn't want to. So we can't apply untrusted CSS, unfortunately.
 

- Will this work in jupyterlab too ?

Not sure, but I'd guess so.
 

- Is there a specific reason why such a convenient and simple feature is not in the notebook yet ? Any plan for jupyterlab ?

Mostly I think it's just that it hasn't been done yet! But it might also be that it doesn't generalise well to formats other than HTML. Our display machinery mostly tries to emphasise things that are somewhat format-agnostic.

Thomas

oscar6echo

unread,
Sep 28, 2017, 5:15:30 PM9/28/17
to Project Jupyter
Thank you for the precise reply.

Then I just hope that a core developper will find it worthwhile to add a format agnostic yet simple way of doing something similar.
That would be VERY convenient !
Reply all
Reply to author
Forward
0 new messages