Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Stephen Dolan
    @stephendolan
    I think I have to hit some arbitrary YouTube milestone to link out to external links (right now I can only link to vids), but I have a Trello card for diving into Procs and plan to add a little link in this video once it's published :)
    Jeremy Woertink
    @jwoertink
    Stephen Dolan
    @stephendolan
    No idea that even existed, thanks @jwoertink !
    It's hard because I'm not sure how much to "spam" the Crystal community at large with Lucky-specific screencasts
    (Don't worry, I'll have no mercy on this chat :wink: )
    Jeremy Woertink
    @jwoertink
    Yeah, if you look through that forum, you'll see other youtube vids that get posted. I'd say posting one a week would keep wanting more, and not make people feel overwhelmed
    yeah, spam our chat with these! :rocket:
    Stephen Dolan
    @stephendolan
    Cool, that's been the strategy so far! With work and house renovations I wouldn't be able to crank out more than one per week anyways :smile:
    But maybe one day....
    Paul Smith
    @paulcsmith
    @stephendolan Yeah I'd post to the Crystal stuff. Lucky is cool so Crystal people should like it :P 😂
    Also I'd be curious to hear what you think of the gist I posted. I haven't used it or the version you posted so I'd be very curious to hear which one you prefer and why so we can help explain the different approaches and pros/cons
    2 replies
    Paul Smith
    @paulcsmith
    @stephendolan in reference to https://gist.github.com/paulcsmith/180bf202509b926c914e92bd137700de where I used with_defaults similar to the Shared::Field component. This way the classes are set automatically which I think is kinda cool
    But also the Proc for passing actions, but mostly looking for feedback on with_defaults for use with buttons
    Stephen Dolan
    @stephendolan
    Ah, right! The only thing I struggle with is how you let the component define the classes on the link itself, since wrapping a link in a button won't make the whole clickable button area an href
    Like I'd need a way to produce <a class="btn" href="#">Test</a>, rather than <button class="btn"><a href="#">Test</a></button>
    Unless this is just me needing to learn more CSS/Tailwind :smile:
    Paul Smith
    @paulcsmith
    I’m not totally sure I understand. When using “with defaults” you can use whatever method with it. So you can use “link” and it’ll apply the class to it. So the whole thing will be clickable :)
    Stephen Dolan
    @stephendolan
    OH, no you're right
    Idk what is so difficult about that structure for my brain to comprehend, lol
    Paul Smith
    @paulcsmith
    It is weird. Definitely not just you.
    Stephen Dolan
    @stephendolan
    For some reason I just find calling the proc with args much more straightforward, but your approach feels cleaner
    Paul Smith
    @paulcsmith
    I try to avoid it but I think for inputs and buttons it works. Just because there are so many tags you can use with it and so many options
    Stephen Dolan
    @stephendolan
    Right, like if my component wants to make the target="_blank"
    I'd have to add a new param to every caller
    Paul Smith
    @paulcsmith
    It’s weird but flexible and a bit more concise.
    Stephen Dolan
    @stephendolan
    Rather than just keeping the signature the same
    Paul Smith
    @paulcsmith
    Yeah exactly
    Stephen Dolan
    @stephendolan
    That's really nice. I'll try a refactor on that composition LuckyCasts repo and see how it feels to add a few more pages
    Paul Smith
    @paulcsmith
    The other option is bite the bullet and make button classes with @apply but it’d be cooler to keep it all in Lucky if it works!
    Awesome! Thanks. Would definitely love feedback on it
    Stephen Dolan
    @stephendolan
    Yeah, I've just heard Adam Wathan absolutely shred using @apply with Tailwind so I'm trying to compartmentalize stuff into built-in components
    Like my ideal world is I have a private GitHub repo with a bunch of TailwindUI components
    And I include it as a submodule in every lucky project's src/components/ui directory
    Paul Smith
    @paulcsmith
    The other cool thing is you could do stuff like having an enum for button size and stuff like that. So you get type safe button states in Lucky
    That’d be awesome
    Stephen Dolan
    @stephendolan
    ooooh
    Paul Smith
    @paulcsmith
    Yeah I try to avoid @apply but for buttons it isn’t too bad. But agree that it’d be cooler to not have to use it :D
    Stephen Dolan
    @stephendolan
    Yeah, this is gonna be a great little episode! And definitely feels like it's in the "advanced" camp
    Stuff that's hard to describe via text, but easy to explain in a video
    Yeah the video really helps. I'm so glad you are doing these. These are the things components are so so good at, but just haven't had time to document or go in-depth. So I really appreciate this :D ANd if you could backport some of this to the guides that'd be cool. But I know that's a lot of work so no worries if you can't!
    Stephen Dolan
    @stephendolan
    Don't worry, I'm at least logging issues as I go! Already added one for documenting named slots :D
    The wife and I are renovating the backyard and a bathroom before her sister is out to visit for a few weeks, so I haven't had the bandwidth for another website PR-blitz. Plan to keep those coming until we hit 1.0 whenever I can, though!
    Ohhh wait so is with_defaults a Lucky thing or Crystal thing?
    Paul Smith
    @paulcsmith
    with_defaults is a Lucky thing created for stuff like this :D
    And no worries. I'm also low bandwidth. Finishing up my garage right now with drywall/paint/new storage. So I totally get it!
    Stephen Dolan
    @stephendolan
    I see! I need to dig into the source and understand that a bit better
    Stephen Dolan
    @stephendolan
    I'll probably do a one-two punch of an episode on with_defaults by itself
    Then a beautiful convergence of named slots and with_defaults for the component composition video