Commit Graph

1014 Commits

Author SHA1 Message Date
Jonathan Frederic
1f002cd456 Add displayed property.
and remove logs, commments, etc...
2014-03-21 12:05:02 -07:00
Jonathan Frederic
f2c8de99ae Fix broken accordion widget,
Also clean-up the code some while visiting this file.
2014-03-20 16:52:56 -07:00
Fernando Perez
5f086fded2 Merge pull request #5372 from minrk/no-close-strings
Don't autoclose strings, because CodeMirror's behavior makes it confusing and awkward to type triple-quoted strings (and these are very common in Python).

An issue about this was filed in CodeMirror itself: https://github.com/marijnh/CodeMirror/issues/2385
2014-03-18 11:14:24 -07:00
MinRK
3c1fe84f52 Don't autoclose strings
CodeMirror doesn't do the right thing with triple-quoted strings,
so don't let it try.
2014-03-18 11:11:28 -07:00
Min RK
e64c2cb5d8 Merge pull request #5296 from ivanov/more-shortcuts
unify keyboard shortcut and codemirror interaction
2014-03-18 09:46:07 -07:00
Paul Ivanov
0c366861c5 brief key event desription 2014-03-17 21:09:51 -07:00
Paul Ivanov
6d6e0fb007 fix up and down arrows in the top and bottom cells 2014-03-17 20:11:33 -07:00
Paul Ivanov
09866e0ee1 go to the beginning of the line when entering cell 2014-03-17 17:41:44 -07:00
Paul Ivanov
96848748de restore master behavior
up arrow at the top line first goes to char 0, and only goes to the cell
above if already on char 0. Same with down arrow on the bottom line:
transition cursor to the end of the line, and only go down a cell if
already at the end of the last line.

this makes for an unhappy experience in code-mirror's vim mode  for j
and k keys, but we'll fix that in the next commit
2014-03-17 16:21:23 -07:00
Paul Ivanov
8f17444c27 go to appropriate line when coming from another cell
Sets the cursor on the last line of the cell when moved up from the top
of the cell below, and sets the cursors to the first line when moving
down from the bottom of a last line.

Here, we retain the character that the cursor was on, so that users
wishing to have up-down functionality like one document can still use
this shortcut handler and simple adjust the at_top and at_bottom methods
2014-03-17 15:48:36 -07:00
Paul Ivanov
61b47695e4 renamed 'use_shortcut' method to 'handles' 2014-03-13 16:44:19 -07:00
Paul Ivanov
d8287466d0 another doc fix 2014-03-13 16:40:37 -07:00
Paul Ivanov
f68dcc3e57 it's only half true that I'm anal about semicolons 2014-03-13 16:30:58 -07:00
Paul Ivanov
67fd905421 minor fixes to docs to address PR feedback 2014-03-13 16:29:28 -07:00
Paul Ivanov
469c70fd10 more semicolons 2014-03-13 16:23:27 -07:00
Paul Ivanov
1dc113a9cb closes #5336 2014-03-13 14:30:32 -07:00
Brian E. Granger
3eb654bd86 Merge pull request #5295 from minrk/no-append-prototype
OutputArea.append_type functions are not prototype methods
2014-03-10 14:13:14 -07:00
MinRK
a24595d16b call append_text from append_map 2014-03-10 11:44:00 -07:00
MinRK
abe2dce926 back to dev 2014-03-09 21:58:09 -07:00
MinRK
4d1f9b21c4 append functions are not prototype methods 2014-03-07 17:57:37 -08:00
Paul Ivanov
54409a196d dem semicolons 2014-03-07 17:48:34 -08:00
Paul Ivanov
19c7189b15 no need to special-case Escape anymore 2014-03-07 17:48:34 -08:00
Paul Ivanov
6a2c4121f9 up and down keys no longer need special casing 2014-03-07 17:48:34 -08:00
Paul Ivanov
2c9ff376a2 added new use_shortcut method to shortcuts
this way, you can ask if a particular event will be handled by the
shortcuts system. This takes away the need to special-case many
different possible keys which should be ignored by codemirror by
ignoring them en masse.
2014-03-07 17:48:34 -08:00
Paul Ivanov
b9e448b160 DRY: refactor common keyboard handling to Cell
Our edit mode keyboard shortcuts don't distinguish between being in a
code cell or in a text cell, so it makes sense to handle both in one
place. This is a first step in that direction.
2014-03-07 17:48:34 -08:00
Paul Ivanov
15f4345ba3 typo, use keycodes object instead of magic numbers 2014-03-07 17:48:34 -08:00
Paul Ivanov
bf3ecdb35f DRY: factor out common handle_keyevent method
This method was identical in both CodeCell and TextCell
2014-03-07 17:48:34 -08:00
Paul Ivanov
71d4c427c9 refactor to improve cell switching in edit mode
This code was repeated in both CodeCell and TextCell, both of which are
extensions of Cell, so this just unifies the logic in Cell.

TextCell had logic here to check if the cell was rendered or not, but I
don't believe it is possible to end up triggering such a code path.
(Should that be required, I can always just add back these methods to
TextCell, performing the .rendered==True check, and calling the Cell

prior to this, code mirror at_top would only return true on if the
cursor was at the first character of the top line. Now, pressing up
arrow on any character on the top line will take you to the cell above.

The same applies for the bottom line. Pressing down arrow would only go
to the next cell if the cursor was at a location *after* the last
character (something that is only possible to achieve in vim mode if the
last line is empty, for example). Now, down arrow on any character of
the last line will go to the next cell.
2014-03-07 17:48:34 -08:00
Paul Ivanov
8889a7581c start better keyboard handling 2014-03-07 17:48:34 -08:00
MinRK
3face719e8 setup jsversion 2014-03-07 15:54:55 -08:00
Brian E. Granger
30c500bfa9 Merge pull request #5292 from jdfreder/shift-enter-scroll
focus next cell on shift+enter
2014-03-07 14:55:48 -08:00
Jonathan Frederic
da334e782e focus next cell on shift+enter 2014-03-07 14:48:09 -08:00
Min RK
0a37d7bfc5 Merge pull request #5232 from jdfreder/nbc_incono
Make nbconvert html full output like notebook's html.
2014-03-07 14:14:43 -08:00
Brian E. Granger
05e6fbade4 Merge pull request #5288 from minrk/start-idle
Correct initial state of kernel status indicator
2014-03-07 14:07:42 -08:00
Thomas Kluyver
80af3b4cfb Merge pull request #4802 from ivanov/ui-docs
Tour of the notebook UI (was UI elements inline with highlighting)
2014-03-07 12:09:32 -08:00
MinRK
e901c9be33 Correct initial state of kernel status indicator
- start as busy, since we don't know
- send a kernel_info request once connections are established
- set idle on reply to the to the kernel_info request
2014-03-07 11:51:54 -08:00
Brian E. Granger
f62ce75a62 Lots of CSS tweaks to get nbconvert output looking right. 2014-03-06 16:36:39 -08:00
Jonathan Frederic
9c5bca99e2 addClass instead of adding extra_class arg everywhere 2014-03-06 14:22:36 -08:00
Jonathan Frederic
6169acfc6d Fixed rebase issues 2014-03-06 14:10:37 -08:00
Jonathan Frederic
8b3c356c8d Add extra_class arg to the rest of the append methods,
use new extra_arg to add output_pyout class
2014-03-06 13:29:09 -08:00
Jonathan Frederic
b92ede2800 Added output_pyerr to python error output 2014-03-06 13:26:44 -08:00
Brian E. Granger
1407b4347e Merge pull request #5268 from ellisonbg/cmd-mode
Refactoring Notebook.command_mode
2014-03-06 12:09:43 -08:00
Paul Ivanov
610e66615e added a note to what's new 2014-03-05 22:18:16 -08:00
Paul Ivanov
7974e32150 oops, <tt> went the way of the dodo, using <code> 2014-03-05 21:27:14 -08:00
Paul Ivanov
06e5858ee2 lower case names for keys 2014-03-05 21:08:24 -08:00
MinRK
7d87978a66 fix a typo introduced by a rebased PR
caused heading cells to appear in both rendered and unrendered state
2014-03-05 14:30:34 -08:00
Jonathan Frederic
de9b5b907e Fab CSS 2014-03-05 12:25:26 -08:00
juhasch
72864cc83c append Firefox overflow-x fix 2014-03-05 12:25:11 -08:00
Paul Ivanov
fdca0762a4 tidy up capitalization 2014-03-04 19:05:56 -08:00
Paul Ivanov
e10afab397 rewording according to feedback in #4802 2014-03-04 18:14:51 -08:00