* edit text cells on double-click instead of single-click
* render text cells on unselect instead of focusout.
Only renders when selecting another cell, and prevents rendering when
switching applications/windows/tabs.
Single-click to edit gets in the way of using interactive elements (e.g. non-flash videos),
and select/copy of the rendered HTML. Switching to double-click makes the edit action more intentional.
adds AuthenticatedFileHandler, which extends StaticFileHandler with
a simple authentication check before providing access to files local
to the notebook dir.
Heartbeats start immediately, causing false heart failures on slow systems that can take a while to start kernel subprocesses.
Also adds a 'flush' to the heartbeat callback (just like in IPython.parallel), to protect against server load being detected as heart failures.
Kernels would not linger, but the KernelManagers are not garbage-collected on shutdown.
This means that connection files for kernels still running at notebook shutdown would not be removed.
Also disable the unnecessary (and actively unhelpful) SIGINT handler inherited from the original
copy/paste from the qt app.
Change Notebook logo to IP[y]:Notebook
Make it clickable to return to the dashboard
Thanks to @MinRK for the css.
closes#607
png logo is 48px high (2x display), for balance of
browser display / zoomed appearance.
settings for tornado web application can now be specified via the
NotebookApp.webapp_settings configurable. This principally allows
users/admins to serve custom templates, css, and javascript, without
having to modify IPython's shipped sources.
closes#1135
Following @fperez advice, change the completer apparence to avoid user confusion.
- Append what the user type in the completer in code-miror, (Almost) as if
codemirror still have focus
- distinguish between "fixed" completion part, which was sent to the kernel
(now written in bold) and filtering one,handled only in JS,that the user
can errase without dismissing the completer
I changed the action of <Space> to dismiss the completer with what have
already been typed and inserting a space instead of "picking" the currently
hilighted option
<Escape> will still dissmiss the completer and remove everything the user as
typed since the completer invocation
Note that while the completer is shown, code-mirror does not show any
blinking cursor
- dissmiss the completer, append what alredy type, **Plus** one caracter in
some cases
List of special caracter that are handle are in a given list `()[]./\-+`
for the moment. usefull for exaple when typing :
>>> np.s<tab>in(
and not having to type '(' twice.
they are handle separately has the [a-zA-Z] ones because otherwise they
will screw up the regexp, and are opt-in to avoid bugs with invisible
caracters send because some browser have 'keypress' event for meta keys
close#1080
Note to this commit :
list of test for the completer across browser with --pylab=inline flag
#test direct one completion
plt.an<tab> -> plt.annotate
#test filter,tab, only one completion
plt.a<tab>n<tab> -> plt.annotate
# test partial common beggining
# test dismmised if user erase
plt.a<tab>nn<backspace><backspace>u<tab> -> completer to `aut`
........................................<tab><tab><tab> -> nothing should append
.......................................................<backspace><backspace<backspace> -> completer cancelled
#test dismiss if no more completion
plt.s<tab>c -> completer 3 choices
...........u -> dismissed whith what user have typed. `plt.scu`
# test dismiss in no completion, special symbol
# opt-in list of caracters +-/\()[].
np<tab>.s -> a 'dot' sould dismiss the completer and be appended
.........<tab>in( -> np.sin(
np.s<tab>in[ -> np.sin[
allow the notebook to run without MathJax
adds --no-mathjax flag for disabling mathjax, and moves the mathjax URL decision to the server from the browser.
closes#1071
prototype functions were actually called which should not happen, and
resulted in objects and their attributes being passed to their own methods
as arguments.
* use jQuery syntax to construct dialog
* server determines where MathJax comes from via mathjax_url configurable (default local/CDN priority unchanged)
* add `--no-mathjax` flag for disabling mathjax in the notebook server
* A jQuery dialog with our 'no mathjax' message will appear if mathjax is unavailable, but the notebook will be fully functional after dismissal.
* Various calls to MathJax.Hub.typeset moved to Cell.typeset, which checks for MathJax existence and is a no-op without it.
closes#1071
when invoking the completer, instead of having to chose/dismiss, you can
continue typing, it will filter the result "as you type" and dismiss itself
if ther is no match left.
As it is now, it's only works with lowercase letters, I need to find a workaroud
for this.
for example
if you type :
* P-y-<tab>-S-o-m-e-t-h-i-n-g
* it will propose PySide, but will dismiss when 'o' is pressed and pasting Pyso with a lower case 's'
if completer get only one match back and the user press tab n time,
it fallbacks on showing a tooltip
n=2 , hard coded for know, and completer verbose on the command line
put "close" and "more..." button in upper right corner,
rename "more..." to "open in pager", add expand button.
tooltip don't have scroll bar an are 'small' until pressing "Expand"
they then change their height and add scrollbars.
Horizontal scrollbar behaviour seem to depend on the browser
>>> plot(<tab> and then click on "expand" :
Firefox : no horizontal scrollbar (wrap line ?)
Chrome : horizontal scrollbar
beware that don't limitting tooltip height or width through css will sometime give
tooltip that are too heigh and will overflow below the bottom of the screen
animation are broken with max-height and/or min-height
change order of completion element so that the ones ending with '='
will be at the beginning of the list. When you complete inside a
fonction call, you then have kwargs first add configuration in the left
pannel
add a section in the left pannel of the notebook to make the time before
triggering a tooltip when pressign "(" configurable. Negative values will
disable the tooltip (comparaison at each keypress for now, but can be
improved) The syle of the <input> field should be a little improve, why not
a slider with jquerry
As until now, when pressing tab and a white space was preceding the cursor
The completion was triggerd with the whole namespace in it. Now if a
whitespace or an opening bracket is just befor the cursor it will try to
display a tooltip. The logic to find what object_info_request is send have
been sightly changed to try to match the expression just before the last
unmached openig bracket before the cursor (without considering what is
after the cursor).
example (_|_ represent the cursor):
>>> his_|_<tab> # completion
>>> hist(_|_<tab> # tooltip on hist
>>> hist(rand(20),bins=range(_|_ <tab> #tooltip on range
>>> hist(rand(20),bins=range(10), _|_ <tab> # tooltip on hist (whitespace before cursor)
>>> hist(rand(20),bins=range(10),_|_ <tab> # completion
as we dont care of what is after the cursor:
>>> hist(rand(5000), bins=50, _|_orientaion='horizontal') # and tab, equivalent to
>>> hist(rand(5000), bins=50, _|_<tab> # onte the space again
>>> hist(_|_rand(5000), bins=50, orientaion='horizontal') # and tab, equivalent to
>>> hist(_|_
the 4 give tooltip on hist
note that you can get tooltip on things that aren't function by appending a
'(' like
>>> matplotlib(<tab>
Which is kinda weird... so we might want to bound another shortcut for
tooltip, but which matches without bracket...
additionnaly I have added a "Config" pannel in the left pannel with a checkbox
bind to wether or not activate this functionnality
Note, (rebase and edited commit, might not work perfetly xwithout the following ones)
When user press '(' and nothing for 1200ms, 'object_info_request' sent to
the kernel. Then tooltip with 'definition' and beggining of 'docstring'
shown to the user if non empty response.
Unlike Completion <select> , <div> is not focusable so event handled in main
cell event handeling function
Add some CSS3 that most browser with websocket should support.
ZMQStream is the right object to use for event-driven handling of messages, but instead we chose to rewrite half of it in KernelManager.
This removes most of the duplicate code, in favor of using ZMQStream.
also use the pyzmq install() function for using pyzmq with tornado, instead of manually pasting its contents in notebook app.
An error would previously be raised whenever iopub traffic arrived that
did not originate with the notebook (e.g. pylab welcome, or qtconsole output).
This error was not in a block that would actually cause problems, so actual
functionality was not affected.
Most int traits are now Integers
Integer differs from Long only in that small `long`s are cast to `int`, rather than
all `int`s being cast to `long`:
Integer(4L) => 4
Long(4) => 4L
closes gh-942, closes gh-996.
Rebased to avoid recursive merge for just one commit.