Can you always assume 1, and then adjust to 2 if needed?
I think there is something in the matplotlib webagg backend about only setting this once. But that must be workaroundable
Also, the thing I've struggled with philosophically is: should we take the snapshot when the widget is initially created (so it represents what happens when the cell is run), or should the snapshot be taken when the file is saved (so it represents the current view of the document, but does not necessarily reflect the code cell above it)?
It seems to me that the latter encompasses the former. If you are careful then the final state can encompass the initial state, but the converse is not necessarily true. Further, for story telling via emailing someone a notebook I at least would want to include an by hand modifications I made to a widget (e.g. highlighting part of a display)
I've been meaning to ask you or someone else knowledgeable about comms if that is a safe thing to do (send message to the frontend before it's finished being created)
Messages are queued in the frontend and processed in order, and wait for each other to be done processing. The comm object pauses message processing until it is created. Does that answer your question?
It seems to me that the latter encompasses the former. If you are careful then the final state can encompass the initial state, but the converse is not necessarily true. Further, for story telling via emailing someone a notebook I at least would want to include an by hand modifications I made to a widget (e.g. highlighting part of a display)
Yes, I think what is most intuitive to users is to save whatever is currently on the page (i.e., current widget snapshot).