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

    thankful-apartment-66679

    11/10/2022, 5:21 PM
    http headers ftw
  • a

    astonishing-barista-36240

    11/10/2022, 5:27 PM
    Hm, building on that. it seems htmx doesn't swap when a 4/5xx error is returned. Makes sense generally I suppose, but in this case I want to swap the error dom into body.
  • a

    astonishing-barista-36240

    11/10/2022, 5:28 PM
    I'd rather not change the http status, that would affect metrics/monitoring
  • m

    mysterious-toddler-20573

    11/10/2022, 6:16 PM
    https://htmx.org/docs/#modifying_swapping_behavior_with_events
  • a

    astonishing-barista-36240

    11/10/2022, 6:38 PM
    Ah nice, with some custom js. Thanks!
  • a

    ancient-shoe-86801

    11/10/2022, 7:34 PM
    @mysterious-toddler-20573 does this interest you? https://closember.org/
  • m

    mysterious-toddler-20573

    11/10/2022, 7:37 PM
    maybe, do you have experience with it?
  • a

    ancient-shoe-86801

    11/10/2022, 7:40 PM
    not at all 😬
  • a

    ancient-shoe-86801

    11/10/2022, 7:41 PM
    looking for that hashtag on twitter doesn't bring up many results, so it seems something quite new
  • a

    ancient-shoe-86801

    11/10/2022, 7:41 PM
    at most, from last year
  • m

    mysterious-toddler-20573

    11/10/2022, 7:42 PM
    I think I'd like to wait and see how it turns out next year, maybe, before jumping in
  • m

    mysterious-toddler-20573

    11/10/2022, 7:43 PM
    in general I'm not super stressed by my open source work, hopefully no one else is (except @gorgeous-airport-54386 who I have dragged through the forrest multiple times now)
  • e

    echoing-action-55459

    11/10/2022, 10:02 PM
    trying to understand this format here https://htmx.org/attributes/hx-request/ 1) this json-like syntax is there a delimiter for providing multiple values? 2) for credentials the options would be ?
    hx-request='\"credentials\":\"omit\"'
    hx-request='\"credentials\":\"same-origin\"'
    hx-request='\"credentials\":\"include\"'
  • e

    echoing-action-55459

    11/10/2022, 10:23 PM
    and this for no headers?
    'hx-request': "\"noHeaders\""
  • m

    mysterious-toddler-20573

    11/10/2022, 10:59 PM
    i have to admit, I forgot
  • m

    mysterious-toddler-20573

    11/10/2022, 10:59 PM
    let's look at the code together
  • m

    mysterious-toddler-20573

    11/10/2022, 11:00 PM
    and then let's (you) update the docs together (you, alone)
  • m

    mysterious-toddler-20573

    11/10/2022, 11:00 PM
    😑
  • m

    mysterious-toddler-20573

    11/10/2022, 11:01 PM
    looks like the value for
    noHeaders
    needs to be truthy: https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L2841
  • r

    rhythmic-hydrogen-92496

    11/10/2022, 11:09 PM
    tag yourself I'm htmx
  • r

    rhythmic-hydrogen-92496

    11/10/2022, 11:11 PM
    I spent a decent chunk of time today trying to figure out how to stop a "collapsed" text input field from being focused on page load...because on mobile it was triggering the keyboard to open for no reason. I was going down this long path to disable autofocus by default and then trigger focus() on the element the "collapse-open" event is triggered.
  • r

    rhythmic-hydrogen-92496

    11/10/2022, 11:18 PM
    htmx and hyperscript are ruining my relationship because I enjoy coding too much now.
  • t

    thankful-addition-60522

    11/11/2022, 5:53 AM
    eat your hotwire, champ
  • a

    aloof-painter-18008

    11/11/2022, 10:38 AM
    @mysterious-toddler-20573 i ran into a similar problem as #1114. I can see the bug was fixed in dev. can i know when the fix will be pushed to production?. Thanks for the fix @rich-autumn-98740
  • c

    creamy-dawn-16627

    11/11/2022, 1:17 PM
    is there a list of the complete hx-trigger parameters ? i see the mouseenter event in doc and it's not specified in the reference. Am I looking at this the wrong way?
  • c

    creamy-dawn-16627

    11/11/2022, 1:18 PM
    willing to put some effort hours to update docs if needed. but I don't know htmx that well 🥴
  • g

    gorgeous-airport-54386

    11/11/2022, 1:19 PM
    https://developer.mozilla.org/en-US/docs/Web/Events
  • c

    creamy-dawn-16627

    11/11/2022, 1:20 PM
    wow
  • g

    gifted-appointment-5037

    11/11/2022, 6:20 PM
    found a more HTMX-y way of doing modals (I may be wrong, but seemed nicer to me than JS tomfoolery)
    Copy code
    html
    <button hx-post="/my-modal" hx-target="#modal-placeholder">Open Modal</button>
    <div id="modal-placeholder"></div>
    return a modal from your endpoint
    Copy code
    html
    <div class="modal">
      <h1>MODALAYEEHOO</h1>
      <button hx-post="/empty" hx-target="#modal-placeholder">Close me</button>
    </div>
    have an
    empty
    post endpoint that returns an empty string
  • t

    thankful-addition-60522

    11/11/2022, 6:31 PM
    maybe use
    <dialog>
    ?
1...900901902...1146Latest