Skip to content

Conversation

SylvainCorlay
Copy link
Member

For now, this simply adds a button to download the widget manager state, but this should probably be in a menu.

Looking at it, I realize that the widget manager has redundant information

    "f7f010b9ef5f4352857009e34122f6e4": {
        "model_name": "LinearScaleModel",
        "model_module": "nbextensions/bqplot/LinearScaleModel",
        "state": {
            "_view_name": "LinearScale",
            "reverse": false,
            "msg_throttle": 3,
            "_model_name": "LinearScaleModel",
            "max": 1,
            "_view_module": "nbextensions/bqplot/LinearScale",
            "version": 0,
            "allow_padding": true,
            "min": 0,
            "_model_module": "nbextensions/bqplot/LinearScaleModel"
        },
        "views": []
    },
  • The views property probably does not need to be there. Especially since it only contains the top-level views in cell output areas.
  • The model_name and model_moduleare both at the top level and in the state property.

@minrk
Copy link
Contributor

minrk commented Nov 13, 2015

Like you said, this should go in a menu. The toolbar real-estate is much too precious to add something like this. You can start by defining the Action, then it's easy to add UI for it in various places, which can be done in another PR.

@SylvainCorlay
Copy link
Member Author

That's right. I mostly that I am working on using custom widgets outside of the notebook and I needed a convenience thing to get the serialized state. I guess that in the end, we will have some sort of embed button which does that and more...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like @minrk suggests, you should probably implement this as an action. Don't add it to the toolbar, and if you want, you don't even have to work out how to add it to the menu. If implemented as an action, you'll be able to access it through the command palette.

@SylvainCorlay
Copy link
Member Author

@jdfreder @minrk I created an action instead of a toolbar menu. Sorry if you spent time reviewing this that early. It was just a placeholder thing for me to get some content for my experiments with embedding bqplot in other web pages.

@SylvainCorlay SylvainCorlay changed the title WIP: Download widget manager state Download widget manager state Nov 13, 2015
@jdfreder jdfreder added this to the 5.0 milestone Nov 17, 2015
@jdfreder
Copy link
Contributor

This is great, thanks! If it makes sense, we should remember to add something to the menubar

jdfreder added a commit that referenced this pull request Nov 17, 2015
@jdfreder jdfreder merged commit f609d18 into jupyter-widgets:master Nov 17, 2015
@SylvainCorlay SylvainCorlay deleted the get_state_json branch November 26, 2015 20:22
@jdfreder
Copy link
Contributor

@SylvainCorlay in #314 I add a "widgets" menu. Would you prefer I add this action to that menu, so the user can click on it there?

@SylvainCorlay
Copy link
Member Author

Sure no problem. We need to merge the last PR for the action to work though.
S.
On Jan 21, 2016 8:08 PM, "Jonathan Frederic" notifications@github.com
wrote:

@SylvainCorlay https://github.com/SylvainCorlay in #314
#314 I add a "widgets" menu.
Would you object to me adding this action to that menu, so the user can
click on it there?


Reply to this email directly or view it on GitHub
#239 (comment).

@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants