Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor how the notebook focuses cells #1234

Closed
ellisonbg opened this issue Jan 5, 2012 · 0 comments
Closed

Refactor how the notebook focuses cells #1234

ellisonbg opened this issue Jan 5, 2012 · 0 comments
Labels
Milestone

Comments

@ellisonbg
Copy link
Member

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 should also not call focus unless the element is on the page and shown. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant