Right now an opened item's URI only carries the item type and a numeric Id, for example /FileContent/lavaapplication/endpoint/39/code-template.lava. It doesn't include the friendly slug from the tree, or which server the item came from.
That limits what VS Code's editor custom labels can show, since they can only template on the path. The best tab label I can build tops out at a numeric Id, which makes compare/diff dialogs hard to tell apart, and there's no way to show whether I'm editing production or a test server.
Could the URI include the server host and the slug? Here's the shape I have in mind across the item types I work in:
| Item |
Current URI |
Proposed URI |
| Lava App rigging |
/FileContent/lavaapplication/application-rigging/22/application-rigging.lava |
/<server-name>/FileContent/lavaapplication/<app-slug>/application-rigging.lava |
| Endpoint (code) |
/FileContent/lavaapplication/endpoint/39/code-template.lava |
/<server-name>/FileContent/lavaapplication/<app-slug>/endpoint/<endpoint-slug>-39/code-template.lava |
| Endpoint (metadata) |
/FileContent/lavaapplication/endpoint-metadata/39/metadata.txt |
/<server-name>/FileContent/lavaapplication/<app-slug>/endpoint-metadata/<endpoint-slug>-39/metadata.txt |
| Lava App block |
/FileContent/block-handler/6542/template.lava |
/<server-name>/FileContent/block-handler/<block-slug>-6542/template.lava |
| HTML content block |
/FileContent/block-handler/3446/content-1605.lava |
/<server-name>/FileContent/block-handler/<block-slug>-3446/content-1605.lava |
| Shortcode |
/FileContent/shortcode-property/<id>/… |
/<server-name>/FileContent/shortcode-property/<shortcode-slug>-<id>/… |
A custom-label pattern could then surface both, so a tab names the environment and the item at a glance. The server piece would also be a nice guardrail against editing the wrong environment by accident.
Magnus VS Code extension v1.0.2 / Rock plugin v2.1, VS Code 1.129.1.
Right now an opened item's URI only carries the item type and a numeric Id, for example
/FileContent/lavaapplication/endpoint/39/code-template.lava. It doesn't include the friendly slug from the tree, or which server the item came from.That limits what VS Code's editor custom labels can show, since they can only template on the path. The best tab label I can build tops out at a numeric Id, which makes compare/diff dialogs hard to tell apart, and there's no way to show whether I'm editing production or a test server.
Could the URI include the server host and the slug? Here's the shape I have in mind across the item types I work in:
/FileContent/lavaapplication/application-rigging/22/application-rigging.lava/<server-name>/FileContent/lavaapplication/<app-slug>/application-rigging.lava/FileContent/lavaapplication/endpoint/39/code-template.lava/<server-name>/FileContent/lavaapplication/<app-slug>/endpoint/<endpoint-slug>-39/code-template.lava/FileContent/lavaapplication/endpoint-metadata/39/metadata.txt/<server-name>/FileContent/lavaapplication/<app-slug>/endpoint-metadata/<endpoint-slug>-39/metadata.txt/FileContent/block-handler/6542/template.lava/<server-name>/FileContent/block-handler/<block-slug>-6542/template.lava/FileContent/block-handler/3446/content-1605.lava/<server-name>/FileContent/block-handler/<block-slug>-3446/content-1605.lava/FileContent/shortcode-property/<id>/…/<server-name>/FileContent/shortcode-property/<shortcode-slug>-<id>/…A custom-label pattern could then surface both, so a tab names the environment and the item at a glance. The server piece would also be a nice guardrail against editing the wrong environment by accident.
Magnus VS Code extension v1.0.2 / Rock plugin v2.1, VS Code 1.129.1.