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

    mysterious-toddler-20573

    12/04/2020, 7:53 PM
    Fine by me. Is there a better way than w/ issues?
  • g

    gorgeous-ghost-95789

    12/04/2020, 7:54 PM
    I just meant, I don't want to propose a bunch of stuff that doesn't fit with where you want things to head. So, if you have a roadmap (or even loose, unorganized feelings about the issue) I'd rather follow and enhance that, instead of heading off in the wrong direction.
  • m

    mysterious-toddler-20573

    12/04/2020, 7:57 PM
    ah, not right now, but I hope next week to have some time to take a deep breath and figure out what's next for htmx and hyperscript
  • g

    gorgeous-ghost-95789

    12/04/2020, 7:58 PM
    Ok. I'll try to put a few ideas together in the meantime. Just suggestions, of course, but maybe they can factor into your deep breath.
  • e

    echoing-dress-67727

    12/04/2020, 8:00 PM
    Can OOB swaps target elements using attributes other than
    id
    ?
  • e

    echoing-dress-67727

    12/04/2020, 8:02 PM
    Looks like no: https://github.com/bigskysoftware/htmx/blob/564d4eb6519ad5a6e1a39af8a8b2dd02ef19d8ac/src/htmx.js#L433
  • e

    echoing-dress-67727

    12/04/2020, 8:03 PM
    @User Would you accept a PR that adds an option for that?
    hx-oob-target
    perhaps?
  • g

    glamorous-honey-42686

    12/04/2020, 8:06 PM
    I was actually looking into hooking pusher (pusher.com) into htmx. So my initial thought was to use the pusher client to subscribe to their channels (websockets) api and trigger custom events that htmx could react to
  • m

    mysterious-toddler-20573

    12/04/2020, 8:31 PM
    Ah, that sounds reasonable
  • m

    mysterious-toddler-20573

    12/04/2020, 8:32 PM
    htmx has websocket support, you probably saw:
  • m

    mysterious-toddler-20573

    12/04/2020, 8:32 PM
    https://htmx.org/docs/#websockets
  • m

    mysterious-toddler-20573

    12/04/2020, 8:32 PM
    But it sounds like you might want to trigger events, which would be fine
  • m

    mysterious-toddler-20573

    12/04/2020, 8:33 PM
    It might end up acting more like SSE support:
  • m

    mysterious-toddler-20573

    12/04/2020, 8:33 PM
    https://htmx.org/docs/#sse
  • m

    mysterious-toddler-20573

    12/04/2020, 8:33 PM
    Well that's not very nice: https://news.ycombinator.com/item?id=25306272
  • g

    gorgeous-ghost-95789

    12/04/2020, 9:08 PM
    @User -- can the pusher client generate events when it receives something from a channel? If that is the case, then you might be able to use
    hx-trigger
    to swap that content in. It still might require an extension, but that's the place to start digging.
  • g

    gorgeous-ghost-95789

    12/04/2020, 9:12 PM
    @mysterious-toddler-20573 - you know, 80% of my technology decisions now boil down to "what is the developer community like?" I've had one too many bad experiences with toxic developer communities, and it's just not worth it. Sure, any group that gets big enough is going to have its bell-curve of developer quality, but some communities just seem to attract too many pricks to justify using their toolsets.
  • e

    echoing-dress-67727

    12/04/2020, 9:18 PM
    I hope the answer was yes 😄 https://github.com/bigskysoftware/htmx/pull/253
  • m

    mysterious-toddler-20573

    12/04/2020, 9:30 PM
    Thank you! Rather than adding another attribute, how about overloading the oob attribute to accept selectors as well as true or false?
  • e

    echoing-dress-67727

    12/04/2020, 9:32 PM
    I think that's already used for
    innerHTML
    , etc
  • m

    mysterious-toddler-20573

    12/04/2020, 9:32 PM
    hmmm
  • m

    mysterious-toddler-20573

    12/04/2020, 9:32 PM
    (i need to look at the code again)
  • m

    mysterious-toddler-20573

    12/04/2020, 9:33 PM
    seems like hx-swap should be where that lives
  • m

    mysterious-toddler-20573

    12/04/2020, 9:33 PM
    🤔
  • e

    echoing-dress-67727

    12/04/2020, 9:33 PM
    Yeah, that would make sense to me too. That'd be a breaking change though 🤷‍♂️
  • m

    mysterious-toddler-20573

    12/04/2020, 9:34 PM
    my specialty!
  • e

    echoing-dress-67727

    12/04/2020, 9:34 PM
    😄
  • m

    mysterious-toddler-20573

    12/04/2020, 9:34 PM
    except this one would be intentional and known up front, which is a little out of character
  • e

    echoing-dress-67727

    12/04/2020, 9:35 PM
    I suppose we could have some logic to deprecate it, checking for the current values and supporting them, then in 2.0, drop the support for that
  • m

    mysterious-toddler-20573

    12/04/2020, 9:35 PM
    a good idea
1...858687...1146Latest