https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • a

    ancient-shoe-86801

    09/01/2022, 11:56 PM
    I keep thinking many people are still missing the point of https://htmx.org/essays/template-fragments/ This is one example: https://github.com/bigskysoftware/htmx/pull/1022#issuecomment-1234919166
  • a

    ancient-shoe-86801

    09/02/2022, 12:04 AM
    maybe this needs to be highlighted more somehow? > without pulling fragments of the template out to separate files for rendering, creating a large number of individual template files. > > By keeping all the HTML in a single file, it is also easier to reason about how a feature works. This follows the Locality of Behavior design principle.
  • t

    tall-river-23601

    09/02/2022, 10:09 AM
    @mysterious-toddler-20573 Inspired by the post, I added an implementation for htmlgenerator: https://github.com/basxsoftwareassociation/htmlgenerator#virtual-elements
  • t

    tall-river-23601

    09/02/2022, 10:10 AM
    (talking about fragments)
  • p

    proud-librarian-99598

    09/02/2022, 11:14 AM
    Found out by searching the archives here that there is an
    htmx.config.includeIndicatorStyles
    option which is default
    true
    . By adding this, this is disabled an my own CSS is used:
    Copy code
    <meta name="htmx-config" content='{"includeIndicatorStyles": false}'>
  • c

    careful-cpu-82706

    09/02/2022, 11:26 AM
    My stack is: Alpine HTMX Lit(Typescript) Tailwind(DaisyUI) Express(pug) Really great stack.
  • c

    careful-cpu-82706

    09/02/2022, 11:28 AM
    Had no issues with it so far
  • m

    miniature-lizard-24702

    09/02/2022, 12:02 PM
    Looks good. Though in my case I'm writing a tailwind version of Untitled UI and I use golang as the backend
  • m

    miniature-lizard-24702

    09/02/2022, 12:02 PM
    I've heard of DaisyUI but never used it
  • m

    miniature-lizard-24702

    09/02/2022, 12:02 PM
    what's your experience like with it?
  • m

    miniature-lizard-24702

    09/02/2022, 12:08 PM
    seems like they hide the tailwind classes behind custom classes
  • m

    miniature-lizard-24702

    09/02/2022, 12:08 PM
    Tailwind UI does not
  • m

    miniature-lizard-24702

    09/02/2022, 4:30 PM
    Hmm. Is there a way to do the htmx sortable example with a sublist/multi list to implement trello
  • m

    miniature-lizard-24702

    09/02/2022, 4:31 PM
    I know sortable has a shared list capability or something
  • m

    miniature-lizard-24702

    09/02/2022, 4:31 PM
    Could it be that simple...
  • m

    miniature-lizard-24702

    09/02/2022, 4:31 PM
    🤔
  • b

    bitter-monkey-50309

    09/02/2022, 5:15 PM
    I'm guilty. Now I've seen your Flask example in the ticket and properly reread the essay rather than glancing at it I'm not sure they fit. Somewhat related: could you achieve the same thing for a single fragment by setting a
    HX-Retarget
    response header (ignoring the obvious wastefulness of server returning HTML that is ignored)?
  • h

    hundreds-camera-24900

    09/02/2022, 5:21 PM
    Daisy is good not great imho - it requires some specific html structure for components
  • h

    hundreds-camera-24900

    09/02/2022, 5:22 PM
    the theming is really nice though
  • m

    miniature-lizard-24702

    09/02/2022, 5:30 PM
    oh that's cool. Unfortunately the template engine I'm using doesn't support template fragments
  • m

    miniature-lizard-24702

    09/02/2022, 5:30 PM
    Should probably add them and make a pr
  • m

    miniature-lizard-24702

    09/02/2022, 5:31 PM
    Now I hesitate whether I should continue with my app now or change it later
  • m

    miniature-lizard-24702

    09/02/2022, 5:31 PM
    or not at all
  • m

    mysterious-toddler-20573

    09/02/2022, 5:54 PM
    you can always refactor
  • m

    mysterious-toddler-20573

    09/02/2022, 5:54 PM
    don't let these things slow you down, the important thing is doing
  • m

    miniature-lizard-24702

    09/02/2022, 6:15 PM
    Indeed.
  • m

    miniature-lizard-24702

    09/02/2022, 8:18 PM
    hmm. I'm not sure how fragments work. does it make sense to have a fragment within a fragment?
  • m

    mysterious-toddler-20573

    09/02/2022, 8:20 PM
    sure
  • m

    miniature-lizard-24702

    09/02/2022, 8:33 PM
    *sigh that makes things annoying lol
  • m

    miniature-lizard-24702

    09/02/2022, 8:33 PM
    or rather more complicated
1...808809810...1146Latest