closes#7409
Mostly a symptome of too many nested div that do different things.
don't try to both have an end space inside and outside the 'document'
area. And don't try to also get the things to be 100viewport height by
hacking around and make them smaller;
- Adds a `GenericCheckpointMixin` as a helper for implementing the two
boundary-traversing Checkpoint API methods, `create_checkpoint` and
`restore_checkpoint`.
- `GenericFileCheckpointManager` is implemented as a subclass of
`FileCheckpointManager` using `GenericCheckpointMixin`. Note that
this is the safe subtyping relationship because of method
signature *contra*variance: `FileCheckpointManager` accepts
`FileContentsManager` in its method signatures type, whereas
`GenericFileCheckpointManager` accepts any `ContentsManager`.
- Moved Checkpoint-related classes to their own files.
On `create_checkpoint` and `restore_checkpoint`, pass a path and a
`ContentsManager` to `CheckpointManager` instead of an already-loaded
model.
The `CheckpointManager` base class provides a correct implementation of
these methods that's generic across any ContentsManager, but subclasses
are free to specialize when the storage backend of `ContentsManager` is
shared.
multiplex on a 'channel' key in message,
rather than separate websockets.
Unlike zmq, there aren't different message patterns that require the channels to be separate.
Reduces FD count by factor of 3 and connection complexity in js.
rather than in a dict, which doesn't work without reserializing *all* stored widget states (of all notebooks), since localStorage only supports storing strings.
When a users uses the rename dialog in the text editor, we call
_set_mode_for_model on the returned model. The expected model to be
returned from rename has no value for mimetype, which causes us to pass
`undefined` to `CodeMirror.findModeByMIME`, which returns `undefined`
back. We then try access an attribute of the (undefined) return value,
causing an error.
This now properly checks whether the `mimetype` attribute is set on the
input model.
Changed the public checkpoint API to:
- `create_checkpoint(self, nb, path)`
- `get_checkpoint_content(self, checkpoint_id, path)`
- `rename_checkpoint(self, checkpoint_id, old_path, new_path)`
- `delete_checkpoint(self, checkpoint_id, path)`
- `list_checkpoints(self, path)`
All paths in the above are API-style paths, and the `nb` argument to
`create_checkpoint` is a dictionary suitable for passing to
`nbformat.write`.
The new `get_checkpoint_content` method returns an unvalidated notebook
content dictionary. It is used by `ContentManager.restore_checkpoint`
to load content to be written via `save`.
Ensures kernel.js is always loaded.
It wasn't being loaded when creating a new notebook with a particular kernel because `change_kernel` wasn't being called. Only the `spec_changed` event is triggered by all the various ways a kernel can be loaded,
so load kernel stuff on that event.
- Add a `CheckpointManager` base class and infrastructure for creating a
`checkpoint_manager` instance attribute on `ContentsManager`.
- Provide default implementations of `delete` and `rename` in the base
`ContentsManager` class. `ContentsManager` subclasses are now
required to implement `delete_file` and `rename_file`. These methods
no longer need to manage checkpoints.
- Move checkpoint-related functionality from `FileContentsManager` to a
dedicated `FileCheckpointManager` subclass.
- Move shared filesystem interaction logic into `FileManagerMixin`
used by both `FileContentsManager` and `FileCheckpointManager`.
- Minor tweaks to ContentsManager tests to get methods from the right
object.
The purpose of this change is to provide an API for users to replace
just the checkpoint logic associated with a particular
`ContentsManager`. In particular, this change makes it possible to
easily support remote storage of checkpoints while otherwise retaining
normal filesystem interactions.
closes#7303.
Also change the arrow that indicate submenu for a fontawesoem icon,
instead of the ugly hack that show only the left border of a rectangle element
which with is twice the one of its border to get a triangle.
set a value to border-radius large, and actually make border radius
small smaller than border radius large.
Make dialog border radius coherent with the rest of the UI.
cause I want to inject some variable in it after (like border radius)
and a few other thigs.
This is just a reformating that does not change the generated css.