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

    white-motorcycle-95262

    11/15/2022, 9:49 PM
    Although...if they had a correct code (and thus the cart was re-rendered) and then they changed it (e.g., wrong code) then a 204 would be returned but it would look like the coupon was still applied. I'll figure something out.
  • m

    mysterious-toddler-20573

    11/15/2022, 9:51 PM
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418
  • w

    white-motorcycle-95262

    11/15/2022, 9:52 PM
    Oh, duh. For some reason I thought 418 was "I'm not a teapot"
  • w

    white-motorcycle-95262

    11/15/2022, 9:52 PM
    or "I'm not a coffee machine" maybe
  • m

    mysterious-toddler-20573

    11/15/2022, 9:52 PM
    I think I would use events for this, target an error message after the code, and trigger a refresh when needed
  • w

    white-motorcycle-95262

    11/15/2022, 9:53 PM
    Sounds good, will do. Thanks šŸ™‚
  • m

    miniature-lizard-24702

    11/15/2022, 10:38 PM
    personally, I think this is an eyesore in the documentation. Whose idea was that anyway
  • m

    miniature-lizard-24702

    11/15/2022, 10:39 PM
    Might have been funny in the moment but now we can't get rid of it
  • m

    miniature-lizard-24702

    11/15/2022, 10:39 PM
  • m

    mysterious-toddler-20573

    11/15/2022, 10:47 PM
    it is funny now because we can't get rid of it
  • m

    mysterious-toddler-20573

    11/15/2022, 10:47 PM
    keep the web weird
  • m

    mysterious-toddler-20573

    11/15/2022, 10:47 PM
    https://tenor.com/view/bongos-cat-dancing-vibe-edited-gif-19250605
  • m

    miniature-lizard-24702

    11/15/2022, 10:55 PM
    šŸ™‰
  • b

    busy-tomato-43957

    11/16/2022, 12:50 AM
    @shy-zebra-22292 @mysterious-toddler-20573 I ended up filing an issue about this: https://github.com/bigskysoftware/htmx/issues/1133
  • b

    busy-tomato-43957

    11/16/2022, 12:52 AM
    A good solution may be to add a new "mode" to hx-swap-oob by setting its value to something particular
  • s

    some-hairdresser-28401

    11/16/2022, 1:29 AM
    Perfect timing. Just ran into this yesterday...
  • e

    early-camera-41285

    11/16/2022, 1:31 AM
    Andrew Godwin is developing a Django-based version of Mastedon and eyeing both HTMX and Hyperscript for the UI https://aeracode.org/2022/11/14/takahe-new-server/
  • l

    late-king-98305

    11/16/2022, 3:13 AM
    Don't forget HTTP 420 - Enhance Your Calm https://httpcodes.co/status/420/
  • l

    late-king-98305

    11/16/2022, 3:14 AM
    Though that one doesn't have an RFC...
  • c

    cuddly-keyboard-70746

    11/16/2022, 3:17 AM
    I don't know how 418 got to HTTP. Wikipedia cites 2 RFCs for the teapot april fool stuff but it is an entire protocol (extensions of HTML) with methods, schemes and also the famous error code.
    Copy code
    The HTCPCP protocol is built on top of HTTP, with the addition of a
    few new methods, header fields and return codes.  All HTCPCP servers
    should be referred to with the "coffee:" URI scheme
  • c

    cuddly-keyboard-70746

    11/16/2022, 3:18 AM
    Somehow or another 418 slip into actual HTTP gradually and now is kinda "official"? or am I missing another document where it is officially added to HTTP
  • c

    cuddly-keyboard-70746

    11/16/2022, 3:23 AM
    I have a server at work that supports 420. lol. I have no idea if we ever hit that but we handle it.
  • g

    gorgeous-airport-54386

    11/16/2022, 3:24 AM
    I don't think it was ever official, Twitter started using it for a thing and status code lists started documenting it
  • c

    cuddly-keyboard-70746

    11/16/2022, 3:26 AM
    ah that makes sense. it felt more "official" because of the RFC but I now notice that it is not part of HTML.
  • c

    calm-ice-23682

    11/16/2022, 3:31 AM
    Carson Interviewed with Github's The ReadME Project newsletter! (╯°▔°)╯︵ ┻━┻
  • c

    calm-ice-23682

    11/16/2022, 3:31 AM
    Copy code
    Htmx creator Carson Gross credits the technology these projects are built on top of for some of their success, noting the contrast between them and other JavaScript frameworks.
    
    ā€œI might encourage minimalism in web development, but only because there's this incredibly complicated piece of software called a browser that has all this infrastructure baked into it that we can sit on top of. We can take advantage of that complexity and the abstraction it provides in a simple way, rather than putting a lot of complexity on top of that,ā€ says Gross. ā€œA lot of JavaScript projects take a browser and heap a bunch of incredibly complicated software on top without taking advantage of the infrastructure that the browser has sitting there.ā€
    
    One of the reasons front-end libraries like React are so popular is that JavaScript is one of the only ways to add interactivity to a website. Writing pure HTML, developers can only send and receive data in very limited ways and are restricted to reloading entire pages when content changes, rather than just updating smaller parts. Gross sees these as arbitrary constraints that force developers to use JavaScript when HTML should suffice. Htmx is a JavaScript library that enables developers to build interactive components in pure HTML without having to write any JavaScript.
  • f

    freezing-waitress-26396

    11/16/2022, 5:35 PM
    So for the forseaable future at the agency I'm working at I'm tasked with the responsibility of choosing a new framework (PHP based) and I suggested giving a low as possible entry barrier to future fullstack devs while retaining the complexity the apps and sites we do require. I'm heavily considering adding HTMX and hyperscript to the stack (though with hyperscript it's more of a "not mandatory, but there" thing since vanilla JS is perfectly fine). A lot more thought has to be put into this, since it's heavily dependent on the technical debt (unfortunately) but as the same time just such a logical conclusion because PHP + hypermedia is literally what this agency has been doing for years, but unnecessarily complicated.
  • r

    refined-waiter-90422

    11/16/2022, 5:37 PM
    There's gonna be haters, but for PHP been playing around a lot with no framework + PDO + Adminer for visual database administration lately.
  • r

    refined-waiter-90422

    11/16/2022, 5:38 PM
    Also PHP dialect that removes
    ;
    {
    }
    and replaces
    =>
    with
    :
    and
    ->
    with
    .
    .
  • r

    refined-waiter-90422

    11/16/2022, 5:42 PM
    Also shout out to isolated processes per request - so nice.
1...909910911...1146Latest