gristlabs / grist-widget

A repository of custom widgets to embed in Grist documents
https://gristlabs.github.io/grist-widget/
Apache License 2.0
58 stars 61 forks source link

Ensure manifest urls don't redirect #118

Closed alexmojaki closed 5 months ago

alexmojaki commented 11 months ago

Because the current URLs don't have a trailing slash, they get instantly redirected, e.g. https://gristlabs.github.io/grist-widget/invoices is redirected to https://gristlabs.github.io/grist-widget/invoices/. On GitHub pages this is actually fine, but when the dev server does the equivalent redirect it also removes query params, potentially causing confusing bugs in local development.

This isn't currently a concern since none of these widgets use the query params provided by Grist such as access or timeZone. I mostly just want to highlight this so that future widgets consistently use a redirect-free URL.

This can only be merged safely if we can guarantee that changing a URL in the manifest won't clear widget settings in existing documents (via changing the URL of the widget) and I'm not sure if it's worth the effort to ensure that right now.

The trailing index.html in each URL is probably not needed but I wanted to be consistent with other widgets.

netlify[bot] commented 11 months ago

Deploy Preview for boisterous-sunburst-a5c941 ready!

Name Link
Latest commit 67e453de9b2737ab56b15b35a05f37c4cc677405
Latest deploy log https://app.netlify.com/sites/boisterous-sunburst-a5c941/deploys/657b5090d3de690008855d50
Deploy Preview https://deploy-preview-118--boisterous-sunburst-a5c941.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.