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

    mysterious-toddler-20573

    12/01/2020, 4:16 PM
    we all are
  • f

    future-boots-43048

    12/01/2020, 4:16 PM
    I got pulled away most of the afternoon ... but I'm back looking at it now.
  • f

    future-boots-43048

    12/01/2020, 4:19 PM
    https://gist.github.com/wtpayne/0642eedcb48a496d8ddcbe3f0f80a634
  • f

    future-boots-43048

    12/01/2020, 4:23 PM
    SSE subscriptions are made with a request to '/sub/'. The query is a dash-delimited list of resource-identifiers.
  • f

    future-boots-43048

    12/01/2020, 4:23 PM
    The resources themselves are obtained with a GET to '/req/'.
  • f

    future-boots-43048

    12/01/2020, 4:49 PM
    Digging into the htmx source now, trying to understand how it works ... my initial thoughts are that it looks like the sseListener callback ends up calling 'processNode' again, so in theory any new SSE connections on the HTML that's being swapped in should also be processed ...
  • f

    future-boots-43048

    12/01/2020, 4:50 PM
    So in theory everything should be fine ...
  • f

    future-boots-43048

    12/01/2020, 4:56 PM
    I think I might need to use a trigger of 'changed' though rather than 'load' on the HTML that's loaded as a result of SSE events...
  • f

    future-boots-43048

    12/01/2020, 5:07 PM
    So .. it looks like when the 'dashboard' event is received, changing the inner SSE connect, the SSE old connection is closed, but no new one is opened.
  • m

    mysterious-toddler-20573

    12/01/2020, 5:15 PM
    @User and @User this time tomorrow:
  • f

    future-boots-43048

    12/01/2020, 5:16 PM
    Something like that.
  • f

    future-boots-43048

    12/01/2020, 5:17 PM
    But only after I've cooked dinner.
  • f

    future-boots-43048

    12/01/2020, 5:17 PM
    :-p
  • g

    gorgeous-ghost-95789

    12/01/2020, 5:41 PM
    Currently listening to sixth graders yodel at each other. But, will check out your code this afternoon šŸ˜…
  • g

    gorgeous-ghost-95789

    12/01/2020, 5:42 PM
    Am I at least Samwise in this pic? Please tell me I’m not Frodo.
  • f

    future-boots-43048

    12/01/2020, 6:02 PM
    I think I might be gollum.
  • g

    gorgeous-ghost-95789

    12/01/2020, 6:16 PM
    I’d say HTMX is the one ring, but that would make @mysterious-toddler-20573 Sauron.
  • m

    mysterious-toddler-20573

    12/01/2020, 6:18 PM
    i am fine w/ this
  • f

    future-boots-43048

    12/01/2020, 7:03 PM
    So ... stepping through the code I can see the old connection being closed ... but I can't see (yet) where the new connection should be opened.
  • f

    future-boots-43048

    12/01/2020, 7:04 PM
    I think I'm going to try to get it working with a local copy of HTMX, because debugging minified JS is a pain. (I'm not a JavaScript developer ... so I'm sooooooo far outside my comfort zone it's not even funny any more.)
  • m

    mysterious-toddler-20573

    12/01/2020, 7:25 PM
    oh, it's funny
  • f

    future-boots-43048

    12/01/2020, 10:13 PM
    lol
  • g

    gorgeous-ghost-95789

    12/01/2020, 11:20 PM
    @User -- https://gist.github.com/wtpayne/0642eedcb48a496d8ddcbe3f0f80a634#gistcomment-3546731
  • m

    mysterious-toddler-20573

    12/02/2020, 1:16 AM
    Finally put some docs together for CSS transitions in htmx, for the docs page: https://htmx.org/docs/#css_transitions
  • f

    future-boots-43048

    12/02/2020, 1:17 AM
    @gorgeous-ghost-95789 - Thank you for that!
  • g

    gorgeous-ghost-95789

    12/02/2020, 2:16 AM
    Of course. I don't know how much it will help, but hopefully it gives you a boost šŸ™‚
  • b

    big-airline-13935

    12/02/2020, 11:39 AM
    Very nice @User, and not even a single mention of "swizzle" šŸ˜‰
  • b

    bland-kite-495

    12/02/2020, 11:46 AM
    Hallo! I am proud to have been the first to have asked for help on Stackoverflow!! If someone could kindly answer: https://stackoverflow.com/questions/65107383/load-data-into-form-using-htmxjs
  • g

    gorgeous-airport-54386

    12/02/2020, 12:12 PM
    I don't have a stackoverflow account, but this might address some of your concerns -> https://blog.jonm.dev/posts/using-html-as-the-media-type-for-your-api/#but-what-about (see the "Bloat" section)
  • b

    bland-kite-495

    12/02/2020, 3:04 PM
    Ok, this means that with HTMX I have to swap an entire form? And I can't swap only the 'value' of a INPUT?
1...828384...1146Latest