grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

Keep widget's custom options while changing its url

Open jperon opened this issue 1 year ago • 2 comments

There are cases when using the same widget, but changing its url, may be useful. For example:

  • creating a document on docs.getgrist.com, then importing it into a self-hosted instance;
  • developing a custom widget on one’s computer (with an url like http://localhost:8000, for example), then integrating it on an instance.

In that case, with the actual behavior, the custom options (saved with sort and filter options) get lost. But there are widgets that make extensive use of these options (jupyter widget for example). So it would be nice to have the ability to keep these options while changing url.

jperon avatar Nov 28 '23 15:11 jperon

It makes sense. Might need a big "AT YOUR OWN RISK" warning rather than being a default behavior, since otherwise widgets would need to be tested for robustness in reading settings from older (and perhaps newer) versions of themselves? Or we could make it easy to do a version check and only offer keeping settings when the version matches?

paulfitz avatar Dec 01 '23 14:12 paulfitz

In my case, the "AT YOUR OWN RISK" would be a perfect match. It could be a plugin maintainers responsibility to put checks in place if he makes breaking changes.

jperon avatar Dec 01 '23 15:12 jperon