Trrack / trrackjs

A library for history/provenance tracking in web-based visualizations.
https://apps.vdl.sci.utah.edu/trrack
BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Expose the api to add/remove metadata and artifacts to trrack nodes #37

Closed kirangadhave closed 1 year ago

kirangadhave commented 1 year ago

We have the types and the metadata attributes on the nodes. We don't expose a function to add/remove/set these.

Metadata is the ONLY change allowed in an already created node. To keep the provenance of metadata changes, the metadata attribute should have the following data structure:

type MetadataObject<T> = {
    timestamp: string;
    value: T
}

type Metadata<T> = Array<MetadataObject<T>>

The API should provide the following:

Implement a similar API for artifacts. Artifacts can be used to store arbitrary objects/object URLs like screenshots, etc.

kirangadhave commented 1 year ago

If adding proper type safety using generics, breaks the current trrack version, I will use any for handling metadata types. Next major release will include the actual typings.