gristlabs / grist-static

Showing Grist spreadsheets on a static website, without a special backend.
https://gristlabs.github.io/grist-static/
Apache License 2.0
82 stars 0 forks source link

first pass at support for embedding within a page #16

Closed paulfitz closed 1 year ago

paulfitz commented 1 year ago

Until now, Grist takes over the entire page it is placed within. With this change, it can be more polite and take over a particular element.

Moving within pages within Grist fails (at least on Firefox), I have a small tweak in hand to grist-core to make it work (https://github.com/gristlabs/grist-core/pull/596).

alexmojaki commented 1 year ago

This looks cool and interesting, but it looks like it might not work if initialData is a URL that requires authenticated cookies to download, based on:

Can you investigate?

paulfitz commented 1 year ago

That's a good point @alexmojaki. I added that combination as something not supported yet in the README. Since it is an accepted defect in firefox, there's some chance it will get fixed, although priority set for it is not high. For the narrow problem of loading the csv, we could make a workaround, where we do it on the main page and pass the data into the iframe. Kind of a drag, but wouldn't change the structure of solution. I'd worry there might be other problems; e.g. I'd hoped custom widgets could be served side by side with doc (just as an example).

paulfitz commented 1 year ago

I updated the text since the problem wouldn't be just for csvs. I suggested a workaround, but should check definitively that it works.