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

    some-airline-73512

    02/23/2023, 10:55 PM
    I was in Java world my first decade of programming, used JetBrains. Then got tiered that my laptop battery was dying In a few hours and tried vscode. I’m very heavy shortcut user, so I was expecting that there was no way I could switch away from JetBrains. But it happened quiet quickly and very easily. For 1-2 weeks
  • m

    mysterious-toddler-20573

    02/23/2023, 11:00 PM
    understand, but I will say two things
  • m

    mysterious-toddler-20573

    02/23/2023, 11:00 PM
    1) jet brains supports open source work in what appears to be a genuine manner
  • m

    mysterious-toddler-20573

    02/23/2023, 11:01 PM
    2) if you don't pay for a product, the product is you (to an extent)
  • m

    mysterious-toddler-20573

    02/23/2023, 11:01 PM
    in general, I try to pay for my tools if a good underdog option is available
  • m

    mysterious-toddler-20573

    02/23/2023, 11:02 PM
    (not judging, this is just my philosophy)
  • m

    mysterious-toddler-20573

    02/23/2023, 11:02 PM
    narrator: he uses github
  • m

    mysterious-toddler-20573

    02/23/2023, 11:02 PM
    😑
  • g

    gorgeous-ghost-95789

    02/23/2023, 11:04 PM
    In general, yes. If you're not paying for it, then you're the product. But I prefer to think of VSCode as a loss leader... in a standing-on-the-street-corner "the first dose is free" kind of way. MS reeeeeeaaally wants you in their developer and cloud ecosystem, and they're willing to give you LITERALLY THE BEST DEVELOPMENT TOOL AND I WILL FIGHT YOU OVER THIS FACT for free.
  • g

    gorgeous-ghost-95789

    02/23/2023, 11:05 PM
    snorts another bump of VSCode
  • m

    mysterious-toddler-20573

    02/23/2023, 11:11 PM
    are you aware that it is written in TYPESCRIPT?
  • m

    mysterious-toddler-20573

    02/23/2023, 11:11 PM
    checkmate
  • b

    busy-tomato-43957

    02/23/2023, 11:20 PM
    Hey @mysterious-toddler-20573, any thoughts on my one-liner PR that helps simplify htmx template responses? https://github.com/bigskysoftware/htmx/pull/1235
  • m

    mysterious-toddler-20573

    02/23/2023, 11:32 PM
    seems like a breaking change, iirc someone requested the opposite feature at one point
  • m

    mysterious-toddler-20573

    02/23/2023, 11:32 PM
    i have to say, I feel like I haven't gotten oob swaps quite right yet
  • b

    busy-tomato-43957

    02/23/2023, 11:33 PM
    yeah I've noticed that the oob-swap feature is discussed a lot here
  • b

    busy-tomato-43957

    02/23/2023, 11:39 PM
    in my opinion, the oob swap feature should be simple. if you want to swap something that the request isn't targeting, put that element in the root of the response. if "oob-swap" shows up elsewhere just ignore the attribute. if you want a more involved tree diffing/merging solution then use one of the more advanced extensions
  • m

    mysterious-car-3675

    02/23/2023, 11:41 PM
    if only extensions were easy to write and build your own version paying only for the features you choose.... 🪄
  • m

    mysterious-toddler-20573

    02/23/2023, 11:47 PM
    made worse by the finicky nature of table element parsing (behold, the horror: https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L267
  • m

    mysterious-toddler-20573

    02/23/2023, 11:48 PM
    it is sadly very hard to parse arbitrary HTML content
  • b

    busy-tomato-43957

    02/23/2023, 11:48 PM
    yes I was going to mention that html tables throw a bug ugly wrench into the "simple oob swap" concept
  • m

    mysterious-toddler-20573

    02/23/2023, 11:49 PM
    this becomes particularly true in htmx 2, if we support parsing entire documents (for head merging support, see idiomorph: https://github.com/bigskysoftware/idiomorph/blob/main/src/idiomorph.js#L305)
  • m

    mysterious-toddler-20573

    02/23/2023, 11:49 PM
    😑
  • m

    mysterious-toddler-20573

    02/23/2023, 11:50 PM
    I think template tags are the answer here, but I need to think about it more
  • m

    mysterious-toddler-20573

    02/23/2023, 11:50 PM
  • m

    mysterious-toddler-20573

    02/23/2023, 11:51 PM
    sometimes I sits and thinks
  • m

    mysterious-toddler-20573

    02/23/2023, 11:51 PM
    and sometimes I just sits
  • b

    busy-tomato-43957

    02/24/2023, 9:28 AM
    I briefly looked at template tags before and they seem... abstractly interesting (?), but I couldn't see how they would be useful to htmx specificially
  • g

    gorgeous-airport-54386

    02/24/2023, 9:36 AM
    They parse their contents in a way that avoids a lot of the pitfalls of
    DOMParser
    and
    createHTMLDocument
    . For example,
    Copy code
    html
    <template><td></td></template>
    will successfully create a element -- and nothing more -- in the template's
    .content
  • b

    busy-tomato-43957

    02/24/2023, 9:37 AM
    oh that's handy
1...104210431044...1146Latest