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

    ancient-shoe-86801

    10/01/2022, 6:10 PM
    and that the whole thing is fake
  • b

    best-potato-7573

    10/01/2022, 8:03 PM
    guys, i did someting and it worked and i'm suprised that it worked haha, basically i activated hx-boost in my href links but the server sill responding with the entire and its inner content, not the "partial body content" only , does hx-boost happens to select the tag of the response automatically(like hx-select) to swap with the current ?
  • m

    mysterious-toddler-20573

    10/01/2022, 9:05 PM
    It does
  • c

    cuddly-keyboard-70746

    10/01/2022, 11:14 PM
    I read the hx-boost page but I am not sure if I get it. Why would I want to do that? i can think of: - only the main page defining head and not the others - avoiding history Is that it or am I missing sonething?
  • b

    best-potato-7573

    10/02/2022, 1:34 AM
    thank you!!
  • s

    some-airline-73512

    10/02/2022, 11:57 AM
    I tried using alpine-morph. It does the job of preserving alpine state, but it ignores (modified) HTML coming from the serfver. I then tried using idiomorph. It does the job of morphing (modified) HTML from the server, but the modified HTML doesn't have alpine state at all. What is the right way here? If I want to have new HTML from the server applied and at the same time, preserve Alpine state?
  • g

    green-activity-6102

    10/02/2022, 3:32 PM
    how do people use
    hx-boost
    successfully when the
    <head>
    might have different
    title
    / `script`/
    link
    tags on different pages?
  • s

    some-airline-73512

    10/02/2022, 7:06 PM
    When I have multiple elements pointing to the same hx-indicator, then after the request is completed, the 'htmx-request' class doesn't go away
  • m

    mysterious-toddler-20573

    10/02/2022, 7:14 PM
    this sounds like a very annoying bug
  • m

    mysterious-toddler-20573

    10/02/2022, 7:14 PM
    i'm doing some htmx work, can you log a github issue and I'll look at it?
  • m

    mysterious-toddler-20573

    10/02/2022, 7:16 PM
    looks to be an easy fix
  • m

    mysterious-toddler-20573

    10/02/2022, 7:18 PM
    I am working on a fix for this issue: https://github.com/bigskysoftware/htmx/commit/1dbb22b682c625c5054de7127da975f30dfbe6ea
  • m

    mysterious-toddler-20573

    10/02/2022, 7:18 PM
    allowing you to modify attributes and then reinit the node
  • m

    mysterious-toddler-20573

    10/02/2022, 7:57 PM
    https://twitter.com/htmx_org/status/1576637271922515969
  • m

    mysterious-toddler-20573

    10/02/2022, 10:44 PM
    https://github.com/bigskysoftware/htmx/commit/c1bf3fa686468239b53da81dbb1a599e5d2fd9eb
  • s

    some-airline-73512

    10/03/2022, 9:03 AM
    Wow, thank you!
  • p

    proud-librarian-99598

    10/03/2022, 1:07 PM
    I am using
    hx-trigger="sse:eventName"
    to trigger a get request when there is an
    eventName
    event coming over Server-Sent Events. I currently have this on each row
    sse-connect="/row/<id>/progress-events"
    . I. wonder if I could have a single
    sse-connect
    on the table and use the data of the event to filter. Something like
    hx-trigger="sse:eventName[data=<id>]"
    (where
    <id>
    would be the actual id).
  • g

    green-activity-6102

    10/03/2022, 2:03 PM
    any thoughts on this from anyone?
  • g

    green-activity-6102

    10/03/2022, 2:05 PM
    in a worst case with
    hx-boost
    i may actually have a little (gasp) jQuery in my head to initialize things like bootstrap modals (eg
    $(document).ready(...)
    )
  • l

    late-king-98305

    10/03/2022, 2:25 PM
    You'd be surprised at the perceived performance boost those things give you. Not only are they already downloaded, they're already parsed and ready to go. Plus, it's a nice on-ramp to the rest of htmx. Plus, it doesn't "avoid history" by default; it pushes by default.
  • g

    gorgeous-airport-54386

    10/03/2022, 2:26 PM
    it will probably be redundant with paint holding and shared element transitions
  • l

    late-king-98305

    10/03/2022, 2:26 PM
    In my practice, the answer I've worked with is "don't boost if you want to change the head". That being said, though, it's entirely valid to put a script tag at the foot of the body that will do that initialization; it doesn't have to be in the head.
  • g

    green-activity-6102

    10/03/2022, 2:27 PM
    yeah thats where i was headed... i was experimenting with that last week and hitting some challenges, course now I can't remember what they were... I think things were getting double initialized in places, I'll have to have another play with it
  • c

    cuddly-keyboard-70746

    10/03/2022, 2:29 PM
    https://htmx.org/attributes/hx-boost/ says nothing about "already downloaded" or "parsed". Does it predownload things? should more details be added there?
  • l

    late-king-98305

    10/03/2022, 2:30 PM
    If you're not changing out the head, some things may not need to be reinitialized. 🙂 Of course, you might be able to do a little defensive check around that init.
    hx-boost
    is a good starting point, but once you get deeper into htmx, you'll likely find that you start breaking up your pages a bit differently.
  • l

    late-king-98305

    10/03/2022, 2:34 PM
    It's already there by virtue of the fact that you've downloaded the page containing the `hx-boost`ed link; the scripts and styles on that page are the ones I'm talking about.
  • c

    cuddly-keyboard-70746

    10/03/2022, 2:35 PM
    AH I see.
  • g

    green-activity-6102

    10/03/2022, 3:40 PM
    Oof I just ran into this bug, when's the general release 😂
  • m

    mysterious-toddler-20573

    10/03/2022, 4:06 PM
    hoping next friday
  • g

    green-activity-6102

    10/04/2022, 12:10 AM
    anyone have a favorite generic way for handling 500's on htmx requests? I've got good error handling in the places where it makes sense but it would be nice to have a catch-all for uncaught 500's so that the UI at least does something for the user
1...843844845...1146Latest