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

    mysterious-toddler-20573

    10/05/2020, 12:30 AM
    So .48 kb
  • m

    mysterious-toddler-20573

    10/05/2020, 1:38 AM
    question
  • m

    mysterious-toddler-20573

    10/05/2020, 1:38 AM
    should we be sending up a seralized version of the event that triggered a request?
  • m

    mysterious-toddler-20573

    10/05/2020, 1:38 AM
    e.g.
  • m

    mysterious-toddler-20573

    10/05/2020, 1:38 AM
    Copy code
    json
    "{
     "isTrusted": true,
     "screenX": 674,
     "screenY": 519,
     "clientX": 674,
     "clientY": 382,
     "ctrlKey": false,
     "shiftKey": false,
     "altKey": false,
     "metaKey": false,
     "button": 0,
     "buttons": 0,
     "relatedTarget": null,
     "pageX": 674,
     "pageY": 660,
     "x": 674,
     "y": 382,
     "offsetX": 422,
     "offsetY": 1,
     "movementX": 0,
     "movementY": 0,
     "fromElement": null,
     "toElement": "p",
     "layerX": 674,
     "layerY": 660,
     "view": "Window",
     "detail": 1,
     "sourceCapabilities": {},
     "which": 1,
     "NONE": 0,
     "CAPTURING_PHASE": 1,
     "AT_TARGET": 2,
     "BUBBLING_PHASE": 3,
     "type": "click",
     "target": "p",
     "currentTarget": null,
     "eventPhase": 0,
     "bubbles": true,
     "cancelable": true,
     "defaultPrevented": false,
     "composed": true,
     "timeStamp": 121176.27499997616,
     "srcElement": "p",
     "returnValue": true,
     "cancelBubble": false,
     "path": [
      "p",
      "div#main.w3-col.l10 m12",
      "div.w3-row.w3-white",
      "div#belowtopnav.w3-main.w3-light-grey",
      "body",
      "html",
      "Node",
      "Window"
     ]
    }"
  • m

    mysterious-toddler-20573

    10/05/2020, 1:38 AM
    as a header?
  • m

    mysterious-toddler-20573

    10/05/2020, 1:39 AM
    Or is this insane?
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:39 AM
    Hey Carson.. I didn't see the filtering update until just now. I'll definitely check it out. Seems like an absolute win for 0.03Kb.
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:39 AM
    By "sending" do you mean sending this to the server?
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:39 AM
    Right, as a header..
  • m

    mysterious-toddler-20573

    10/05/2020, 1:40 AM
    yeah, like as "HX-Trigger-Event"
  • m

    mysterious-toddler-20573

    10/05/2020, 1:40 AM
    seems like it might be useful for things like handling key events or knowing what triggered an event
  • m

    mysterious-toddler-20573

    10/05/2020, 1:40 AM
    but it does make requests more expensive. OTOH, the payload is such a small part of the request...
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:40 AM
    It's a little much. Especially to start. What does your release schedule say? Perhaps we play with this feature for a little bit, and then see what cases would require it?
  • m

    mysterious-toddler-20573

    10/05/2020, 1:41 AM
    could easily be done as an extension
  • m

    mysterious-toddler-20573

    10/05/2020, 1:41 AM
    today has been a "messing around w/ htmx' day
  • m

    mysterious-toddler-20573

    10/05/2020, 1:41 AM
    this should be done as an extension, definitely
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:42 AM
    Yes, probably a bit more expensive in bandwidth, but not so much to worry about. More like, expensive in terms of "something to keep supporting forever because one dude in Iceland has a weird use case, and he's really loud about it."
  • m

    mysterious-toddler-20573

    10/05/2020, 1:42 AM
    this is an extension
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:42 AM
    And yes, if it's possible to pass the original event in as an extension, then that dude in Iceland is still covered, but nobody else has to pay the price 🙂
  • m

    mysterious-toddler-20573

    10/05/2020, 1:42 AM
    i added extensions so my bad ideas could be firewalled from the main code base
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:42 AM
    Awesome.
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:43 AM
    I didn't realize this. So the whole "event filtering" feature is an extension? That's cool, if true -- on my first look at them, it didn't seem like it was possible because the event data wasn't there.
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:45 AM
    Great work, either way. Every day should be "messing around with htmx day"
  • m

    mysterious-toddler-20573

    10/05/2020, 1:50 AM
    no, the eventfiltering isn't an extension :/
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:59 AM
    Ok. I think I was just confused. Event filtering is a part of the core (sounds right). But, passing the event as a header would be an extension. Yes?
  • g

    gorgeous-ghost-95789

    10/05/2020, 1:59 AM
    That sounds totally reasonable to me.
  • g

    gorgeous-ghost-95789

    10/05/2020, 2:03 AM
    @mysterious-toddler-20573 -- one unrelated question: I'm working with eleventy to build the main site and everything is going well except for the main stylesheet. It's not being built (I assume) because the file extension is
    .scss.
    Is there an eleventy plugin or something that's supposed to compile this into css?
  • g

    gorgeous-ghost-95789

    10/05/2020, 2:04 AM
    I tried
    eleventy-plugin-sass
    but it doesn't seem to do the trick.
  • m

    mysterious-toddler-20573

    10/05/2020, 2:42 AM
    I believe that the sass plugin is in the project file, lemme check
1...525354...1146Latest