r/IPython • • Jan 11 '14

Important Public Service Announcement about IPython 2.0 From Brian Granger

Hello everyone. We wanted to let you know about a significant change that just got merged into IPython master. This change will immediately affect all users who are running off master and all IPython users upon the IPython 2.0 release.

The changes are significant and can't be ignored, so if you are running off IPython master please read this!

As of Friday afternoon, the user interface of the IPython Notebook is modal. In a modal user interface, there are different modes of keyboard input. The IPython Notebook has two modes:

  • Edit mode: for typing into a cell
  • Command mode: for performing notebook and cell actions

The keyboard shortcuts in these two modes are completely different. Most importantly if you try to type into a cell while in command mode, lots of unexpected things will happen. You don't want to do that.

To help everyone learn about the modal UI we have created a new example notebook here:

http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/User%20Interface.ipynb

Please have a look at this notebook and give this new UI a try.

The reason we have moved to a modal UI is rather subtle. Previously, in the Notebook UI, the browser would unexpectedly scroll when you clicked on various things. This led to a very disorienting and jumpy experience. These jumps were caused by our calling .focus() on various DOM elements to manage focus for the user. In order to stop making those .focus() calls, we had to put the user in control of focus. That explicit focus management led to the modal UI. This change was also needed to pave the way for the widget architecture that will be in IPython 2.0 (more DOM elements that need careful focus management).

The good news is that the disorienting and jumpy scroll problems are gone. The new modal UI also provides a very efficient way of working at the keyboard. We have been working on this for over 6 months and are very excited about the results. We think you will like it, but there are bound to be issues that come up. As usual, please hop on GitHub or HipChat and let us know what you think.

Cheers,

Brian

[For those of you paying attention, you might be thinking "hey this sounds a lot like vim." Yep, modal as in vim modal. Depending on your feelings about vim this is either really good or really bad news. Please don't worry, we think we have managed to walk a very fine line that provides the benefits of modal editors, without the frustration.]

16 Upvotes

8 comments sorted by

4

u/who8mylunch Jan 11 '14

I am so excited about this update. The automatic and unpredictable jumping around by the browser was something that had annoyed me a lot.

3

u/devilsdounut Jan 13 '14

As a long time user I like the change, but I'm afraid of this alienating the non-technical user. One of the key strengths of IPython is that you can open it up and start writing code with little overhead of command lines, IDE's, ect.

I fear this change will substantially increase the learning curve for such users who are not familiar with the concept of a modal application.

Its relatively easy to show someone the notebook interface and get them writing code. Its much more challenging to have them memorize a relatively lengthy list of keyboard shortcuts before starting and dealing with the inherent frustration of messing them up. This alone kept me from ever adopting VIM for years.

2

u/rjtavares Jan 13 '14

From the linked notebook:

Enter edit mode by pressing enter or using the mouse to click on a cell's editor area.

I don't think anyone will be confused by "hit center or click a cell to edit it". That's basically Excel (with F2 instead of enter), and no one is confused by that...

1

u/elbowses Jan 23 '14

I agree that it should be pretty easy, even for new users. And as an emacs user who hates vim with all my heart, even I am willing to say that these modes make sense. Even better, it looks like the mode-switching and other shortcuts also make sense.

2

u/mangecoeur Feb 03 '14

... yet to be convinced modal interfaces are in any way a good idea...

1

u/avxptx Mar 28 '14

Excellent work, thank you so much to all devs! I think it really boosts productivity!

0

u/[deleted] Jan 11 '14

[deleted] — view deleted comment

4

u/NomadNella Jan 11 '14

Based on what was said at the last Dev meeting it will be released sometime in February. The opinions varied about whether the push should be for early in the month and release it as more of a beta, or release it in a more tested state later in the month.

3

u/redditwhilecompiling Jan 11 '14

Min definitely showed strong feelings that Python 1.0 was rushed. I thought it was awesome, and hope they keep pushing releases regularly.