Topic files and more

Conrad Slimmer · Friday Demos · December 2, 2024 · 11:50

An early look at new model organization - breaking topics into individual files for simpler nav and readability; plus lots of work on better model layering for included schemas

Transcript

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

  1. I'm up in Bonnie Doon, so hopefully go better this time and and if not, then Yeah, give it one more try and then we'll video clip it. We'll we'll we'll save it for Friday if if it doesn't work this time around. Good. Okay, I did do a speed test and things are looking a little better, so Can people see my screen?

  2. Yep. Okay, great. So, I don't know how far along I got, but we'll just kind of start again from the top. I did mash together a few different branches to be able to demo a few different things, so hopefully that doesn't get in the way of success. Uh The first thing I have moved topic definitions out of the model file and into their own file.

  3. So, you can see now in the sidebar, there's another section called topics. You've got topics defined in there. I'm currently selected a couple topics. Obviously, you can toggle between them. If I want a new topic, I come into the file menu and I create a new topic. We'll call it order items. Uh Ta-da, I've got a new topic called order items.

  4. But wait, there's more. Uh As you can see, all of the auto complete is working. It was fun learning how that goes. Uh so, I can add a group label to this topic. Oh, saving stuff in topics works, that's amazing. And you can see that now I can actually um folderize the topics. So, if I want to um organize my different topics, I just hooked into the group label parameter.

  5. Seems like that is probably a pretty sensible thing to do. The other piece that I haven't implemented around that is uh that I want to also provide a mechanism for ordering topics and topic uh groups uh in so I'll I'll add this separately and and move on to that. Uh other stuff does work in here. So like for example uh views we still haven't released but uh let's say I have like order items view.

  6. Uh and I put dimensions. This was I just got this one working this morning. But uh say I put a bad topic definition in here. Oh, look at that. There's no such view. Uh there should be no such field. Bad. Oh, where am I? I'm going to work right on orders blah blah blah blah blah. Um anyway, this should do go to Oh, no.

  7. It was working this morning so I I messed something up with my with my merging. Anyway, we'll move on from topic files and another thing that's been uh causing some havoc for people is the way that we do um layering of various properties in the model in particular uh things which are arrays of strings or sets of strings uh have always historically been uh just whatever you put into your current model layer, we save the whole thing and then we're not composing it with layers above.

  8. So uh as you can see I've got now in the the shared model and I've got this included views. The only views that I'm showing are users, orders, order items. Uh if I jump into a new analysis, um we really only care about uh what's going on in the in the model. So, I'll actually jump into the workbook model and uh you can see that I've got, you know, users, orders, order items.

  9. I haven't defined anything here. This is just what's showing in the combined view. Um you know, you can see that's the case. There's nothing in the model file. Uh and if I want to, I can add in uh what's another one of our views? We've got uh inventory items, right? Uh There are products. So, we got inventory items.

  10. We'll save this guy. Okay, that's fancy. Um fantastic. Oh, that That's cool, but you know, now somebody over here uh merged some other change into the shared model. I'm now in the shared model and uh they saved this. And we jump back into here and if all is well, oh, look, products showed up in here. So, that's fancy because now we're actually picking up changes that are upstream from us, whether we're in a workbook or a branch.

  11. Uh and you know, getting a little bit more fancy, let's just say that we jump into a branch. Uh we'll call it uh demo, for example. And Oh, in this branch, I actually got rid of the users view. Uh okay, here I am in this branch. No view users. Okay, great. That's, you know, don't worry about these.

  12. Yes, I broke my model uh, for demo purposes. So, I can also show off that Oh, look at that. Users is gone from my workbook model while I'm in the branch. Obviously, uh, it's still here if I'm not in the branch. And that's all the layering stuff. This also works for included schemas, ignored schemas, and ignored views.

  13. And I imagine the same pattern has some other applications within our model, but I haven't thought through all of them just yet. Uh, and then I wanted to show one other thing just to kind of um, show really how we how I implemented this. And for my own sanity with like uh, debugging this and and other stuff.

  14. Um, where's a good place to do this? I'm going to put it in I'm going to go into the demo. Okay, so we've removed users in this uh, particular thing. Um, so now we're moving on from that part of the demo into another thing. This is probably just an internal only tool. But, uh, okay. So, you can see this is the change where I removed uh, users in this branch model.

  15. Uh, if I look at this change in the model only view, uh, that's funny. I think some weird stuff's going on with um, with layering in here because this should actually pick this up. Uh, but I think that's actually a pre-existing bug that I want to get fixed. But, I've added this new um, format uh, widget or select item to the history page.

  16. I think we'll probably just uh keep this internal uh for for Omni employee users cuz it's really for debugging. Although, it might not be too bad to expose it. Um and what we've got here is I can now change the serialization format for my history diff views. Uh and now I see the entire um basically what we serialize the model as into the back end because the YAML that we generate is based on these structures.

  17. We don't show a lot of the the model properties in the YAML format and it can make debugging things challenging because it's like, wait a second, what's actually in there? Uh and so I I thought it would be fun to expose uh basically the the serialized model format in the in the diff view and potentially in the IDE as well.

  18. was going to say, is there going to be a way to see that in just the model file itself or anything like that? I I think that that can also be useful. Uh it would it would definitely be a read-only mode. Um and it's a little bit interesting because if you look at this in the model only, you know, I'm in I'm in model, uh and you can see I wanted to show how I implemented the um the basically the the deleting the layering of included views and stuff.

  19. I've got these paired sets now that we keep track of deletions and additions at each uh each layer of the model. Uh and and so I thought it kind of tied in nicely with with this demo. Um and Uh just just just as a follow-up, is there a lot of other hidden metadata in the model that we're not exposing?

  20. Yes. Okay. I mean, a lot. There's There's There are quite a few things that that aren't exposed. Yeah. It It might just be interesting to not even think and have like a super advanced mode where we show literally everything. I don't know what you would do with it, but I can see a world where people would want to see everything that we've got.

  21. Not super important. No, I can I can see that too, and I think there is a product question of like if we actually want to expose kind of the underlying objects that we're that we're storing. But, I definitely think it could be helpful. I know it's helpful for these diffs because sometimes you see these diffs and it's like, "Well, I don't see any diff.

  22. What changed?" But, really something underlying changed. And I think it could potentially be helpful to actually look in the IDE at the entire serialized model as opposed to the the YAML that we generate. So, that's that diff wasn't a bug. That was You meant to show that, I think, right? The deleted thing doesn't get shown in YAML, so that's Yeah.

  23. Yeah, that was exactly That was the point of of of kind of showing that like in YAML it's like what's the change? There was no change here, right? But, it's it's interesting to like go switch into here and it's like, "Oh, yeah, something did actually change. I see." And I mean, if I'm in the combined mode in YAML, I see the I see the diff.

  24. So, it's it's just kind of another some more tools to to to understand what's going on in in our complex layering system. And And to come back, yeah, I think it'd be interesting to to stick this into the IDE as well. All of that to say, I had a ton of fun during hack week. And I also didn't you know, some of these things are not production ready.

  25. Although they included the layering stuff, the PR got approved on that this morning, so that'll be in today. And I'll be working to get the other pieces done as well.