Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist Inspector state #71

Open
tophtucker opened this issue Apr 9, 2021 · 1 comment
Open

Persist Inspector state #71

tophtucker opened this issue Apr 9, 2021 · 1 comment

Comments

@tophtucker
Copy link
Contributor

@dhowe writes:

It would be useful to be able to control the default state of inspected objects in a published notebook. If I publish the notebook with an object in an expanded state, then it should be in the expanded state when the notebook is first opened (of course the reader can change that state by clicking the arrow as usual). But the default appearance could/should be under the control of the notebook author.

Related: when you re-evaluate a JS object cell, the Inspector loses all but the top level open/closed state.

Could we write a JavaScript object "input" analogous to the Table allowing for this sort of persistent configuration? Do we need to solve the general problem of persisting notebook state to do it with the organic Inspector? (See discussion in forum thread.)

@jrus
Copy link

jrus commented Apr 9, 2021

As an alternative, it might be nice to be able to explicitly pass an object into a "inspector" view that implements the inspector behavior but could take some additional parameters to describe the state of disclosure triangles, how many rows to show, etc.

So instead of obj in a cell, you could have:

viewof inspector(obj, {... options...})

Or could include it in other contexts, along the lines of:

html` ${list.map(inspector)} `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants