evidence-dev / evidence-vscode

The official VS Code extension for Evidence projects.
https://marketplace.visualstudio.com/items?itemName=Evidence.evidence-vscode
MIT License
9 stars 2 forks source link

Preview action for templated pages #30

Open mcrascal opened 1 year ago

mcrascal commented 1 year ago

Fine tuning -- not for the current release.

Previewing a page that has parameters in the route is counter intuitive -- the extension injects [name_of_parameter] into the url and opens that page.

Given the information that's available to the extension, I think it will be quite difficult to correctly navigate to a parameterized route.

If it's not possible to find these routes, I think it'd be preferable to simply not offer "right click to preview", or the editor action preview button on any markdown that is in a parameterized route.

If it's not possible to distinguish these routes, I would remove right click to preview, and the preview editor action for all evidence pages.

See: https://docs.evidence.dev/core-concepts/templated-pages/

RandomFractals commented 1 year ago

That is the current v1.0.0 limitation. We did not get the time to dive into templated pages and params rewrite.

Providing preview of those pages might also require better understanding of your data api and how those parameters and dynamic page urls should be created from app routes for Preview.

RandomFractals commented 1 year ago

Will not be looked into, or worked on for the v1.1.0 enhancements release, or Sprint 3.

We can revisit this later in June, if you'd like, or think that this advanced feature is worth investing some time into.