Podcast Lookup

Code with CodingCat.dev: SvelteKit with DaisyUI

CodingCat.dev Podcast

  • June 30, 2024
  • 1 h 34 min
  • Episode 2
Episode page
About this episodehttps://codingcat.dev/podcast/sveltekit-with-daisyui

Transcript

From the publisher

This transcript comes from the podcast’s own feed, shown as the publisher wrote it.

Code with CodingCat.dev: SvelteKit with DaisyUI

00:00—
  1. Oh, hey, Brittany, I made. It. You're here already. I am here. We thought we would have to wait for Brittany today, but as it turns out. And I ran, so I'm sorry. Well, welcome Brittany, and welcome all you perfect peeps out there. How how are you doing today, Britt? Exhausted already, It's been a busy morning. It's been it's been a long week.

  2. How is week 3 annalify? Four, we're on like Week 7. No way is it that right? Wow, it's been that long. Oh my gosh, time. Time is an enigma. Holy smokes. Well, that's awesome. It might be week six, I don't know. I can't keep track but maybe next week is week 7. I know you tell me all the time how amazing it is, but do you have any tidbits to the audience like, Oh my gosh, this happened that you can share? Oh, Oh my gosh, this happened.

  3. Oh Lord, I don't know. But the culture there is so take. You out for waffles or anything? We do have a all hands coming up, so I'm kind of excited about that to finally meet some of the people that I've been working with. But Phil posted the other day one of the remotely interesting recordings of all of us laughing. Then that is literally how every meeting is. So that is probably the best part is that it's just us laughing 24/7.

  4. That is awesome. I love, I love all the channels you keep telling me about in LFI, so that's pretty cool. Oh yeah, Slack is like a fun discord server. For sure. I feel like my lips are behind my speaking so I don't know what's happening with the camera. Oh, I don't know. I had to move you over here so I'm not even watching.

  5. The video Oh, you got the second monitor hooked up today. I do. It's a terrible one. It's my like old one that hooked up to a Raspberry Pi. But it's fine for like this kind of stuff, so. Yeah. I wanted to bring up since you know, it's Friday and we should promote the heck out of each other, you have an amazing podcast slash not podcast guide and tutorial floating around. Which one I have?

  6. Oh, yes, OK, so. This is pretty. Sweet, I have the how to deploy solid JS. Yeah I did that. I also did one on the acronyms of rendering and so I've got a couple floating out there right now. Fine. It should yeah, I should have my own little author page and I've got our stuff in there. If you didn't notice that perfect dev and coding cat dev is like mentioned up there in my bio IT. Is.

  7. Yeah, they're not not linked out. I don't know, maybe I need to go and add the markdown links to that. But yeah, it's been just an amazing experience there. And I think I'm having Internet issues because I tried to send Nikki a message and it errored out on me, so maybe that's why I'm having some lag.

  8. Man, OK, well, no big deal. Hey, Nikki. Nice. Hey friends. My computer opened three instances of Blender that could be causing some issues. Too. Yeah, Blender. Blender takes a few resources. Oh wow. Yeah, that was that was probably some of my problem. Maybe it'll catch up now. You know I haven't asked you this because I I still stink at it, but should I hang out on twitch as well while we do this?

  9. Should you hang out on Twitch like in your personal stream? Oh that's a good idea. Maybe it's a blurry again. Sorry. Yeah. And then that way we could have our personal names on there as well. That is a great idea. Yeah. And then that way except you have to mute it. I know. Love Twitch and the autoplay. Hello, hello.

  10. Hi all. Nice. I will, I will work on that next time. I didn't even think about it until we were just talking about kind of these comments coming in and stuff like that. So we're not quite as advanced as Jason and I don't know a few others with. I don't know how he does it still. I gotta look at like OBS coming in and we could do that. I'm working on that on my own personal stream so I'm planning on doing this live learning in public thing with the twitch stuff so maybe once I get mine we can do coding cats like together.

  11. Sweet, I love it. Let's do a whole like tutorial on it. Yeah. Cool. Well, let's dive into it. So this is code with code and Cat. We're trying to do live code every Friday, at least when we're, you know, available and not traveling to conferences 'cause. I'm so and and when Britney is not picking up children and running around like a crazy person. Lucky.

  12. Luckily mine's 13. He's like riding around his bike. Kind of independent, yeah. So yeah, where we kind of left off last time, Brittany was teaching me Svelt Kit, which was incredible. And we're kind of attempting to build coding kit on Svelt Kit. And so today we're going to show you how to like add a Notion API if you are using Notion. And then we're going to hopefully, if we have time, get Tailwind and Daisy UI installed and then see if we can make some pages.

  13. Woohoo I'm very excited about this felt kit transition because it's going to help me learn more about spelt too. So I'm excited about that process and teaching you like my knowledge. Yeah, I love it. And then we can keep expanding our intro to spelt and go to like an advanced spelt course. Yes.

  14. We can try to challenge what is it, learn learn.speltkit.com or something. Oh, we're never learn dot learn dot spelt, dot dev learn. I thought spelt. I can't believe that they released it. Rich Harris had a talk yesterday at JS Nation and that's not it either. I don't know what it is.

  15. OK, I thought this was, I have it somewhere. I will find it and I will link it to the chat. But he had a talk yesterday and he talked about them building this and I'm an ambassador and I got a little inside preview and got to do some of the alpha testing of it. So it was. It's pretty awesome.

  16. Yeah, those stack blitz votes. Thank you for putting all the things into the browser. It's. Amazing. Oh my gosh, yes. We should have them back on. We check out our our pod that we did with him a while back. Yeah, I had to miss that one. So I would love to have Tomas. Is that who that was?

  17. That's who came on before. I'm sure he would come back on for sure. Maybe we could talk about how spelt actually works or something. Learn.spelt.gov So maybe you were right and I just typed it incorrectly. Learn dot spelt. Yeah, I think that's it. That's the one I saw the other day so. It's got the web, can be for everyone. It's so nice running spelt kit in the browser. Maybe we can use this as an iframe to our tutorial? Is that like illegal?

  18. I don't know. No you can and all of this is open source so you would be able to like the spelt ripples open source too. Hey thanks Xanax, I have to get my clip from my stream the other day set up because Selma tried to share my clip and it was just blank and she's like you need some clip hygiene on twitch so I think we probably need it for coding cat too. Yes, yes, I wish.

  19. Anyone want to volunteer to run like our twitch? Let me know or I could throw you some cash if if we need to just DM us. OK, so I think we've we've gathered a quorum as they say. I don't know why, but that's what they say. I think we have some peeps hanging out and so I'm going to dive into Notion and kind of how to get that set up first. So if you are ever using Notion on the front end and you're like, what does the API do?

  20. You can go to developers.notion.com. They have great guides out here on different ways to start up and like work with databases. It can be pretty confusing just looking at blocks and how child blocks are used and things like that. If we want to I can get into the the Postman and show you kind of what ours look like in different things. They also have the API reference so we can refer back to this if we have questions.

  21. Did you end up writing a tutorial from the one that you did last week? Not. Yet I started it. I started it. It's it's out in our notion. I was going to try to do something because you copied and pasted a lot of the things we already have in next JS and so I was going to try to make it.

  22. Brittany might have froze, so hopefully, hopefully she makes it back. Oh, there she is. OK. Sorry, this Internet thing. That's OK if you need to reboot something, I'll just be hanging out. So I do I need to restart? It's telling me it's going to do it automatically in 3 minutes so I'm just going to restart now and maybe get the Internet back in check so I'll be right back. I'll tell the peeps how to do an integration. All right.

  23. So basically when we're looking at the developer API, in order to use this within a Notion workspace, you have to set up an integration. And an anger integration essentially is the same thing as a user. It has a little more like maybe not pared down rights, but a lot more generic rights, I'll say. So currently we have this development space for our Notion that copies over like our production data. So we can hit that.

  24. And Notion is not the perfect thing to use for an API yet. I'm working on some some Cloudflare, Cloudflare cloud something workers. There we go either on GCP or write some Lambdas. I was checking out edge workers too. So maybe put a Redis cache in front of this stuff. There's a there's a couple options, so if anyone has suggestions, let me know.

  25. For caching the Notion API, but you're only allowed three API calls per second, but it allows for bursts too. So actually this might be important for those trying to check this out. Let me see where that was at. I think it's in capabilities. No, no, no, shoot request limits, totally missing it. There we go.

  26. Yeah, so here is your 3 requests per second. You can do a lot to like mitigate that with the 420 nines and retries, but if you're trying to build an entire static site like we're going to be doing, you're definitely going to get that burst. And so they do call that out somewhere. I guess it doesn't actually say it, but I believe I read somewhere like if you have 2700 calls within 15 minutes or something like that.

  27. So we can build our entire production site. I don't know if how many pages you could do with that, but we actually leverage a lot of ISR on ours too. So if you're not familiar with ISR, we can actually put our most of our static site pages out there. And then for the ones that we don't really care about during our build cycle, they will build on demand.

  28. So that's what that's all about. On the next GS side. OK, that's for next GS. We'll see what's felt good, good news for the integrations now. So we have our development and our production one. When we dive in or you dive in to go add a new one, you can click create new one. And we'll just call this, I guess I think we're going with CCD spelled kit. And then this is the important part. I kept skipping this.

  29. So let me show you Notion real quick, just so this makes sense. So this is our Notion page. And within this, we have a top level coding cat, but these are our workspaces. So we technically have our production one which we pay for. And then we have our development one that's listed here as well.

  30. So we're actually going to pick that development one to code against, at least for now. We might have to change this later. Do I have access to that one? I don't know. I'll check. If not, I'll add you because that'll be important for our future because I'd like to get us working on development and development. I have so many workspaces I don't see it, so I don't think I do, but no big deal right now.

  31. So for the API side of things, realistically you only need the read content. We're doing a lot more with our AP is where we actually do like a calendly integration and write our own cards when someone schedules a a podcast and things like that. So I actually use multiple. I should break that out to a different API.

  32. I'll probably do that eventually, but we'll get there for R6. For this tutorial, we're just going to leave them all on. Make make my life easier in case we do something else. So now that we have our CCDS felt kit I'm going to go off screen in a minute because I believe we tucked away some dot env file and I messed up the the name on this completely last time we're coding.

  33. So it's dot EMV instead of dot EMV dot local is that was that the issue And I, I was in and out last time so. Yeah, yeah, yeah. So for those of you if if we left off and things were somewhat broken, maybe hang on one second. I got to find Finder here, open in Finder, Reveal. That's why I screws me up.

  34. Reveal in Finder. OK, yeah, so if you left off last time and you're having issues, I think we had ours name dot env dot local, which was a problem. It needs to be dot. Envy that was a problem for the dot envy package, right? Because Felt kit I think comes by default with the dot envy dot local file.

  35. Oh really? That's interesting. So I wonder why we needed that then? So we'll do some research and put that in the tutorial. I think it was the package that needed it. OK that makes sense. I know James was having some issues too out in Learn build teach and I think we got him sorted around too so there's some oddities.

  36. If you have questions, go out to our Learn Build Teach Discourse and check it out. What is it? Learn Build teach.com. Learn build teach slash community.com. I will link that to believe that is correct community. I don't think there can be a slash in there. That is it. Yep. Learn, build, teach.

  37. It's a reroute. Gotcha. OK, so I definitely do have some stuff in here. Redirect. I guess it's the actual correct terminology behind that. So give me one SEC, I'll copy these environment variables, I thought I had them already.

  38. You don't think there can be a slash in the URL? What were you say? I don't think it would be slash and then a.com after top level domain comes before path. Learnbuildteach.com/community Did I say it the other way? Sorry. I was just kind of giving you a week, but it's all good. Maybe I heard her wrong.

  39. I mean, it's Friday. Oh no, yeah, it's probably me. I have been to like five places already this morning and it is like 11:00 here so. Why? Why? Why? Are you having trouble finding the environment variable file thing? Something. Mentally having trouble today. I would love to get this working where I could like either code along with you or I could do some coding. Yeah, I would love to share it with you again. So let me share that over.

  40. I think I put out in Learn, Build, Teach, anyone that wanted to join through the link out there. So if you're part of Learn, Build, Teach, you can come on with. Click on that link that I just dropped in the chat. Hang on one SEC forgot we we hid the env file. This makes it more challenging.

  41. Oh, you can't even find it in VS Code I. Have to keep opening. You hid it from yourself. Yeah. Oh, let's see here. So I have development that that OK. I think for the most part I can delete the rest of this. I might be breaking something, but we'll get there. OK, so now we have somewhat of the correct keys.

  42. Let me double check. I have the new security key in there. Does not want to copy either. There we go. OK. I think we can try this though, yeah. You just showed your key. Did I? Oh, it's only like 1/4 of it. OK. This is just the spelt one, we're OK. I was like, you just took so much to not do that.

  43. No, this is and we can burn this one down. That's not a big deal. I just don't want our production one out there. So yeah, definitely. Now I show the whole thing, definitely copy the whole key, and that's what you can use for what we're going to do with our calls. So you'll put that in a dot env file. And now I'll go to VS Code.

  44. I'll actually kick off live. Share Let. Me kick this off and see if you can log into it. Yeah. I think. I think maybe. We're going to see. We're going to see if my computer agrees with me today. It's already being finicky. Tried to install updates on me in the middle of a string. Just saying that the live Sri Lincoln private OK, so here we are in Sveltkit.

  45. We have our dot env file that we are pulling in to different routes. For example. This is the part that kind of threw me off last time. So the slug dot svelt, this took in just our page data and we're looking at it. The slug dot TS is where we actually make some calls out. So for us just we're we're hiding a little bit and that's just because I wanted our data to come through correctly. So I basically copied all of our our server stuff from our CCD. So this is what the actual calls look like on a Notion client. So notion client dot databases dot query and that Notion client in order to initialize looks like that. So this is where that whole process, that env came into play.

  46. So I'm crossing my fingers here. Local host. Is it 3000 for Veet? For spell kit it is, yes. Oh yeah, spell kit. Thank you. Let's make it a little bigger so people can see when I try to just failed to load. I try to just continue in the browser what failed to load. Failed to load route.

  47. I'm guessing it blew up on our client call. Failed request URL. Fun fun. OK. Do you know what icon package you're using in VS Code? That looks like maybe Material. Minus yes. Yep. OK. I'm going to take another look at what I'm missing in the dot env file so. Sign in. Please. I thought I I thought I had a good example going, gosh darn it. Can I see the error and stuff?

  48. I can't get into the live share again. I don't know my it's not syncing a. Couple things over on. A mobile and then everything has two FA so it's like please do this on your phone and it's not sending anything to my phone Oh there it goes. Everything is going slow today. Winning collaboration session.

  49. That sounds pretty, yes. Yes, except that. OK, now I can see the code. I have all our environment variables. I can see this now. So invalid request URL in the Notion HQ client, so that's not a spell kit error. Is that the envy thing that you were running into last week? You know what, let's let's check it out. So if I do a console log oops process EME dot let's do notion not token.

  50. It's not updating the text on my screen.

  51. Oh this is annoying. Oh ha ha, ha ha ha, Yes. It is. No, no, it's totally my fault. I copied all the share links. So this is this is actually something good to show people when you are trying to fish around for like a page IDs and stuff in Notion. You actually can click the share and then go through that.

  52. Let me clean up this file really quickly and then should be good.

  53. Oh, in collaboration section maybe that will work if I just try to copy the link and do it in VS Code. So this is not working in the browser very well. Our PC connection closed. Did you shut the server down and it closed? It probably. Yes. OK, OK, so it's not me, it's you maybe, Oh, I don't know it. It's still showing me in in the browser, but I can't get it running in VS Code at all.

  54. It hates me. I think I can share the URL or the what's the word. I'm looking for the host as well. Oh oh come on, do it. Yes it did it in VS Code. I just had to restart it. Yay I. See your cursor. Would you like to view this in the browser? Yes I would. Would love to see that and I am getting it in the browser. I'm getting a home route in my browser. Nice, I thought, I thought I had all that set up right. So we're live coding together this week. It's exciting.

  55. Yes. OK. I just we can't see your screen I. I don't want to show it just. OK, OK. Perfect one SEC if if you want to show your screen we can do that. I just have to delete your screen. Four more things. Share screen should be good to go. Share Yay. There's my screen and it's following Alex Patterson. We've got our terminal down here and we are working through this. I guess it's just a warning.

  56. Now. Where's the actual error? Did it disappear? Oh, no, there it was. I just saw red. Database with ID. OK, so we are much, much closer now. So this is a good time to show you what I DS we can look at. So when this says O 6263 blah blah blah and I'm not showing my screen, so let me turn mine up. So when it has this could not find database. What we can do is now we can go out to Notion. Oh, you have to share the database connection somehow publicly but.

  57. Then I remembered we created a new integration. Just a minute so on this page the way so if if everybody remembers now that we've, you know, messed around for far too long and we should edit this video one day. Basically, we created an integration, but in order to have the access to anything, you'll notice no one's accessing our page right now. You have to invite the integration. So we're actually going to invite CCD spell kit and actually I'm going to do this one to Meyer. So now that we have that, it should at that point be able to see, update and delete anything in our anything below this point.

  58. So if I were to go in our coding cat dot dev click share, it will show that this has access. So just keep that in mind. Yeah. So now if we refresh, it should hey, hey, hey. It's got it down there, it's below our faces. There's all of our podcast. We're going to just click the link.

  59. You went to podcast and then now you're trying to grab the slug. So, yeah, OK. Cool. So there's all of our stuff, which is. Awesome. Sweet. Yes, that is really awesome. I have. A. Can I see our code? Let me see what I can do here with SRC routes folder. Is that opening and closing your file system too?

  60. It like closed on me and I didn't click it so as. So you're you're looking at this we. Are iterating over. I am looking at the index dot spelt in podcast right now, right there, index dot spell. Yeah. So I just wanted to make this a little more semantic because I noticed that you've put a bunch of divisions in here and so we're interviewing over a list A. Quick one.

  61. Folks, I know, so I'm just going to fix some of this real quick. So I'm going to do this and I'm going to wrap this in an LA so we have like a semantic list. See folks, this This is why you have designers on your team. Well, I don't know if that's a designer thing. That's. Just no. It's pure development.

  62. Sorry. OK, so now we have a list and we'll probably have some styling things, but I assume we're going to get to that when we get to our next fun little thing we're going to add. Yeah, my larger concern is we should be able to click like 2.1 or something. So you're failing to load data. This is failing in the slug dot TS, the dynamic slug dot TS file, so it's failing in there to grab the stuff from the server.

  63. And it says cannot read Notion page ID and then we have this ID. So let's go see what's up with our slugs and maybe there's a connection issue occurring here. So if we go in to our podcasts, coding cap perfect of streams. So we're at this level. So you are calling get perfect stream page HTML and you're actually trying to get the params off of that. I'm just trying to like follow along here what's happening. So params dot slug.

  64. Yeah, yeah, we can. We can console log out that if we want to take a look at like what that actually is. And see if that's actually grabbing something there. Yeah, so let's do a console log params and we should see this on both sides, the client and the server. So let's do an inspect refresh. Oops, sorry, let me go back up page. So there we go.

  65. Hey, how's it going, White Panther? I don't know if I'm supposed to call you that or if I'm supposed to call you Selma. And so I'm just going to does wing it every time I see you. Does Vtor's Feltkit not do a console log like this? It will. On the client as well. So. I see it on the. Are you are you grabbing?

  66. Oh, maybe because it's erroring. That's why it's erroring before we actually come back, so. Yes, that makes sense. So this is the slug that we're trying to work up. So let's go take a look at our podcasts. So we rename these, by the way, streams podcasts. They're kind. Of a nice one.

  67. You're doing what I want to be doing right now. I'm missing all the fun, aren't I? Oh nice. Yeah, well, I have a Mountain Dew, so. I have a Pepsi, but that is not what I want to be drinking right now. Oh yes, margaritas all around. Oh. Yes, that's happening later. Let's, let's take a look here.

  68. When we looped through all of our podcasts, let's just do all of our published 'cause we're, we're filtering by all of our published podcasts. And when we go to number 21, what we should be looking up is a slug that looks like this, which I think so hang on, let me get, let me get another one.

  69. So let's let's do Swix's 21 this one. OK, So now we have there should be there SO2-21 linking your micro services with workflows. So that is going to be looking up for EB 320484. I don't know why it's looking that up, but that's why it's looking at. So let's see in my dot EMV like I continue to not be able to show people which is kind of becoming a.

  70. Bummer the slug was right. It's. The slug database or whatever it's doing that database ID. So I'm wondering if again something in our dot EMV file is incorrect and I'm going to find out. Well that's weird because it's pulling the post in, it's just you can't get the individual post.

  71. But I think that that EB 32 is a different, so it might be trying to pull like recents in 'cause we do like all the recent things too, like recent courses and all that fun stuff. Oh, and you have all of that in there. Yeah, that has to do it on the server side too. So let me find I don't see it in in here.

  72. That is really intriguing to me. Let me I can put my screen back on so we can like look through some of this other code. So index dot spell, we've got the slug dot spell file. This is what you're trying to hit and you're just rendering some HTML once the item comes back. I see. Let's start this.

  73. One more time. Oh, you're going to kick me off? Oh, I'm sorry. Oh no, maybe not. Maybe it didn't. It's interesting. So breakpoints, Do we know how to do those in Svelkit? Breakpoints like debugging breakpoints, JavaScript. On the back end. Can I do it in VS Code? Like put a break point right? There, try it.

  74. I've never tried it, but just try it, see what happens. My guess is we have to set up the whole like run and debug side of this so. Because it runs that on the client. It's running this on the server side. Right, no. But I mean, is that where it normally runs that? No, no. Well, like there's a whole debugging on the client side, but on the the back end where we're actually fetching this data is on the server side.

  75. So we need to set a break point within VS Code and there's this whole like debug listening thing. Maybe that's a good exercise. Can't you just do debug like the JavaScript debug there? I mean I don't think you can pause this, so I you can't do like debugger or anything like that. What does that say when you hover over that? It's unexpected, yeah.

  76. I I don't think it's going to work that way. However, I'm sure that we either have what spell kit debugging.

  77. Debug server in spell kit? Maybe I should search that on this app so everybody can see that. How do you debug spell kit server side code in VS code? That's a good. Ten months ago. Holy. You know, convenient weighted. This doesn't work currently because of how V exports source maps during the dev process. So that might be a thing that is blocked by Vt, but it could have been fixed in the 10 months since that's there's the AT debug tag in spelt kit, but that's in the dot spelt files. That's what you're looking at or no, that's what I'm looking at. You want me to share your?

  78. Screen. Yeah sure, sorry. I wonder if we can actually just do just a normal node inspection. Node is already running, we can't add inspect retroactively. It's easy to start the dev server with inspector, without adding the run script, without editing the run script. Oh, because MPM run dev is already running and so you can't add in a parameter to it while it's running without restarting it.

  79. Is that what it's saying? I think so let's let's try it out and see. So let's go to our package dot JSON and instead. Of spell kit dev, it's the top one Let's. Do that, I don't know if you need maybe, let's see. So I should be able to add a debugger, run and debug. Oh, Nikki is helping.

  80. Let's see, if you add the debugger keyword, the red line is just ES link complaining from their start MPM rendev but through the JavaScript debug terminal. Oh, you were just working on this yesterday, weren't you? That's where I was going was the JavaScript debug terminal. Yeah. Sweet.

  81. So if I do that and then is she saying come back here and I can put it back in? Put it back in, but then the in the terminal there. There's a JavaScript debug terminal in VS Code and I don't remember how you got to it, you just had the options up there. I think, yeah. Click that and that. I think that's just the normal terminal area. There it is, that one.

  82. Why is it jumping out? I have no idea. Let's let's pause this for men and see what happens. Pause or kill it. That's really interesting.

  83. I wonder try to see that makes sense. Nikki was just doing this on his stream yesterday and I will find Nikki's Twitch stream to link out for everyone 'cause that was a good watch so. I'm wondering if I just leave this this way, would that work? I feel like no matter what it's hitting that too soon anyways. OK, maybe I will hunt down this page and we will do a whole debugging section next time.

  84. Page of ID and that's the database ID, not the page ID. So yeah, pages are all of the items in a Notion database. So is it the right item ID for that page that we're trying to hit and the slug is correct and all of the yeah. What I was going to do is go look up in our streams for 21.

  85. This is our page. And so kind of back to that whole Notion thing, how do you get an ID? If you go into Notion and click share and then copy link this, this is the actual ID right here. So EB7525, is that what's in here? 7525 that's correct and it can't read that page, so it's like it's not accessible. Yeah.

  86. So let's see under the share here we have our development or our CCD. It says mixed access. Oh so we can edit as the CC DS felt kit? Yeah. So let's let's take and click share here and it says can edit CC DS felt kit. So that's like all the accesses. My only other thought is maybe I had issues with this before where like dashes were showing up. Maybe that's the issue?

  87. Dashes were showing up in the URL. In the ID for the page. So like here. See how this doesn't have dashes? And it does there. So let's go ahead and we'll do the old manual some. JavaScript rejects and extract them to match it. Say, say that again, I'm sorry. Could you use some JavaScript rejects to extract the dashes?

  88. Like remove the dashes. I think we just do not slice but dot replace on that. Dot replace, yeah, yeah, that would work. So let's go find where this is happening so we get the H to know. If I ever build a site on spell it will be your fault. I think that's like a compliment, right?

  89. That is a compliment, yes. And unfortunately we're not even really showing this felt part here. We're having trouble hitting the Notion API. We're getting there, but hopefully this will be easy or at some point. So we, we did our search. It's supposed to go find it by slug. And then I don't get the whole because it's already got the data there. Oh, right, blocks.

  90. So there's this whole blocks piece to this. So then you go to format posts and this is this is kind of a interesting fun part of this. What is this doing? This is. Grabbing let me back on. The page. Yeah, let me. Let me back way up. So on Postman we could show this. So let's now that's keys.

  91. Again, I don't want to mess with keys. Let me do this this way. So at slug dot TS let's just follow this path. And take that debugger. Out anytime I I pair a program with Brittany, if she sees red line she's like fix that. I'm like, I can't. Stand. Them when we do this call, what we can do is right here at the notion dot dot notion client dot databases query. Let's take a look at what actually comes out of this raw. So let's do let's do a console dot log and then you can actually do Jason that stringify. So we actually see the whole thing raw and then it's like level one, right, Something like that. We'll just.

  92. Do oh, it's too common null, right? Is that what it is? It's something so it like formats it kind of nicer. Yeah. Oh, no, I don't think that's right. No, it doesn't look great. Stringify. Oh, I put the two in there. Sorry. I'll just do it like this for now. But here is the Jason payload that came back.

  93. I just want to show people this so I'll drop it into VS Code. Oops. VS Code's going to make it pretty for us with Jason. Ah, nice. This is this is what we have in here, this big old mess and what this actually is. When it's searched by slug, it only brought back or should should only bring back one post.

  94. So the result here is a single page, and that single page has this ID. And that's the ID that it keeps complaining about that it can't find, even though we just checked access and we're pretty sure that you can find it.

  95. Are you reading all the comments 'cause I'm not keeping up as we're going? Yes, I am. OK, so for most of so if you if you used like markdown before, you can think of this as all of your perm, not primal. What's that grey matter, right? So like your grey matter. Front matter. What's that?

  96. Front matter? What's grey matter? Grey matter is like green splatter, right? Grey matter is the package you can use to on pack from. Oh my God. It's gonna be one of those fun days, I'm telling you. And we've already clarified we haven't been drinking, just Mountain Dew, so. Not yet. We're gonna start early.

  97. You can think of these as kind of like your page properties. The only problem with this, and not really a problem, but the thing you have to know is even though we got that page in our search, there is no actual like data or like the page content itself. This is just all about the page.

  98. So what we actually have to go and get is the page blocks that build the page up. And so that's kind of the next part. So, so at this point we've we've done our go get the page and then we take that and send it through to format posts, format post calls format post.

  99. Oh, zombies, I love zombies. No, I don't. They frighten me. So in format post, we can look at that. And in here it's putting all those different properties because we had already been calling this from several different back ends. We did sanity, we did builder. It's kind of a mess.

  100. And so I had to kind of stitch it back together. So like I had to put things in like cover video actually comes through as this and I've got to like just slam it back into cover video. So this whole formatting piece is just going and getting all of those posts put together. So that's that's the whole like here is just the post data part.

  101. That POST data is grabbing off of that big Jason object that you just showed. Yep. And so if we walk back up the tree, so let's go down one more time. So now we're in here, we say, OK, well now that you've gone out, you got the data, you've put it all together, 'cause our data is a mess, you cleaned it up. Now we're checking.

  102. Do you actually have results? Yeah, we have results. Now we're going to actually go and fetch this URL and so that URL right there, that should be the correct ID. And I think this might be where our problem is. So I think this we'll see that same ID that we were seeing over here. So let me bring that back up.

  103. It's not saved. This is saved, Jason. It's not safe. Oh, I see. Let me let me just comment this out so we're not getting such a mess in here. OK, so now we have in here. Here is here's the ID that we're we found here is the URL that says linking your micro services with blah, blah, blah, blah, blah. And so that's where we're going after to set up the rest of this call.

  104. So right here where we say raw results go get the URL, this Notion page to HMHTMLI believe is looking for a page URL. So you'll see this page URL right here. Now I don't know what this package does. Someone suggested that we try this out so. Notion page. If we go take a look at this, I'm guessing that it's not using the client API.

  105. So the the there's 22 versions of kind of the Notion API, if you will. There's the non public one that they use on their page. And then there's the public version, which doesn't do everything that they do. And then what a lot of people do, which I'm assuming this package probably does, is they actually go try to scrape a public page. And so my guess is if we take and create or take and look at this and we share this and just make it public to the to the web, if we now try to run this, my guess is this will work. It didn't error.

  106. There you go. Look at that. So it's that package isn't actually looking for the data. So on on our stuff that we use can. We just write a utility function or something that will do that. Yeah, we can. Or use a different package. OK, so we just need to do something and not have each page be public because then anyone could go in there and edit it.

  107. No public you can leave editing off. So it would be leave in public. I just I we're probably not going to. Yeah, and that's a lot to go back through too and make public. Yeah. And I like using like the standard APIs that they're providing to developers 'cause then we find out things too and find out our limitations and all that fun stuff. So we are actually kind of doing a very similar thing on Coding Cat, but we actually go out and fetch our our guests as well as our perfect picks and we concatenate all of that together onto a single page.

  108. So if I were to take a look at Coding Cat for the same post podcasts #21 what up, Sean? If you're, if you're floating around here, here's the actual questions that we're looking at right now. That's the only piece of that page that comes out. Oh, OK. Yeah, you're just grabbing that one piece block.

  109. Yes, so to speak. Yeah. Actually it's it's all of the blocks for that single page. And then we go say, OK, we'll go find all of our guests. And actually, since Selma's out there, maybe we should show off. She was on Women of Jam Stack and we actually do multiple guests on that one. Where did that go?

  110. OK, Command K folks use it. I love using it. Command K gets a search and you can go like that and it's not showing up. Did we not release that yet? Oh, you haven't released it because it was a live one. It's on YouTube, but we haven't released it. So our podcasts are live on YouTube, but then we kind of re release them in a weekly cadence.

  111. Yeah, that's right. Sorry. So let's let's look at let's look at one of these two. You could see it in ocean but. So this actually fetches all of our guests and you can see how it all comes out. This one is hilarious. This was one of the greatest, like Friday afternoon podcasts we ever did.

  112. Hanging out with Alyssa is always fun. Just that one Angular on air. Check it out. You can't. Even see a conference soon? Is that the one that she's in seeing? Yeah, awesome. I think she's doing Ng conf. Angular on air it's what? You so Angular on air is their podcast and then with Shorty and then Ng comp is the big angular conference that frosty kind of started and it's ballooned.

  113. So all the angular peeps are there. So back to my original thought as we go down a rabbit hole. So here is linking with linking your micro services with workflows. Cool talk by the way, Temporal, when I look at this, it also has an association here. So that's where we're fetching Sean's details.

  114. So we actually just keep pages up to date and I'm realizing I'm showing emails. Oh shit, sorry that one doesn't work. Anyways, he's not there anymore, so we're good. So when we go grab Sean's page, it actually has all Sean's details, his profile. So anytime we have somebody on, we can just tweak that.

  115. We don't have to keep like going and creating on our page over and over. And then we also have our perfect picks, which my son has been so kind to update all of our perfect picks into a database. Finally. I think he's most of the way through it. Brittany can attest we've gotten a bazillion alert says he's doing it so we can go look at all of our perfect picks for every single episode now.

  116. And what we do on this page, we look up the guest pick and Brittany and I's pick for this specific episode and we glue that together too. So there's a bunch of stuff going on in the back end before we like even throw it up to the front end, at least for coding cap. So to keep it simple though, what we can do, Brittany, we can do this kind of two different ways.

  117. We can leave this just as the HTML that comes to us, which is fine for now. And then we can work on block stuff later. And then we can just start to put the tailwind piece in. So we can actually like get a cool looking UI instead of what we have. Yeah, let's do something not messing with Notion.

  118. OK, so do you want to drive this or you want me to? I will. Do you mean like do the live coding? Just as far as you had some trick to install. Notion I do have a trick yeah, I'm looking that up right now so I make sure that I do but it's going to be spell add is the command that we're going to use so in your terminal you are going to have to shut it down OK and we're going. Because I know I had a hard time seeing it when I watched it back.

  119. Put it over in the private chat, the command that you're going to run. Sweet. OK, so it looks like we're using. Oh, this isn't even the normal CLI, so they have just an MPX command all on its own. They have a spelt add command for some popular packages that will set up all of the configuration for you immediately.

  120. Like you don't have to do anything which is super. Nice, that's cool. So I'm going to click that cross my fingers type of thing. I I hope this magic works. It's going to install a bunch of node modules for Tailwind. Let's see what it changed on package. Let's take a look when it gets done, set up and repaired.

  121. Oh my goodness. Yeah, because you have to install post CSS, you have to like this is all tailwind stuff. So you have to install Tailwind, install, post CSS install. What are the other things? You have to have a Tailwind config file, you have to have the post CSS config file, and all of that should be done once it's done installing all of that. What's it saying underneath our?

  122. Face saying it can't be guaranteed to be fresh. Maybe it is, maybe it isn't. If any issues arise after running this command, please try again. I think some issues arose because. Are you using YARN? I didn't use yarn, but. It used it detected YARN and ran that by default. That's MPX that did that. Then because you have YARN installed on your system, it just did that.

  123. Oh, interesting. The the weird thing is, it didn't. You don't have a yarn lock file. So let's just double. Check. Tell me is right there. Tell me is right there. Oh, am I blind? Oh, it's in our dependencies, not not dev dependency. Thank you. No, it is in dev dependencies. Oh right, because the post CSS.

  124. Where is post CSS? When it runs I mean. No. Oh, there it is. OK, yeah, it's all in dev dependencies. So it all installed everything. You've now got a post CSS dot config dot CJS and that's one of the tricky things with spell kits because it uses ESM. So having those common JS config files was a big pain in the butt when Spilt Kit first came out, trying to configure all that on your own.

  125. So this command will run that and do all the common JS things that you need. Nice. I'm going to actually do a commit undo because I think it's snuck in. Yeah, that's that's what happened. So here's all the things that added. Oh, OK, Yeah, there you go. Cool. And then I'll then I'll recommit. So now we can splash around Tailwind or can we install Daisy UI 'cause I'd like to use that first? Well, let's make sure that Tailwind is working before we do pile on Daisy.

  126. Make sure, let's get. Yeah, so we probably have some issues. Can't find modules, so you need to run an MPM install that's. Why? I was just going to say you are on it. I am sometimes. You're always on it if you ask me. That's why Network I hired you. Hey guys. How's it going? Who is Emma Huggins? Do we know Emma is?

  127. Mark, is that right? Am I saying it? Is it Mark Huggins? I think so. Is it? Is it on? Yeah, I think so. Cool. Yes, that's right. I yes, from lumber the seat. Run Gov Gatsi. We are doing some spell kit and some Notion API stuff and now we're installing Tailwind and we're going to try Daisy UI. We have Tailwind running on our main site right now, but. Do we need to just try a little tailwind command? Yeah, so let's open up the SRC folder and the routes and look in the layout file and see if it connected the CSS. It did.

  128. So it imported your app dot CSS for you, which should have your tailwind stuff also. So tailwind should be working if you like. Tried some tailwind around something in the HTML somewhere. Let's go. Index and make something fun like I don't know oh, colors are going to be weird because I'm so used to our primary, which I think Daisy UI uses. So let's see if I do class, Oh my gosh, I don't have to write class name.

  129. No you don't. It's just HTML. React world baby. This is awesome. OK, so back BG slate, no something fun purple. Purple. Try purple. And yeah, there we go. Let's see what happened. It's probably going to be some awful colors, but oh, not terrible. I wish there was a package anytime I put like background purple and just makes the font the correct color like here you go.

  130. Oh, like get grabs the correct one. You could probably do like some sort of alias or something that would do that. Remember when we were using Nightwind like yesterday, how it would flip? So if we had a primary color that was very light and you went to dark mode, it would just automatically calculate it.

  131. Yep. We should do something like that. That'd be cool. All right, let's do Daisy UI. OK. And I know Scott Spence uses Daisy UI all the time in Smell Kit so I am going to try to find. I'm going to do the NPM commands so NPM installed Daisy UI. So I know Daisy is a little more opinionated than tailwind.

  132. I don't know how much Daisy. Is AUI component library, so you have like actual components where Tailwind just provides you the utility classes that you can create components with. Daisy has the full-fledged stuff. And the cool part is that Daisy is still using Tailwind under the hood. People are just creating these components. So a lot of pre built stuff, but you can keep going with Tailwind on top of it.

  133. So it's one of the best ones I found. There's a ton out there. So there's also headless UI. So I think that is. He actually uses it in his Jam Stack Explorer course that he does right there. Yeah. So here's here's headless UI as well. So that's I think this is by. That's. A Yeah.

  134. So this is by Tailwind Labs. This is another cool one for components. That one's not paid. Tailwind Labs is paid. Yes, exactly. OK, there is a spelt tail headless UI too. So we have spelt components with headless UI if you wanted to use that there. Is that's cool? So if I look at like, oh, they're just not like listed out here yet. It's not a headless, it's not from headless UI. One of the commit community members ported it over to spelt though and rent it.

  135. So spelt headless UI would be where that would be if you wanted to use that spelt. Really cool UI.

  136. Sweet. Well, good job. I don't know how to say his name. It's RGORRR Hargua. Hargua. I hope. Our our quest, I don't know. OK, there's a link to that. I'm a poor American. Is is headless UI framework agnostic? I believe that they have one for each framework. Yeah, yeah. So because, because Tailwind is just CSS at the end of the day, it's all framework agnostic.

  137. The cool thing about did I close headless? The cool thing about headless is they actually provide the React parts of it though, so you can copy direct. Let's see here. So yeah, see how it has React in view. You can actually get the code directly for so like class name. That's a very tell telling sign that that's a React right there. And then if we go over to view, I should flip it and show you the view code, which is a little more challenging, at least for me.

  138. Here we go V slot. That's a good call out. So it gives you the actual like code for those items too. Now Daisy, I don't know, I think it's just straight cssi believe Daisy. UI OK. I go to an alert. What's that for HTML? So yeah, it's it's just got this kind of set up where it's just using Tailwind straight classes. So you're not going to get like if you want to use Daisy in React, that's not thing right now. I'm sure they could do it because it's it's very simple to like set that stuff up.

  139. Yeah. So the cool part is if we ever want to use headless UI items too, they're just again, CSS, we can drop them in anywhere. There used to be a big community like Hailwind Components, I think it was called, I think it's this one. Yeah. So this is like a community driven one. If you ever like are out here and you want to check out something and grab it totally open, definitely try to give props to these people. They work really hard on making this stuff. And yeah, All right.

  140. So I think with all that said, Daisy has a very specific way to do like their layout. If I remember it's, it's been a minute. OK, but you're going to have to configure Daisy to work with Tailwind too. Yeah. So we need to add the plug in for that. OK, this is just talking about it and so let's do the config. So it's got the Daisy config here and then these are optional.

  141. What do you think? Let's just throw it all in for now and see how it goes. What is this? Those are optional. Let me see I. Think it'd be cool to have like the styled ones so don't have to style everything right off the bat. So for folks just kind of catching up or if you hopefully we put chapters on this one. So if you are looking at the chapters, hopefully you just jumped into this at section of how we're installing tail one. Basically we ran NPX felt dash add at latest tail one CSS and that put tail one in and it configured it all correctly, which was wonderful.

  142. We then ran NPM, installed Daisy UI, and we're just about to add Daisy UI as a plugin to Tailwind. You just need that that I just put in the private chat in your Tailwind config. So in the plugins you just need to require Daisy UI and you don't need that config, it's all optional. I think I I think I grabbed all of the cool. So I thought there was.

  143. I thought they had a layout component. Maybe I'm crazy because they have specific like themes I believe. Yeah, you can like swap out the themes really easily, so maybe under the themes tab. Maybe maybe we should mention also that Oh yeah, here it is. We should mention also like why I kind of like Daisy UI and this is something when we were building our site, you, you kind of were like, why don't we, why do we keep writing all this classes? Why don't we just create these components? So what they they've done, and the reason that I kind of like the idea is the same reason you were saying it before is instead of all of this stuff, for every single time you put a button in, you just have a single button, which Brittany did on our site. She did primary dash button or button Primary I think. Yeah, something like that.

  144. And so you make utility extra utility classes that include the utility classes. Yeah, which is cool it, it definitely simplifies things. And Daisy UI is doing that for us on this. So which is nice because then we can just theme Daisy and hopefully use the majority of what they have and then add our own.

  145. This still does add the same complexity problem though, where you have each of those on one button. Unless you create a button component that is your atom, you're still going to have to change that in every instance of your button. You mean the like having the button primary piece too? So like if you created a component called Button and you put that on it and then created props for primary and secondary and had it update the class based on which one you put into that component.

  146. That's like making your button atomic. So you have like 1 button that you're using everywhere on your site. So you just have to change it in one place. And that's what I was talking about with Tailwind. And it would be the same Problem here is that you would have to go and find each button and update your classes unless you create that one atomic button.

  147. Yeah. And so you wouldn't consider this atomic though, because it has button without like a theme and then it has kind of a themed button. And if you ever needed to update it, you could just update like the necessary parts of. Them but you. So if you need that one button changed, yes.

  148. But if you have that button duplicated on multiple pages, then what are you going to do? I mean I would just update the button primary piece right? Maybe I'm maybe I'm missing what are you're adding? So if you if you have a button that's on multiple pages or routes or like in different areas, you're going to have to change that button primary in all of those spots if you're updating the code for all of them. So if you have if I wanted to like look different, right because color.

  149. You would want you would want your your theme to stay consistent through your site, right? So you would want your buttons to have like a primary or secondary. OK.

  150. I don't know how I can explain that. Different. I know I'm I'm missing something and that's fine. I would consider this at the atomic level because it's just a raw button at that point. It's it's a raw button in one instance though, unless it's a button component. Which has. Been reused. That's what this is at this point. So that's that's the.

  151. Are you going to drop that code straight into a button component in yourself code? Yeah. OK, OK, then it will be. Let's do that real quick. Let's try to do. This I, I think we're, I think we're saying the same thing. Let's so so this is this is the code that I plan on us using over here.

  152. But you're using it in a file in a page. Yeah. It's not atomic. So that that's interesting like definitely want to talk about that more. We should probably like where we at. We got 20 minutes for 90 minutes. How far do you want to get with the actual like visual? And then maybe we do a whole atomic discussion. OK, just just get something on the screen and then I'll I'll show you what I mean.

  153. OK, so there's our. There we go, we've got the dark screen that is not accessible now, no. I'm surprised it flipped to dark. I wonder if I you. Had that purple in there, so maybe take that purple out from the tailwind code. Pick that out. So that's wondering on our button, I'm surprised, I guess that's accessible.

  154. That's that's probably accessible. It was that Gray text on that purple. Oh yeah. Yeah, that was my bed. Cool. So we have we have a button and if we ever wanted to change that to be like our button primary, we can go like that. And then we have it. And the cool part is if we ever want to swap this theme out, we just like on my Alex Patterson, I'm actually using this, this is Daisy. And we can swap that theme out to like whatever the user wants or just something we want.

  155. Brittany told me the other day. I don't know if he can hear it, but when you change themes on my site it purrs. It purrs and then if you do them like really fast, it's like on top of each other. It sounds really funny. I can't hear the purring sound of. The cats, right? It does. It sounds like tigers running across your.

  156. Headphones. Oh my goodness. Cool. So where do we want to take this? Do we want to try to make it look like our page? Or are we in like redesign mode and we can show off some tailwind goodness? Because I try to design this page. Or what like where we can just design on the fly? Right. Yeah.

  157. I think we can just design on the fly. We can see what we want, but I want to do that from, like I was saying, the atomic level. So I want to start with the component. So if we're designing our button right now, I want to break this out into a component first. OK. What does? What does that mean for you on top of the component that we're using here? So that that you're using is not a component that is an HTML element.

  158. OK, I'm talking about making a spelt component called button dot spelt. And what's the what's the advantages of using spelt components? So then you just have an atomic component. So that component's going to have that same code, but you can make a prop out of primary and secondary and you can update each component instance to whichever instance of the button that you create. So you have one button in one place to update your code. And that's so.

  159. So that's like we would pass this class in to get that then. I can show you more than I can like explain this and tell you. So we want to create a place for our components. So I was talking last time about the convention and spell kit of having the Lib folder, but we can do it wherever we want.

  160. So do you want to in the SRC directory? I want to do it however you guys usually. Top top level oh at just like we usually do. So in the SRC folder create a Lib folder we'll. Make this very very felt friendly. And then components folder inside of that. Because this way we can use the default aliases without setting them up too. We can use that dollar sign Lib alias. Oh yeah, that's right.

  161. So inside of components now we can create a button dot spell and the convention is capital B. But it's preference. If it's a component, it's capital B. If it's a route or page, it's a lower case. OK, love it. Cool. OK, so now you can cut that button that you just put in index dot spelt. Yeah.

  162. Or just retype it. Either way. Cool. OK. And so here what we want to do is we want to create two props, right? We want a primary and a secondary button is. That a script tag. So you script tag Yep. And you export the props so that they're accessible by other components. Export let. You can do primary and then secondary. We can do this a different way too. So take export out of that and then put secondary on a new line and put let in front of it.

  163. You have to do this part separate. So do let primary, let secondary and then underneath that do export and do curly braces primary, comma secondary. Cool. OK, so now we need a way to make that primary instead of it being static there that needs to be dynamic. So we need to wrap that class in back ticks to use template literals.

  164. Is it the whole class you want to wrapped or just inside the value? You're you're going to have to do the whole class. OK Oh I'm I'm sorry, the whole actual class name, not the class equals part now Now do backticks. I'm sorry. Yep, and then BTN and then BTN dash. And do whole. Yeah.

  165. And the you're going to. How are we going to do that?

  166. You can set a default if you want. Yeah. I'm trying I, and again, forgive me, this is this is your world, not mine. I'm trying to figure out the advantage of this over just being able to specify like primary, secondary on all of the buttons. Because those live in many places and they still live in many places, but you have the ability here to set what your atomic level things are.

  167. And. You could change anything about the button, the padding, the stuff from one place without having to go to each instance and do that. Gotcha. So like it's, it's if whatever we wanted to change all of our buttons instead of having a block or whatever they come out as. So instead of having them all be large, yeah.

  168. So that's in one place instead of it being. I'm slowly getting there, see? Sorry. I know that was a little convoluted, but I. I think what I would actually do then maybe I'm still trying to think how you would pass this in all over the place, but I might almost just allow the whole class name to be passed.

  169. Oh I know how we would do it. We would create a ternary and we would say if primary then do button primary, if secondary do secondary. So in inside here you're in JavaScript land. So primary question mark and then you can do in quotation. Marks primary, are we just going to do the two? Because then I'll just do an order. I think for now we just need to, but I don't know. That's the advantage of having it in one file though. You change it in this one place and it'll update everywhere. So you need that in single quotes or in like some kind of quotation marks because that's going to string that. Value to this right?

  170. I mean you can by default, so you could put something in there if if you don't have either one of those. So if it's not primary then you would do just primary.

  171. So actually if it is primary, we would use the value if it's. Not no. You actually need to use that in quotes like you had it because what this is doing is concatenating button to primary. So it's going to say button dash primary if primary is true. I was just thinking like if if we wanted to pass a different value and we would then set it.

  172. If you wanted to set primary to default, you would just set it to true up top in the script. So let primary equal to true and then it's going to default to the primary value. And that's that's not what you want to do. Take take the first strings primary and then do an or

  173. secondary. And so up top you're going to do let primary equal to true. So this way if primary is defaulted to true right now it's going to concatenate that BTN dash with button primary. Yep, cool. So now if we pass secondary in, it's going to pass the secondary piece in. So you actually don't even need that secondary variable right now.

  174. It's not being used. Does JavaScript run like? Do I have to put anything in here? It seems like like this of HTML but in order to run a string like this. It runs once you have curly braces, so that dollar sign in front is not right I oh wait. If we're if we're accessing any variables, I would have to do this, but we can we can put another one in if we want.

  175. Yeah, let's put another one in and then. So you do need, you don't need the dollar sign. You need the curly brace and then the back tick. No, go back, go back, go back. I meant undo, undo. I should be writing this. I'm sorry I. Thought I thought you have access to. Me so put I do where? Where are we at?

  176. You're in button dot spell. Button dot spell. OK, that would be way easier wouldn't it? There we go. OK, so I thought you were just tired. Today with the like the kids pool stuff. I'm sorry, sorry. So OK, so now we see that we're in JavaScript world when we get this first curly brace. So we're going into JavaScript.

  177. We're doing a template literal and we have a string. We have a string BTN dash. And then we're checking for the primary value. And if it's primary and it's true, it's going to put that primary right there. If it's secondary or if it's primary is not true it will. Oops I didn't mean to do that. So that is our button and we also need BTN here also right? Because it's button and button primary. So we're going to do that for all of the values then because they do have they, they do have defaults I believe already on there.

  178. So like if you didn't put primary, it would come out. But we're we're kind of saying that modifier we've just set up. So we can create this second one as a value and you could do an array of things that are available instead of secondary here and then it would pick from the array.

  179. But that would you would need some kind of function to like do that. Yeah, I feel like then we're just reinventing what they've already invented. Yeah, and you wouldn't want to do that because then in each instance of your button you would be picking a different thing. How would I, how would I like actually use a button success then if we wanted?

  180. I see what you're saying. That's where I'm like, I'm kind of against this whole like atomic piece because we want certain things to happen in certain places and that's why we coded. Them we have to create props for those so. You just need. I just I feel like this is the prop already.

  181. Like that's the part I'm struggling with. I don't know. So you're saying like that's the app already? So am I crazy? Like I feel like the utility class is already our our prop.

  182. OK, cool. I I like where we're headed though. So that is that kind of how you create a svelt, this is svelt component at this point. There's a spelt component, yeah, so. Is there anything more to spelt components like react? I get the props thing. It looks like anytime you want to execute JavaScript you just put a curly brace which is exactly like react JSX or JSX. Thank you.

  183. Is there anything else that might be different than JSX world? There's some different. You don't have to return anything. So anything under. So you have a script section for your JavaScript. You have your markup section which is just HTML. Once you have a curly brace, you're in either spelt templating or JavaScript.

  184. So like you use the pound each the other day. So that is a spelt templating block. There's also an if block and an async block. So you can use those templating blocks in that markup section. And then there's also a style block. So if we weren't using Tailwind, we could come in here and we could say button and create some styles on this button.

  185. And even though I'm using the element selector here, this is scoped to this component by default. So it's it's like CSS modules without having to deal with a separate file and having it. That's cool. So would you mind just putting something out there and I'll, I'll show the screen where because I think it'll put like a little hash CSS in there? Well, that's an ugly color.

  186. Let's do that one. Let's take a look where. Did it go? It's not overriding this though, because this is, so I'd have to cut this out, I think. Let me cut the whole class out. Whoops.

  187. Cool, cool. We're not using that. Button. Oh, you're not using it? Oh yeah, I'm like what is happening 'cause that probably. Would have yeah. So this is a good point. How do I import spell components? OK. So like in your index dot spell file, OK, I'll do that. So over in the index dot spell file for podcast is that's where we're at, right?

  188. We're just at the main page. Yeah, the top level. We're going to do import and we're going to import the button from and we're going to use this dollar sign Lib, which is kind of funny, but this is what comes with Felt Kit by default. So that's just passing that for us without having to do the dot dot slash. So this will get us to that Lib folder, and then we need to go into components folder and then that button dot felt file. And sometimes the Intellisense does the little red lines and then that and then where did we want to use that button? Wherever.

  189. Yeah, just actually throw it at the top of that because that's getting pretty long. OK, I will. Oh, not that. Whoa, he did some weird magic just now. OK, so I held alt and it will move the line and so now we're using the button and did I take the class out, save that and it did it just change?

  190. It did, we just lost the Daisy styling, right? Yep. So if you put BTN, you'd at least get the. Rounded for one room, I mean that and border radius, I mean, yeah. Cool, so it's hot module as well. Room 0.50 Yeah, the hot module reloading is done by V and it is really, really fast. He's he's super fast.

  191. So the other cool part if we. So here, hang on just one second too. I want to go back and do that button and put. Let me just show him the the CSS part and then. OK, yeah, show that and then I want to show the Daisy UI how we could change that prop. So what Brittany was talking about, when it's localized CSS, it actually appended. Veet does this I believe.

  192. So it appended this kind of hashed CSS class right here. And if I do a find that is the actual style. That's actually spelt that's doing that. Oh, is it OK? Cool, So I didn't realize the bundler wasn't spelled. That's awesome. So at this level, you can find that style and it's calling out exactly what she wrote in here. And the nice part, if you look at this, I don't know how you wrote it.

  193. Hopefully it's Tailwind, right? Nope, you didn't. Maybe. Where? This. OK, I never mind do that and tailwind. I didn't know if Tailwind would automatically come. Up Oh, so I could so I could do at what is it at apply Yeah. And BG, I don't know what they're pink. Let's do a pink 600 and do text white P4 rounded large. Yeah, that that should work.

  194. Oh, but you have to do Lang equals post CSS maybe. Yeah, that worked. Yep, so the cool part. As Brittany put in Tailwind and applied it to this, it came out as actual CSS on the other side. And can you show real quick where I did that Lange equals post CSS? Am I covering up? No, they can see it OK.

  195. Yeah, they can see that. So it comes through as the regular CSS classes. But if you go back to the code real quick you can see that I had to put Lange equals post CSS here because it wasn't reading that at apply because this is regular CSS until you specify the language. And so the same thing I saw in one of our things.

  196. You have to do Lang equals TS up here if you want to use TypeScript and not get yelled at. Those are great tips. Like we should just zoom a whole chapter right there. Hot tips. OK, those are hot tips. I'm going to undo a bunch here and get us back to the Tailwind Daisy UI classes and I want to show that prop. Cool.

  197. OK, save that, go back over to our podcast. And so right now primary is true. So we're using primary button. Is that what that's using? Yes. OK, button primary. So if we do primary equal to, let's see if that doesn't work, we need false save. What happened on our screen? Nothing. What's coming through I can't see for our faces. It still says primary, so you have to refresh to pull in components Or is it hot module?

  198. Should be hot module. Oh I didn't save it somewhere. I think maybe I'm trying to find where all my got too many tabs open. So button button primary then it's primary. Oh, it's always true. But I'm passing it in and saying it's false. Where Where is the button right here? Does it have to be JavaScript? That's what I'm wondering.

  199. Yeah, I think so, because otherwise it's a string and it comes. True. Yeah, OK, now it's the secondary button. Cool. And so for like for our our buttons, So let's say for this component, I wanted to use a success one in in my head. And it's very I'm a very simple person. Unfortunately, you're not.

  200. This simple person, I'm just not explaining it very well. I I would actually like put the value of success. Yeah, I I see what you're saying. But then every success button that you have, if you ever changed one thing about it, you would have to go find every button success so. Would.

  201. You. So we need to. Make another button that's specifically a success. I would just set it up to be props so that we would have everything living on that one thing and you can do classes in spelt that will check for certain variables and if those variables exist then it will put specific classes on it.

  202. So it would just require more code in that button dot spelt component and we can look at like a headless UI component and stuff and see how that's done next time. That's why I was thinking, let's do a whole like atomic piece to all of this next time. Yeah. Please let us know. I know there's like 5 of you still out there. If you're enjoying this, getting anything out of it, We love doing it.

  203. We love showing stuff off and it helps us create tutorials at the end of the day. And Brittany and I get to hang out on Fridays now and she doesn't get too mad at me even if I question atomic stuff. I'm not mad, I'm just frustrated at myself for not explaining this very well. No, it's me. And I'm going to look it up and we're going to have a better explanation next.

  204. Time. I know I'm excited for the next one. So yeah, let us know. DM either of us on Twitter, Codercatdev or Brittany Postma, all the ways you know, come check out our podcast please. We, we would love sponsors on that thing. We're still looking for one more for the end of the year.

  205. Anything else? Any other shout outs you got? You got more things coming. I I don't know the spell AMA. The Spell Origins premiere is next Tuesday and I'm hosting the AMA. I know Rich Harris is going to be there, Gauchermo and Sean's not going to be there, but there's like several of us that are going to be there at promoting right before the premiere of Spell Origins, which I'm hoping I'm in. I haven't seen it yet and I'm very nervous because I didn't get like the clip.

  206. They're like, we'll send you the clip before so you can see what it looks like. I've never got it, so it's just going to be out there. Nice, I I think I saw you in here somewhere. Oh, my face is like, right, Yeah. Can you share that? Because it's like, I literally died. I was like. I can't remember where you were.

  207. I was like, oh, that's, that's. Pretty it's on on the regular spell origins page. Like there's a big picture of all of us together. Spell Origins. I have it in the e-mail. I'm very nervous to show my e-mail. Oh I'm sorry, I thought I was sharing my screen. I was showing the video.

  208. I have it. Let me share. Oh, you got it. Is it? It's. No, that's not it. Oh, that's not it. No, that's the trailer. There's the did I just Add all of us? I didn't. OK, so let me Scroll down. But like, I just died. Yeah, you're out there with some amazing people. Right. Oh, yeah. And Scott Telinski is going to be there, but Sean will not be there.

  209. But the rest of us, I think, will be there on Tuesday answering questions. I'm mostly, I'm very nervous. I'm very nervous because the kids are home. So happy there's some diversity on this page. If it was another white dude in your spot it'd be so frustrating. It would be very frustrating.

  210. So I'm very glad that they're welcoming, inclusive and are adding some of the fun things and that's why I created Spelt Sirens to have that so. Yep, love it. So check out spelt sirens too and and check out coding CAD dot dev and we'll see you next Friday and peace out perfect peeps. Cool coders.

  211. Crazy cat coders. Yeah, one of these days is we'll actually figure that out. We need like a weird like run of us like saying all the names. Did you just switch the brand? Yeah, 'cause I was going to do this.