I wrote a utility that lets notebook authors give readers the power to save view values to localstorage to return to later:
I don’t know if there’s prior art on this sort of thing, but I’d be curious to see if so! Very interested if anyone actually ends up using this.
While writing it, I also got curious if there’s a way to uniquely identify a notebook. I’m currently admonishing notebook authors to ensure that they use keys that will be unique across all their notebooks for the storable, but it would be nice if there were a way to guarantee that without making the notebook author pass in a key at all.
Thanks @mootari! I’ve updated the notebook to make the key optional (defaulting to the notebook path) and added some docs with the appropriate warnings. By default it will key off the notebook URL.
I think in this case notebook makes more sense than author since sharing stored data between notebooks is likely uncommon and localstorage is already scoped to author.static.observableusercontent.com
I had the idea before I even noticed the back-writing functionality and I was worried it was going to be very complicated and hacky to implement. What a delight it was to discover you had already thought of what I needed!