-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
return this.manager.save(model.path, model); | ||
let model = AbstractFileHandler.modelProperty.get(widget); | ||
return this.getState(widget).then(contents => { | ||
return this.manager.save(model.path, contents); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like how this doesn't let the widget change the filepath by returning a different state. Good security catch.
Comments are inline, though. Maybe the widget should verify that the format and type is something that it can handle? Before it just registered to handle an extension. Perhaps now it should register for a type/format instead? |
cd889cc
to
fa63b9d
Compare
Updated, version bumped. |
* | ||
* #### Notes | ||
* Subclasses are free to use any or none of the information in | ||
* the model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this comment up on the abstract class too. That's what I use for the notebook, for example, so that's where I would have looked for the docs like this.
Updated. |
I think this is the wrong way to open a terminal, unless we implement terminals backed by files, and open the "file" to have a terminal. Perhaps it's wrong to have the file browser be the place to open an arbitrary widget like a terminal. Edit: but let's put this in for now and think about it more. |
Seems fair. |
This is a breaking change, so version should be bumped to 0.7.0. |
I already bumped to 0.6 in this PR. |
ah, okay. Thanks. |
Use models for file opening
@jasongrout, previously we were throwing away information we already had. I will make the required updates to
jupyter-js-plugins
.