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

    mysterious-toddler-20573

    12/04/2020, 9:35 PM
    the set of selectors and the swap terms are distinct
  • m

    mysterious-toddler-20573

    12/04/2020, 9:36 PM
    So I like that
  • m

    mysterious-toddler-20573

    12/04/2020, 9:36 PM
    let's deprecate it and use the hx-swap more correctly
  • m

    mysterious-toddler-20573

    12/04/2020, 9:37 PM
    I can work w/ you on that change if you like, although I'm probably not too available until next week. If you think you can hack it yourself, please go ahead.
  • e

    echoing-dress-67727

    12/04/2020, 9:37 PM
    I'm about done for today, so I won't get to it until Monday at the earliest, but I might take a stab then. Is there a system in place yet for deprecations?
  • m

    mysterious-toddler-20573

    12/04/2020, 9:48 PM
    not really, we can just log it
  • m

    mysterious-toddler-20573

    12/04/2020, 9:48 PM
    I can take care of that part, if you want to add the overloading for oob-swap and then implemen the hx-swap change
  • e

    echoing-dress-67727

    12/04/2020, 9:54 PM
    I documented these items in the PR https://github.com/bigskysoftware/htmx/pull/253
  • g

    gorgeous-ghost-95789

    12/05/2020, 12:27 AM
    Just saw this on GitHub. It looks like an absolute win. Thanks @User and @User !
  • m

    mysterious-toddler-20573

    12/05/2020, 12:34 AM
    @User the js API is fixed up in dev
  • m

    mysterious-toddler-20573

    12/05/2020, 12:35 AM
    going to get the oob-swap stuff squared away with @User and then maybe take a crack at this one: https://github.com/bigskysoftware/htmx/issues/123
  • m

    mysterious-toddler-20573

    12/05/2020, 12:36 AM
    and that'll be 1.1.0
  • m

    mysterious-toddler-20573

    12/05/2020, 12:36 AM
    @User do you want to create a gist for brainstorming some ideas?
  • g

    gorgeous-ghost-95789

    12/05/2020, 12:37 AM
    Sure. I'm just reading #123 now. I'm trying to put together ideas for extensions, too. But it's going to take some research so that I don't make a fool of myself
  • m

    mysterious-toddler-20573

    12/05/2020, 12:57 AM
    123 is a long running issue, I had the same problem w/ intercooler
  • m

    mysterious-toddler-20573

    12/05/2020, 12:57 AM
    I want to create a manual test and make sure we can emulate the behavior of forms as closely as possible
  • m

    mysterious-toddler-20573

    12/05/2020, 12:57 AM
    I hate that hx-boost changes the semantics in this case
  • m

    mysterious-toddler-20573

    12/05/2020, 12:57 AM
    currently think that the right thing is a click handler on the buttons and then a focus handler on the form to null out the clicked button, in case a click happens and is cancelled, but that's just a guess
  • g

    gorgeous-ghost-95789

    12/05/2020, 12:58 AM
    I'm still trying to understand the basic issue here. But (without understanding it yet) extra "click" handlers sounds like a scary path to go down 😦
  • g

    gorgeous-ghost-95789

    12/05/2020, 1:00 AM
    Plus, event handlers on buttons are a bad thing in general, because what happens if the user presses "ENTER" instead? I'm frustrated every time I try to sign in to that one website that makes me click "login" instead of just pressing ENTER.
  • m

    mysterious-toddler-20573

    12/05/2020, 1:14 AM
    yeah, it's a sketchy problem that ajax powered forms have faced forever
  • m

    mysterious-toddler-20573

    12/05/2020, 1:14 AM
    the behavior of normal forms is to submit the button that is clicked if one is clicked
  • m

    mysterious-toddler-20573

    12/05/2020, 1:15 AM
    but w/ ajax submission, there isn't a way to know what button triggered the submission
  • m

    mysterious-toddler-20573

    12/05/2020, 1:15 AM
    i wonder how turbolinks handles it, if at all
  • b

    big-airline-13935

    12/05/2020, 10:33 AM
    Perfect, thanks @User!! htmx's API is so useful, I love that I can do almost everything I need with it, without having to import hyperscript!
  • r

    refined-ice-80461

    12/05/2020, 4:32 PM
    Hey guys I'm loving using htmx so far and using it right now to teach some children how to build apps using html from the server without a build step or advanced javascript knowledge. For the most part, it is very intuitive and easy to use. My only hangup is the fact that you have to include "hx" in the attribute. I would much rather it be "mx" as that seems more meaningful and intuitive. Or if we could just use "data-swap", "data-post", instead of data-hx-swap, data-hx-post etc. that would be even better. Now if there was some type of configuration that allows us to alter the default and set our choice then that would be the holy grail!
  • g

    gorgeous-ghost-95789

    12/05/2020, 4:43 PM
    Hey @refined-ice-80461 -- I'm no help on the prefix. I'm guessing it's to "namespace" the extensions so that they don't collide with other libraries.
  • g

    gorgeous-ghost-95789

    12/05/2020, 4:43 PM
    However, I'm like three days behind you in working to teach kids how to code with htmx. I had literally planned to start yesterday. 😦 Maybe next week.
  • g

    gorgeous-ghost-95789

    12/05/2020, 4:44 PM
    Any insights on what to do (or what to avoid) to make htmx valuable for beginning coders? (6th-7th grade)
  • r

    refined-ice-80461

    12/05/2020, 5:05 PM
    @User Yeah but the only true way to namespace and prevent collisions when namespaces aren't "reserved" is to give the option to set the namespace. Anyway, as for teaching htmx I just got started and I can say it's pretty self explanatory and easy for the basics so I would keep things simple for them. Even the simplest WebSockets, SSE, and AJAX stuff done with htmx has opened up whole a new realm of possibilities for your average html/css coder without much extra effort... Because once you go down the SPA route in search of similar power, the rabbit hole of required knowledge just gets deeper and deeper.
1...868788...1146Latest