Embedded demo

Nate Agrin · Friday Demos · December 22, 2023 · 6:02

Gleam: A demo of our embedded site, a reporting service for an eCommerce retailer sharing data with their suppliers

Try it yourselfThe full week on docsdashboardsembed

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. we got a couple let's see if this works the other thing is uh we've built this little demo embed website that I think most folks have seen uh the main thing is it's live it's hanging off a subdomain off our Omni uh. Co maybe scrub that from the from the recording but once you're in here you can switch between these uh these embedded dashboards it's pretty nice pretty quick you can switch to dark mode pretty fun um and then I dropped in a new feature the other day which is now you can log out and then the last one I'll demo real quick is um been working on building out this this like idea of uh an integration test suite for visualizations and I really

  2. just wanted to make it as easy as possible to to build a large uh surface area over the tests so um this is the main test I think I I can't remember if in in earlier demo I walked through this but the basic idea is like we need four things really to cover a large swwa of the viz pipeline we need the data from a query result we need the list of fields uh and this is not just the string names but actually the the fully formed like fields that the viz cares about the query object and then this quite large object that is like the internal configuration for the viz and then from here what happens under the hood is the F pipeline takes

  3. all of these four things and uh converts them into effectively a Vega config and sends that to the viz um so I'm not going to go super deep into this pipeline how this all works but uh what it basically does is it it takes all of those properties uh sends them to Vega gets an SVG and then we uplevel the SVG into a bit map um to to be able to do basically like U visualization or VI viz diff testing and the idea here is like you change something in the render pipeline that suddenly dramatically changes the way like a column chart is rendered um this image snapshot testing should catch that um okay so getting all this stuff is super laborious and really really

  4. painful um and so what what I've been working on is making it super easy to just have a single place where we can drop in these test cases and enumerate them and uh in addition to this I've also built in this little helper in the UI that um makes it so wherever you are um you know like basically on any instance once this is deployed you should be able to come in here and click this copy button and drop it in here then you have to give it a name because the tests need a name but you say like demo deoration T um and then if the gods are with me this is my Snapshot test you can now see I have this new one

  5. it ran um and if I go back to my folder I can pull up the new test right so you'll notice that this line chart doesn't look anything like this line chart and there's a good reason for that um the way that we transmit our data is in Arrow and arrow has some pecul peculiarities around how it encodes a lot of its data and you can actually just uh jsonify an arrow payload um for a couple reasons but not the least of which is that it really likes to encode its numerics as big ins in JavaScript and for reasons that are Beyond me uh when when big in was uh introduced uh it was not introduced with a mechanism to jsonify it and so um

  6. because of that and also because you know a lot of times the data payloads can be very large uh this is actually taking a random sampling of the data set before dumping it into uh Json um so this down sampling is intentional and uh the other thing the sampler does is it um it basically converts everything so it can be jsonify in a somewhat reasonable way um so yeah there's still some things that we need to improve here like you know it'd be nice to not cut off the Y AIS uh but as a start I'm pretty satisfied with this and it should at least give us some some surface area coverage that's what I've been doing in the salt mines