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

    mysterious-toddler-20573

    10/02/2020, 3:07 PM
    ok, so fix autofocus and add event filtering and I think we can make this work w/out resorting to alpine or hyperscript
  • m

    mysterious-toddler-20573

    10/02/2020, 3:08 PM
    this is a good chance to allow multiple events to trigger too:
  • m

    most-jelly-15242

    10/02/2020, 3:08 PM
    OK, I found a way to do the focus thing without Alpine
    autofocus onfocus="let value = this.value; this.value = null; this.value=value"
  • m

    mysterious-toddler-20573

    10/02/2020, 3:08 PM
    yeah, that's roughly what htmx should do, although it may flash content
  • m

    mysterious-toddler-20573

    10/02/2020, 3:08 PM
    i'm surprised the browser defaults to the cursor at 0
  • m

    mysterious-toddler-20573

    10/02/2020, 3:08 PM
    we update the cursor in other places, so this is doable
  • m

    mysterious-toddler-20573

    10/02/2020, 3:09 PM
    anyway, multiple events:
    hx-trigger='event1(foo:'bar'),event2 ...'
  • m

    mysterious-toddler-20573

    10/02/2020, 3:09 PM
    easy peasy
  • m

    mysterious-toddler-20573

    10/02/2020, 3:10 PM
    just another mini parser
  • m

    mysterious-toddler-20573

    10/02/2020, 3:10 PM
    which I love
  • m

    mysterious-toddler-20573

    10/02/2020, 3:10 PM
    thank you @User for pushing htmx!
  • m

    most-jelly-15242

    10/02/2020, 3:10 PM
    Thank you for creating it to begin with. This thing is amazing.
  • m

    most-jelly-15242

    10/02/2020, 3:19 PM
    I just tested and the
    autofocus onfocus
    thing doesn't work reliably. I switched back to how I had it before.
  • m

    most-jelly-15242

    10/02/2020, 3:20 PM
    @User A question. I wanted to add the
    hx-vars="id: taskId"
    to the parent
    li
    element instead of all the children as it is now. But then when I click on any child of
    li
    I get three requests. Is that expected?
  • l

    lively-beach-14291

    10/02/2020, 3:25 PM
    Thank you for working towards a usable TodoMVC.
  • l

    lively-beach-14291

    10/02/2020, 3:26 PM
    @User From a user perspective, having a very clean TodoMVC is probably the 1.0 threshold. I'd add pagination to that though; simulate this by loading TodoMVC with dozens of tasks and make the page size 3 or something.
  • l

    lively-beach-14291

    10/02/2020, 3:27 PM
    My personal objective, among others, is to create a viable alternative to https://teacherspayteachers.com
  • l

    lively-beach-14291

    10/02/2020, 3:28 PM
    It's not very complex; there's no reason why a mostly read-only page like this couldn't be done with htmx; pagination & scrolling are the main blockers?
  • m

    most-jelly-15242

    10/02/2020, 3:29 PM
    why is pagination an issue?
  • l

    lively-beach-14291

    10/02/2020, 3:30 PM
    (I don't know it's not? and Ben has a outstanding pull, I think?)
  • m

    mysterious-toddler-20573

    10/02/2020, 3:30 PM
    i need to understand paging better
  • m

    mysterious-toddler-20573

    10/02/2020, 3:30 PM
    before I commit to it
  • m

    mysterious-toddler-20573

    10/02/2020, 3:31 PM
    i mean, basic navigational paging works fine, including infinite scroll
  • m

    mysterious-toddler-20573

    10/02/2020, 3:31 PM
    there is the notion of limiting the number of children after a swap
  • m

    mysterious-toddler-20573

    10/02/2020, 3:31 PM
    but that doesn't strike me as being a general paging issue
  • m

    mysterious-toddler-20573

    10/02/2020, 3:31 PM
    no?
  • l

    lively-beach-14291

    10/02/2020, 3:31 PM
    So, I'm speaking from ignorance. It'd be nice if you're on page N, that page N+1 loads in the background.
  • m

    mysterious-toddler-20573

    10/02/2020, 3:32 PM
    ah, like a pre-fetch
  • m

    mysterious-toddler-20573

    10/02/2020, 3:32 PM
    OK
  • l

    lively-beach-14291

    10/02/2020, 3:32 PM
    At the application level, I'm after a user experience having smooth scrolling. But, as I noted... I'm speaking of ignorance, I don't have enough htmx experience to be helpful.
1...464748...1146Latest