https://htmx.org logo
Join Discord
Powered by
# haskell-htmx
  • g

    great-gold-37694

    02/02/2023, 2:03 PM
    What are y'all using for styles? Coming from elm-ui and I'm really wanting for something akin to Tailwind but more "built in" to the Haskell ecosystem. Issue with Tailwind here from what I can tell is the build step isn't compatible with
    .hs
    files. Esp if you want to do your templating in Blaze w/o a quasi quoter. When I looked into UnoCSS (up and comer from the vue community) seems like it suffers a lot of the same issues. But elm-ui gives you basically an "Atomic Css" framework but leverages both a static stylesheet and "dynamic styles" (the bad kind) and because you're using Elm functions to reference the classes and it's all in a list of attributes you get a nice sort of "override" semantics since the properties are "last one wins" (which seems trickier with tailwind far as I can tell). I really don't want to give up on the ergonomics of elm-ui and I'll probably build a thing if I have too, but curious how y'all approach this for larger applications? Cascade be damned 😅
  • e

    eager-tiger-27508

    02/03/2023, 7:59 PM
    When you say Tailwind isn’t compatible with .hs files do you mean for module reloading during development? I use Tailwind + Lucid and it works for me. For better development it should be possible to watch the generated style sheet and recompile the Haskell code on changes for a better feedback loop. I know “@green-keyboard-40232d” on GitHub and the Haskell subreddit has some tips for using Tailwind with Haskell. He’s the maintainer of Emanote. Elm UI looks interesting though👀 I wonder why something like this hasn’t been implemented in Haskell, even if it’s just for server rendered HTML, but maybe it’s to limiting compared to plain HTML + CSS?
  • a

    alert-finland-92370

    02/23/2023, 7:02 PM
    @eager-tiger-27508 hi, we met at the Portland meetup. What Haskell libraries have you been using around htmx lately?
  • e

    eager-tiger-27508

    02/24/2023, 12:50 AM
    Hey @alert-finland-92370 how are you? Pretty much the only htmx specific library I use is lucid-htmx. You can find it on hackage.
  • e

    eager-tiger-27508

    02/24/2023, 12:53 AM
    At my job we also have htmx attributes for Hamlet templates. If you use Yesod, then it might be the one for you. I’m not sure if we’ve made it open-source yet but I can ask if anyone is interested
  • a

    alert-finland-92370

    02/24/2023, 12:54 AM
    Things have been good lately. Finally figured out a haskell ODBC setup to connect MS SQL Server at work so im trying to spin up a haskell project for an internal tool
  • e

    eager-tiger-27508

    02/24/2023, 2:03 AM
    Nice! We use Haskell ODBC and MS SQL as well.
  • g

    great-gold-37694

    02/26/2023, 1:41 AM
    @eager-tiger-27508 what do y'all use for a design system? You mentioned htmx for Hamlet templates but what about css? Tailwind, or just like some ad-hoc sass thing? Or something fancy? Curious.
  • e

    eager-tiger-27508

    02/27/2023, 3:15 PM
    I use Tailwind CSS. I know a lot of people that don’t like Tailwind though. Bootstrap gets the job done as well. Or just custom CSS.
  • g

    great-gold-37694

    02/27/2023, 3:18 PM
    @eager-tiger-27508 I've got blaze-html,x rending in
    .hs
    file extensions and my Neovim setup doesn't seem to be able to bind the same keybinding for 2 lsp's running on the same file... You mentioned you use Lucid, are you using separate .html templates or inline haskell DSL? Because I can get the tailwind JIT to work with inline blaze but not the LSP stuff (which may be a deal breaker for us).
  • e

    eager-tiger-27508

    02/27/2023, 3:19 PM
    Oooh that’s interesting
  • g

    great-gold-37694

    02/27/2023, 3:19 PM
    I haven't used Bootstrap for years from all the pain it's caused me in the past. But I know it's like v5 or more at this point so I wonder how it's changed.
  • g

    great-gold-37694

    02/27/2023, 3:19 PM
    Yeh it's very Locality of Behavior -centric.
  • g

    great-gold-37694

    02/27/2023, 3:20 PM
    We use Servant at work for serving JSON Api's but HTMX means we might have a reasonable contender for Elm / so we can get SSR stuff... I'm demoing a re-write of a component again today (first demo was about Rust)
  • g

    great-gold-37694

    02/27/2023, 3:20 PM
    So we'll see but I'd like to get the LSP stuff workin'
  • e

    eager-tiger-27508

    02/27/2023, 3:26 PM
    Yes, I mainly use Lucid. Just in-line in my .hs files.
  • e

    eager-tiger-27508

    02/27/2023, 3:27 PM
    Hoping your demo goes well☘️
  • e

    eager-tiger-27508

    02/27/2023, 3:29 PM
    By LSP stuff do you mean autocomplete for CSS class names and stuff like that? I remember the creator of Emanote (a Haskell project) project having a guide for that. I’ll try to find it.
  • e

    eager-tiger-27508

    02/27/2023, 3:29 PM
    It was for Tailwind/Haskell integration
  • g

    great-gold-37694

    02/27/2023, 4:00 PM
    Yeh I've talked with Srid on slack but he just sent me to his project it doesn't have anything to do with LSP iirc. It's possible/probable it's just my own editor setup 😔
  • g

    great-gold-37694

    02/27/2023, 4:00 PM
    We'll rather it's likely I think. But maybe not?
  • g

    great-gold-37694

    02/27/2023, 4:01 PM
    And yeh for the classnames cause otherwise having to memorize the DSL is gonna be a hard thing to sell to my coworkers without something to guide us along. I mean I struggled going back & forth between the docs and the source just to put an align-center on their since the naming conventions aren't consistent across the library 😑
  • g

    great-gold-37694

    02/27/2023, 4:02 PM
    But otherwise it's a roughly analogous workflow to what the front-end devs we'll me and one other guy have with Elm which is why I'm digging into it.
  • l

    late-king-98305

    02/27/2023, 4:23 PM
    Just chiming in to say yes, Bootstrap is v5. I use it so much with htmx that I'm starting to feel like I should use something else just to avoid stagnation!
  • g

    great-gold-37694

    02/28/2023, 2:08 PM
    @lively-vegetable-81321 👋
  • l

    lively-vegetable-81321

    02/28/2023, 2:48 PM
    👋
  • m

    mysterious-toddler-20573

    03/23/2023, 9:15 PM
    https://tristancacqueray.github.io/blog/introducing-butler
  • m

    mysterious-toddler-20573

    03/23/2023, 9:15 PM
    > thanks to the hypermedia paradigm enabled by htmx, it is a great fit for Butler.
  • m

    mysterious-toddler-20573

    03/23/2023, 9:15 PM
  • p

    proud-dentist-32878

    04/30/2023, 9:05 PM
    Sweet!!!