stateful / vscode-runme

DevOps Workflows Built with Markdown for VS Code
https://runme.dev
Apache License 2.0
186 stars 13 forks source link

Command to show metadata associated with code block? #1360

Open jlewi opened 3 months ago

jlewi commented 3 months ago

I think it might be helpful if there was a command to display cell metadata.

The main use case is as a runme developer being able to inspect metadata and in particular the id associated with a particular cell block.

I can do this today by opening the raw markdown in a text editor. So arguably a command to display it wouldn't add much value.

Is there another way to easily view the metadata associated with a code block?

I found this older issue about an Annotations UI (#97). I'm not sure if annotations are the same as metadata. I also don't see an Annotations tab in the current version of Runme.

sourishkrout commented 3 months ago

I found this older issue about an Annotations UI (#97). I'm not sure if annotations are the same as metadata. I also don't see an Annotations tab in the current version of Runme.

@jlewi you can see the "Configure" foldout aka "annotations tab" (below), right? Just checking. It does not show all available metadata; just the most important config switches (which are stored in the metadata). However, we could add a third section "Metadata" that display the entire raw metadata in dev or when a debug's flag is on.

image
jlewi commented 3 months ago

Yup that works.

sourishkrout commented 3 months ago

Yup that works.

Actually I have a somewhat cleaner solution which is just relying on notebook renderers. It'll be available in the next patch release of the extension. Please note that the renderer selection is sticky and the cell metadata reflects the state of when the "Configure" action was executed last.

https://github.com/stateful/vscode-runme/assets/250527/022502fe-771d-4134-8a5c-43c034a9ea20