Band-aid for completion in the notebook: not the ideal solution, but will have to do the job for now so that typing while completing works.
closes#4860
- add NotebookApp.notebook_dir
- add KernelManager.root_dir
- remove NotebookManager.notebook_dir, move to FileNBM.notebook_dir
Default value for KM.root_dir and fNBM.notebook_dir is NotebookApp.notebook_dir, but they can be configured separately.
SessionManager passes the API path to KernelManager,
which is responsible for turning it into the kernel's cwd.
- don't try to include version in static_urls that don't point to files
- use full static_urls (with extension) for backbone and underscore, so version can be computed
closes#5141
If available, use the default value from the signature for the initial condition,
when using range/choice abbreviations.
Not affected:
- single-value abbreviations (`@interact(a=5)` sets `a=5`)
- explicit Widgets
only call enable on remove when focused.
fixes a bug where command mode could be entered inappropriately
when non-focused elements are removed from the page
(see first `@interact` example).
Unlike @Carreau's attempt at using proper CodeMirror completion,
this is just a band-aid to get the existing completion back to working for 2.0.
This adds a keypress handler on the completer,
which then calls insert with the charCode of the key press event,
replacing the final `elif` branch of the keydown handler.
This cannot be done with keydown,
since keydown doesn't know what character is incoming,
only the hardware key that is struck.
log refer only on 4XX, and never log user agent
This function was ported from nbviewer, and some of the choices were not quite right for the notebook server.
Methods are organized into three categories:
- Methods that must be implemented in subclasses
- Methods that have default implementations, but can
be overridden if required.
- Support methods meant to be called by methods in subclasses
The implementation requires only a minor change (call notebook_exists
rather than checking for file existence) to be universally usable
in other notebook managers.