kiln / flourish-sdk

The SDK for developing Flourish templates
Other
80 stars 16 forks source link

Cloning visualization feature not working in scatter/data magic templates #83

Open h-robertson opened 2 years ago

h-robertson commented 2 years ago

When you try and use the cloning viz feature in the SDK (e.g. adding the ID of this scatter visualization when running the scatter template) it doesn't seem to work anymore.

I'm not 100% sure if it's the data magicness that's preventing this, but I also tried one in the Table template (also a data magic one) and it doesn't work there anymore either.

Here's the errors from the console in Scatter:

image
daanlouter commented 2 years ago

Interesting.. I wonder if this is because it doesn't send the data magic metadata object? Does that sound reasonable, @oampo?

oampo commented 2 years ago

Yep, it looks like both getLiveApiOptionsObject and getPublishedJsonObject in server/entity/private/visualisation/serializer.js need updating to also include the metadata.

oampo commented 2 years ago

I think @bobbysebolao did the SDK changes to add metadata, so probably has more context than me on how the everything works there.