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

    gentle-dream-18175

    11/11/2022, 6:34 PM
    having an "empty" endpoint seems very wrong to me
  • g

    gentle-dream-18175

    11/11/2022, 6:34 PM
    and not htmx-y at all
  • g

    gentle-dream-18175

    11/11/2022, 6:34 PM
    i think it's fine for the "close me" button to still just hide/remove the
    .modal
    element
  • g

    gentle-dream-18175

    11/11/2022, 6:35 PM
    cause showing something/not showing something is a matter of client state and not at all about application state
  • g

    gifted-appointment-5037

    11/11/2022, 6:49 PM
    using dialog tag would make more sense. Never used it. Been in React land too long 🤣 Will give that a go
  • m

    modern-wall-92403

    11/11/2022, 7:12 PM
    I am doing pretty much exactly this https://htmx.org/examples/sortable/, and it works on my initial page load. When I add elements to the list of sortable elements (htmx reloads the element list), the new element list is no longer sortable. Any idea how I can add this functionality?
  • m

    mysterious-toddler-20573

    11/11/2022, 7:15 PM
    how are you initializing sortable?
  • m

    mysterious-toddler-20573

    11/11/2022, 7:15 PM
    sounds like it might need to be reinitialized
  • m

    modern-wall-92403

    11/11/2022, 7:16 PM
    I am initializing like in the example.
  • m

    mysterious-toddler-20573

    11/11/2022, 7:17 PM
    are you replacing the interior of the sortable w/ the new content? I wonder if that's screwing things up
  • m

    mysterious-toddler-20573

    11/11/2022, 7:17 PM
    a lot of JS doesn't like you mutating the DOM underneath is
  • m

    modern-wall-92403

    11/11/2022, 7:18 PM
    https://stackoverflow.com/a/73074152 seems to sort it out (changing the querySelector from content to document).
  • m

    modern-wall-92403

    11/11/2022, 7:18 PM
    But I understood the wording at https://htmx.org/docs/#3rd-party to mean that it would work on my newly loaded content.
  • t

    thankful-addition-60522

    11/11/2022, 7:31 PM
    @mysterious-toddler-20573 jquery-htmx when?
  • t

    thankful-addition-60522

    11/11/2022, 8:58 PM
    goddamnit 1cg
  • b

    bitter-machine-55943

    11/11/2022, 9:03 PM
    Is anyone using HTMX with a serverless backend? I’d normally use HTMX+Django, but seems like all I need is a templating library since serverless provides an HTTP endpoint
  • t

    thankful-apartment-66679

    11/11/2022, 9:05 PM
    eg: lambda?
  • b

    bitter-machine-55943

    11/11/2022, 9:09 PM
    Yes, like AWS Lamba or Azure Functions
  • t

    thankful-apartment-66679

    11/11/2022, 9:10 PM
    ive given it some thought, and it seems very doable with something like aws's chalice project https://github.com/aws/chalice
  • t

    thankful-apartment-66679

    11/11/2022, 9:11 PM
    aws's sam project could work as well https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html
  • t

    thankful-apartment-66679

    11/11/2022, 9:14 PM
    would be a fun project to do a POC on
  • a

    ancient-shoe-86801

    11/11/2022, 9:36 PM
    I do
  • a

    ancient-shoe-86801

    11/11/2022, 9:37 PM
    a Flask app deployed with Zappa
  • a

    ancient-shoe-86801

    11/11/2022, 9:38 PM
    main reason: it's running for free, because it's a low traffic app
  • t

    thankful-apartment-66679

    11/11/2022, 9:39 PM
    how is zappa for local dev? never heard of it before
  • a

    ancient-shoe-86801

    11/11/2022, 9:47 PM
    it doesn't do anything specific for local dev, it helps a lot with deploying things to AWS easily: https://github.com/zappa/Zappa
  • b

    bitter-machine-55943

    11/11/2022, 9:49 PM
    Interesting. Are Chalice and Zappa used for deployment? We use Azure Functions and a lot of that functionality seems built in (HTTP endpoint, run on a timer, etc)
  • a

    ancient-shoe-86801

    11/11/2022, 9:50 PM
    this a pretty straightforward description of what's Zappa:
  • t

    thankful-apartment-66679

    11/11/2022, 9:50 PM
    @ancient-shoe-86801 so in local dev you just treat it as a standard flask app?
  • a

    ancient-shoe-86801

    11/11/2022, 9:51 PM
    yes
1...901902903...1146Latest