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

    ripe-action-67367

    09/08/2022, 12:13 PM
    It's technically possible to implement this with htmx by setting up delays and returning empty response from the server, but practically speaking, hyperscript would be a much better fit for this task
  • r

    ripe-action-67367

    09/08/2022, 12:15 PM
    _="init wait 3s then transition opacity to 0 then remove me" would do exactly what you want
  • f

    flat-painting-36912

    09/08/2022, 12:38 PM
    Cool! Will definitely look into that
  • b

    bland-coat-6833

    09/08/2022, 12:46 PM
    The best thing is that if you then decide you need just a liiitle bit of shiny, then what are you going to do? Rewrite in Vue, or just add one of these innocent HTML attributes? First one is always free!
  • s

    salmon-xylophone-28580

    09/08/2022, 1:11 PM
    Yes, that's where htmx is great. In this case the developer who will work on this is not familiar with htmx yet, and it is just a small thing which we want done by friday (tomorrow). So introducing something new, even if it is simple, is an extra time eating thing.
  • b

    bland-coat-6833

    09/08/2022, 1:16 PM
    I think that's where enhance.dev could be interesting - start off with html files where the file path is the URL and then add complexity from there. Like PHP but with serverless deploys
  • d

    dry-kilobyte-87463

    09/09/2022, 7:11 AM
    I notice that jinja2-fragments is not on the "Template Fragments" page. I found the htmx "Template Fragments" page from their Github repo. Their goal is to implement the "Template Fragments" pattern in the Jinja2 templating language often associated with Flask in the Python community. I've not tried it yet, but it looks interesting.
  • b

    bland-coat-6833

    09/09/2022, 10:12 AM
    7b? (Do we still do that?)
  • u

    user

    09/09/2022, 4:13 PM
    hey folks, digging this old answers, withCredentials is barely documented
  • u

    user

    09/09/2022, 4:14 PM
    Do you think this config is right?
  • u

    user

    09/09/2022, 4:14 PM
  • u

    user

    09/09/2022, 4:15 PM
    I am trying to create a basic demo of auth with a Deno API and an HTMX index.html, I've read a bit about "fetch" credentials settings, that are necessary for Set-Cookie to work, and probably also "mode: 'cors"
  • u

    user

    09/09/2022, 4:15 PM
    both are on localhost but API is on "8000" and the webapp on "8080"
  • u

    user

    09/09/2022, 4:15 PM
    I wonder what would be the equivalent setup in HTMX
  • u

    user

    09/09/2022, 4:17 PM
    what bugs me is that I am not even sure what I should expect to see if it's correctly setup, probably some Access-Control headers
  • b

    brainy-telephone-91911

    09/09/2022, 4:20 PM
    fetch("http://localhost:8000/account/signup", { method: "POST", body: JSON.stringify({username:"foo", password:"barbar"}), credentials: "include"}).then(res => {}) this call works it seems for instance, that's what I am trying to reproduce
  • b

    brainy-telephone-91911

    09/09/2022, 4:45 PM
    The response only have Access-Control-Allow-Origin header, maybe that'rs related according to this answer: https://stackoverflow.com/a/48231372/5513532
  • a

    abundant-spring-38265

    09/09/2022, 5:44 PM
    Guys has anyone had issues with select dropdown and option selected & disabled i.e placeholder in the dropdown box. Seems like hx-post always sends the default placeholder value rather than what user has picked. 😑
  • a

    abundant-spring-38265

    09/09/2022, 5:45 PM
    When it's removed, all working as expected
  • a

    abundant-spring-38265

    09/09/2022, 5:45 PM
    Any way around this?
  • m

    mysterious-toddler-20573

    09/09/2022, 6:16 PM
    hmm, it should just be including the .value of the select
  • a

    abundant-spring-38265

    09/09/2022, 6:29 PM
    Seems to pickup selected diaabled option (placeholder) and not user picked :/
  • m

    mysterious-toddler-20573

    09/09/2022, 6:31 PM
    and this happens when the option is disabled?
  • m

    mysterious-toddler-20573

    09/09/2022, 6:31 PM
    I bet .value is the culprit here
  • a

    abundant-spring-38265

    09/09/2022, 6:31 PM
    I think thr fact that it's set to selected
  • m

    mysterious-toddler-20573

    09/09/2022, 6:32 PM
    Normal select's work
  • m

    mysterious-toddler-20573

    09/09/2022, 6:32 PM
    even if it starts w/ a selected value
  • m

    mysterious-toddler-20573

    09/09/2022, 6:32 PM
    I could see disabling one causing it to use the default selected value though
  • m

    mysterious-toddler-20573

    09/09/2022, 6:33 PM
    they aren't treated differently than any other input: they just ask the input for it's
    .value
  • m

    mysterious-toddler-20573

    09/09/2022, 6:33 PM
    I'll put together a codepen we can noodle with in a bit, have to get some work done
1...821822823...1146Latest