Offline grist-electron?

Some background on how custom widgets have evolved in Grist.

Custom widgets began as a reference to a location on the internet to show in a widget section. That is all they were. Grist opens that location (carefully, with security in mind), gives it the user-specified level of access to the document, and then everything else that happens in that widget section is not up to Grist. So very flexible, but inherently tied to the network.

We then started to gather a collection of useful custom widgets, and eventually listed them in the product so they were easier to get at then by finding and pasting in their individual URLs. They are still references to locations on the internet though, not built in to the product. I can see how that would be confusing. We plan to update the UI soon and can try to communicate this better.

Separately, we have worked on a way to “bundle” custom widgets into a standalone package. Here is the markdown custom widget as a self contained .zip file:
https://grist-static.com/widgets/experimental/grist-widget-markdown-2024-06.zip

To use this with Grist Desktop, run it in a way that you can see its console output, and look for a line like this:

info: == userRoot: /home/paulfitz/.grist

That tells me that Grist is looking for user customizations in .grist in my home directory. Make a subdirectory called plugins within that, and unpack the .zip file into it, so that you have files like this:

/home/paulfitz/.grist/
/home/paulfitz/.grist/plugins
/home/paulfitz/.grist/plugins/grist-widget-markdown-2024-06
/home/paulfitz/.grist/plugins/grist-widget-markdown-2024-06/manifest.yml
...

One last thing, that should not be necessary but currently is because this is experimental and unfinished: set GRIST_TRUST_PLUGINS=1 in your environment when running Grist.

Now, when you run Grist, there will be a new grist-widget-markdown-2024-06 version of the Markdown widget that you can just pop in to replace what you have, and it should work entirely offline. Again, if this feature were finished, you wouldn’t need to explicitly replace your widget. Here’s a screenshot of me using it offline [hard to tell I’m offline, but normally there’d be a happy network icon in my notification bar :-)]

3 Likes