[IPython-dev] Questions on implementing some notebook frontend extensions
andrew.gibiansky at gmail.com
Sat Mar 7 02:50:26 EST 2015
I have a few frontend modifications I'd like to make for the IHaskell
kernel, and I'd love to get some pointers on where to start and how
feasible these are. I have some ideas, but since you are much more familiar
with the client-side JS than I am, I'd like to hear if you think these are
possible and/or reasonable, and perhaps how you would approach them (no
detailed response required, maybe just something like "Use the CodeMirror
api" or "we have some undocumented capabilities for this in IPython" or
"wait until CodeMirror 5" or "impossible").
The extensions are:
1. Get some info about an identifier from the kernel when I hover my mouse
over that identifier, and display it as a popup.
Idea: Use CodeMirror API and IPython comms to communicate with kernel.
2. Add a keyboard shortcut to automatically reformat a cell, and have this
actually change the contents of whichever cell is currently selected,
provided it is a Haskell cell.
Idea: Use the IPython API to add a keyboard shortcut, use comms to
communicate with backend to do reformatting, use IPython API to get
currently selected cell and send contents to kernel via comm, and use
IPython APIs to change the contents of a cell.
If you have any suggestions for better routes, words of caution, I'd love
to hear them.
(As an aside, one reason I am asking like this rather than just going ahead
and trying it and seeing how far I get is that some of these may be tackled
by some other contributors to IHaskell; I would like to make sure I am not
sending them off on a wild goose chase with a method that is
overcomplicated or unlikely to work before giving them instructions.)
PS. IHaskell `master` now supports IPython 3.0. There's still a bit of work
to be done before I'm ready to make a Jupyter-ready *release*, but it is no
more than a week or two out. So far, I've really enjoyed working with
IPython 3; the interface is great, the kernel interface is well thought out
(if perhaps missing a few things I want, but there's always room for
extension, I hope :) ), and all in all it's been very good.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev