runme icon indicating copy to clipboard operation
runme copied to clipboard

internal/document: improve attrs processing

Open adambabik opened this issue 3 years ago • 4 comments

Highlights:

  • Remove serializing the name attribute if it was not present in the source.
  • Add spaces between { ... }.

adambabik avatar Dec 08 '22 17:12 adambabik

I might need to introduce an identifier on the extension side that allows me to identify a cell (might just use xid). What do you think about excluding metadata keys starting with _ (eg _id) from serialization? Simplifies managing transient metadata

sourishkrout avatar Dec 08 '22 22:12 sourishkrout

@sourishkrout of course, we can exclude internal/private attributes. I was thinking either of _ or runme.dev/*.

Let me know which way you want to go.

adambabik avatar Dec 09 '22 08:12 adambabik

@sourishkrout of course, we can exclude internal/private attributes. I was thinking either of _ or runme.dev/*.

Let me know which way you want to go.

What do you think is cleaner? I'd like to avoid the metadata schema growing like weeds.

sourishkrout avatar Dec 09 '22 15:12 sourishkrout

@sourishkrout if _ is unused by VS Code, we can use _ as it's shorter. If _ is already used and we want to have more control then runme.dev/*.

adambabik avatar Dec 09 '22 15:12 adambabik

@sourishkrout if _ is unused by VS Code, we can use _ as it's shorter. If _ is already used and we want to have more control then runme.dev/*.

Worked through the requirement for a ephemeral metadata attributes and turns out I can get around it using the native vscode API. However, I think we should probably jut do both _ and runme.dev/* and choose depending on use-case which one is more appropriate.

Also, please go ahead and remove index entirely from the metadata. It's no longer required since the extension is relying exclusively on the API now.

sourishkrout avatar Dec 11 '22 16:12 sourishkrout