ipython/ipython — Issue #1234: Refactor how the notebook focuses cells
Author: ellisonbg
Created: 2012-01-05 18:29:33+00:00
State: open
Labels: htmlnotebook, prio-medium, status-active, type-enhancement

There are two abstractions related to showing cells. There is the usual JS idea of bringing the elements into focus. Then there is also the CodeMirror API for refreshing an element. The recommendation is that refresh should be called on a CodeMirror widget anytime it is brought into focus. We are currently not doing this.

We need to create a method on the cell objects (possibly named refresh) that call the underlying refresh method. There should also be a refresh method on the notebook as s whole that calls the cells method.

Then anytime we unhide/focus a cell, we should call refresh.

We also need to refactor how page loading is done. The pager area should start out as hidden and the cell creation should be done without calls to focus/refresh and before the notebook is shown. After the notebook is made visible, we should make a single pass to refresh everything.