These are chat archives for ipython/ipython

14th
Oct 2014
Brian E. Granger
@ellisonbg
Oct 14 2014 01:16
@takluyver thanks for following up on that!
Thomas Kluyver
@takluyver
Oct 14 2014 01:17
no problem
Andreas Klostermann
@akloster
Oct 14 2014 11:56
this may be a stupid question, but is it currently possible to have a variable calculated in a python cell (or something else) and use it in a templating-like manner in latex and html cells? hmmm
Matthias Bussonnier
@Carreau
Oct 14 2014 11:56
no
but you can use HTML('a things with interpolation'.format(yourvariable))
or idem with Latex.
Andreas Klostermann
@akloster
Oct 14 2014 11:57
hm now that I think about this, it could be done with something like a %%jinja cell magic
Matthias Bussonnier
@Carreau
Oct 14 2014 11:58
if you like, but %%jinja will not know if you want latex of HTML
Andreas Klostermann
@akloster
Oct 14 2014 11:58
those solutions wouldn't allow to hide the calculation
or rather the interpolation
Matthias Bussonnier
@Carreau
Oct 14 2014 11:59
No, but with custom js ext you could
Andreas Klostermann
@akloster
Oct 14 2014 11:59
not in html export
Matthias Bussonnier
@Carreau
Oct 14 2014 11:59
have a look on github at ipython-contrib
Andreas Klostermann
@akloster
Oct 14 2014 11:59
ok
Andreas Klostermann
@akloster
Oct 14 2014 12:03
thank you
Kester Tong
@KesterTong
Oct 14 2014 16:11
hey, is there a meeting today at 9:30 Pacific Time?
Matthias Bussonnier
@Carreau
Oct 14 2014 16:25
Exeptionally can't make it today.
Kester Tong
@KesterTong
Oct 14 2014 16:30
ok no problem. Let's chat by email then and and sync up at a different meeting.
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 18:52
@jdfreder are you guys waiting for me to remove the !important statements in widgets.less?
from the last comment, I thought you guys wanted to do it later. But I am fine with doing this tonight.
Min RK
@minrk
Oct 14 2014 19:34
@SylvainCorlay up to you - you don't need to do it in that PR if you don't want to.
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:39
either way. I am fine with opening another one.
Besides, what do you think of making the output area a real
flex box ?
In our custom styling, it is the case. By default, widgets like a slider will take the whole width of the notebook.
Min RK
@minrk
Oct 14 2014 19:41
I'm not sure, @jdfreder has the most experience with layout in the output area
Jonathan Frederic
@jdfreder
Oct 14 2014 19:43
Hi @SylvainCorlay , sorry I was on the phone with Brian
I'm fine with that PR as-is
I'm aware that there is less clean-up to be done in the widget stuff
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:44
hi, nothing to be sorry about. We were discussing the idea of making the output area a flexbox (in html, not to give it the Python api of the flexbox widget)
it would be consistent with the "linearly" constrained gui of ipython
Jonathan Frederic
@jdfreder
Oct 14 2014 19:47
I seem to recall trying to remove all of the flexible box model from the notebook 6 months or so ago :) We decided that the flexible box model had to stay though.. What does making the output area a flexible box do for you right now?
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:49
We use nested flexboxes for our layout. In the current setting, the top level lying in the widget output area must have align-self stretch.
when using flex boxes at the top level, sliders, an all may grow to take the whole with if they have "flex-grow" set to 1
Jonathan Frederic
@jdfreder
Oct 14 2014 19:54
Now I'm confused, are we talking about the output area or the widget area? Or are we talking about the output widget which has yet to be merged?
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:55
s/output area/widget area/gc
Jonathan Frederic
@jdfreder
Oct 14 2014 19:55
(just confused because you are talking about sliders, which live in the widget area)
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:56
widget area
actually, the widget subarea to be specific
Jonathan Frederic
@jdfreder
Oct 14 2014 19:56
I think at one point the widget area was a flexible box
but it got removed
Karissa McKelvey
@karissa
Oct 14 2014 19:56
if you use flexbox just be sure to use cross-browser mixins
they all render them a little differently
Jonathan Frederic
@jdfreder
Oct 14 2014 19:57
when I refactored the once ContainerWidget
into a box widget
the* Box widget
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:57
all versions of chromiums higher than 37 work well for me :)
Anyways, the flexible box model was part the widget-container class, which was removed
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 19:59
yes, this is not quite what I am talking about.
OK, let me clarify. We use nested flexboxes (a custom version a bit more customizable). It stretches and grow well, except for the top level because the widget subarea itself is not a flexible box
hence we must treat the top level differently.
Jonathan Frederic
@jdfreder
Oct 14 2014 20:00
It is though, isn't it? The widget-container class is what caused the widget-area to be a flexible box, and my removing it stopped that behavior
I'll take a look at the code
IIRC, I think there are cases where "breaking free" from the flexible box model wasn't easy
So it made sense to not use it, unless explicitly requested
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:02
yeah, but it is not very convenient to need to have align-self stretch at the top level
Jonathan Frederic
@jdfreder
Oct 14 2014 20:02
(but that may have be a consequence of over zealously applying widget-container to every class that was to hold widget children)
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:02
widget-box
Jonathan Frederic
@jdfreder
Oct 14 2014 20:03
That's the new one
the old one was widget-container
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:03
besides, it makes sense in the "linear" UX to have widgets take the whole width
like a slider by default expanding from left to right
Jonathan Frederic
@jdfreder
Oct 14 2014 20:03
I think it makes sense in all contexts except interact
So maybe interact needs to display the content in a box with a fixed width...
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:04
yeah, I don't know about interact, I don't use it
Jonathan Frederic
@jdfreder
Oct 14 2014 20:04
:D
I remember you telling me that, lol
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:23
ok, I cannot upload images to gitter anymore, I wanted to show you what I mean
Jonathan Frederic
@jdfreder
Oct 14 2014 20:24
It's okay, I think I understand.
Although
it looks like in master, the widget area is already a flexible box
So maybe I don't understand. Where are you proposing adding flexible box model attributes?
So all the widgets with labels also stretch?
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:28
sorry, I am looking at a very overloaded less file :)
indeed in the base one it is a vbox.
Jonathan Frederic
@jdfreder
Oct 14 2014 20:28
yes
So how does that not suffice?
Or better put, which css flexible box model trait is missing?
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:33
ok, the top level should be align-items: "stretch"
and in widget-hslider-classed div could have flex-grow: 1

plus a min-width for the widget-readout

by "should" I mean - if we do it. I am not sure it is the way to go. Just asking you guy's opinion.

Remi Rampin
@remram44
Oct 14 2014 20:35
It seems that http://mail.scipy.org/ has been down for a little while now
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:39
oh, the editable widget readout has been merged, nice :)
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:54
@jdfreder
Jonathan Frederic
@jdfreder
Oct 14 2014 20:57
yes :)
it was merged
Remi Rampin
@remram44
Oct 14 2014 20:58
Anybody knows when the mailing-list archives/management will be back?
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 20:59
so what do you think of align-items: stretch in widget subarea
Thomas Kluyver
@takluyver
Oct 14 2014 20:59
@remram44 oh, I didn't realise it was down again
that server is flaky
Jonathan Frederic
@jdfreder
Oct 14 2014 21:00
@SylvainCorlay that's already set, is it not? See our vbox class:
.vbox {
    /* Old browsers */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-align: stretch;

    display: -moz-box;
    -moz-box-orient: vertical;
    -moz-box-align: stretch;

    display: box;
    box-orient: vertical;
    box-align: stretch;

    /* Modern browsers */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
Looks like there's a bug in IPython
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:02
it is overriden to flex-start
trying to find where
Jonathan Frederic
@jdfreder
Oct 14 2014 21:02
yeah
me too
actually I was just tryiong to post a screenshot
it's somewhere in the less
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:03
for some reason, the mapping to less does not work anymore in my chromium, very annoying
Jonathan Frederic
@jdfreder
Oct 14 2014 21:04
    .widget-subarea {
        padding     : 0.44em 0.4em 0.4em 1px;
        margin-left : 6px;

        .border-box-sizing();
        .vbox();
        .box-flex2();
        .align-start();
    }
I think it's the last line
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:04
ok, then I would be +1 to remove align-start
:)
Jonathan Frederic
@jdfreder
Oct 14 2014 21:05
haha
we also need to set a fixed width for interact
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:05
sorry for the initial confusion, I have a very overloaded style here.
Jonathan Frederic
@jdfreder
Oct 14 2014 21:06
np
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:07
I don't think it would require changing interact
it will not impact the slider, which has another issue that would prevent this to have an effect.
Jonathan Frederic
@jdfreder
Oct 14 2014 21:07
no? do the fixed widths prohibit the sliders from stretching
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:12
my slider does not have a fixed width, just checking if it is not coming from our overloadeding. The reason for me is that widget-hslider has flex-grow to 0
it should be 1
(if you want it to grow)
Jonathan Frederic
@jdfreder
Oct 14 2014 21:22
ah got it
Sylvain Corlay
@SylvainCorlay
Oct 14 2014 21:22
if you set widget-hslider's flex-grow to 0, you need the widget readout to have a min-width
otherwise, its width will change/flicker depending on the length of the readout
the min-width would logically be in em units
Jonathan Frederic
@jdfreder
Oct 14 2014 21:24
yes
Kyle Kelley
@rgbkrk
Oct 14 2014 22:50
I can't tell if it's my connection to my remote server, but I can't seem to change the kernel using master
it's really happy in Python mode right now, can't switch to R
Only on new notebooks though
It sets the kernel to Python
If I open an old notebook (say in Julia), then I can switch to R
I'll wait until I land to post an issue just in case
Min RK
@minrk
Oct 14 2014 22:51
anything in js console?
Kyle Kelley
@rgbkrk
Oct 14 2014 22:53
Screen Shot 2014-10-14 at 3.52.05 PM.png
Screen Shot 2014-10-14 at 3.52.23 PM.png
apparently I clicked too fast
I can replicate it with a slow connection
Basically, when the notebook is loading the kernel switcher starts out saying "Python"
Then switches to "IPython (Python 3)"
If I try to toggle it before then, I can't change kernels again
Nicholas Bollweg
@bollwyvl
Oct 14 2014 23:59
does anyone have any idea why master on chrome 39/osx would draw like this: