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

    bitter-machine-55943

    05/24/2023, 1:22 AM
    Can I use HTMX with Excel?
  • c

    cuddly-keyboard-70746

    05/24/2023, 1:24 AM
    uhm
  • c

    cuddly-keyboard-70746

    05/24/2023, 1:24 AM
    cant tell if trolling or serius
  • b

    bitter-machine-55943

    05/24/2023, 1:24 AM
    Perfect. Nailed it
  • m

    melodic-dream-97949

    05/24/2023, 2:09 AM
    yeah, definitely need server side validation. i’ll look at a swap-oob solution. Being this is my first htmx app, I haven’t used that attribute before 😄 just some basic form stuff and request on button clicks etc
  • n

    nutritious-doctor-3501

    05/24/2023, 2:26 AM
    Hey all, working on react -> htmx side projects, we're back
  • g

    gorgeous-ghost-95789

    05/24/2023, 3:00 AM
    Trello does a good job with giving modals their own URL. and especially with htmx, most of the worst UX of modals can be handled. It took some time, but I’m pretty pleased with how these turned out (dedicated URLs and all) https://mastodon.social/@benpate/109685200005465187
  • g

    gorgeous-ghost-95789

    05/24/2023, 3:04 AM
    You know the common htmx pattern of
    if (Header.HX-Request != "") then render_the_whole_page_not_just_a_fragment()
    ... You basically just do that but with a whole background page. It's a little bit of work, but the outcome is f'n glorious.
  • r

    red-farmer-97020

    05/24/2023, 6:11 AM
    I've been writing some basic tests using https://hurl.dev/ recently, feels pretty nice. A good language agnostic testing framework for hypermedia backends. it doesn't use a browser, so the HTMX attributes can't be tested but you can use it to test whether certain snippets are returned with certain header values, eg if hx-boosted is sent does your backend actually return something different?
  • r

    red-farmer-97020

    05/24/2023, 6:12 AM
    Eg, here's a test file I wrote for my game tracker:
    Copy code
    toml
    POST http://localhost:8080/game
    [Options]
    location: true 
    variable: bidders=//label[contains(text(), 'Bidder')]/following-sibling::select[1]/option
    
    [FormParams]
    num: 5
    player1: me
    player2: you
    player3: them
    player4: who
    player5: eh
    
    HTTP 200
    
    [Asserts]
    xpath "{{bidders}}" count == 5
    xpath "string({{bidders}}[1])" == "me"
    xpath "string({{bidders}}[2])" == "you"
    xpath "string({{bidders}}[3])" == "them"
    xpath "string({{bidders}}[4])" == "who"
    xpath "string({{bidders}}[5])" == "eh"
    I'm having to relearn xpath, but it's pretty neat
  • a

    adventurous-ocean-93733

    05/24/2023, 11:22 AM
    https://news.ycombinator.com/item?id=36056376
  • m

    mysterious-toddler-20573

    05/24/2023, 1:41 PM
    LET US PERAMBULATE
  • m

    mysterious-toddler-20573

    05/24/2023, 1:41 PM
    (don't read the comments)
  • b

    bitter-machine-55943

    05/24/2023, 1:41 PM
    Where do accordions rank on the [modal—-new-page] spectrum?
  • m

    mysterious-toddler-20573

    05/24/2023, 1:41 PM

    https://cdn.discordapp.com/attachments/725789747212976259/1110925568985268344/image.png▾

  • q

    quick-lamp-41411

    05/24/2023, 4:42 PM
    I'm in this photo and I don't like it
  • f

    fierce-fish-43125

    05/24/2023, 8:21 PM
    What's the benefit of using "hx-boost"?
  • a

    adventurous-ocean-93733

    05/24/2023, 8:29 PM
    https://hypermedia.systems/book/hypermedia-systems/#_boosted_links > with a boosted link, the browser is able to avoid any processing associated with the head tag. The head tag often contains many scripts and CSS file references. In the boosted scenario, it is not necessary to re-process those resources: the scripts and styles have already been processed and will continue to apply to the new content. This can often be a very easy way to speed up your hypermedia application.
  • f

    fierce-fish-43125

    05/24/2023, 8:35 PM
    Cool, thank you. Any pitfalls? Does it play nice with JS(ie. document onload)?
  • f

    fierce-fish-43125

    05/24/2023, 8:36 PM
    Actually, just saw on the docs that htmx has it's own onload that I should probably be using.
  • h

    high-pencil-36972

    05/24/2023, 8:49 PM
    Hello everyone, I’m developing a Springboot application with Thymeleaf+HTMX. My issue is when I click on a button, my htmx content keep the old model.addAttribute(“users”,users); object. Help please.
  • h

    high-pencil-36972

    05/24/2023, 8:53 PM
  • a

    adventurous-ocean-93733

    05/24/2023, 10:12 PM
    Probably worth asking in #940241072959922176
  • b

    bulky-kilobyte-96254

    05/24/2023, 10:21 PM
    @mysterious-toddler-20573 where can i cop htmx merch
  • b

    bitter-machine-55943

    05/25/2023, 12:29 AM
    He only sells the HTMX paintbrush. You can use it to create your own merch, on whatever you like
  • f

    fierce-fish-43125

    05/25/2023, 12:47 AM
    Does HTMX swap the whole body out, or just the body's contents? I have an hx-headers attribute on the body which contains a CSRF token and it doesnt seem to be getting updated properly :/
  • f

    fierce-fish-43125

    05/25/2023, 1:05 AM
    Oh, looks like that's documented as a limitation for hx-swap. I guess I'll have to return the CSRF token in a header and use JS to update it.
  • f

    fierce-fish-43125

    05/25/2023, 1:06 AM
    Or I can add a wrapper around the whole body I guess
  • b

    bulky-kilobyte-96254

    05/25/2023, 2:29 AM
    I did order myself this t shirt now.

    https://cdn.discordapp.com/attachments/725789747212976259/1111118764084301954/image0.jpg▾

  • a

    adventurous-ocean-93733

    05/25/2023, 6:21 AM
    Before we all rush out to make our merch. I should probably point out that one of these logos I contributed was supposed to be a brand jacking of Elixir but due to unforeseen factors (some say late night drinking) was actually a rando life sciences company called Elixir.

    https://cdn.discordapp.com/attachments/725789747212976259/1111177160200294460/IMG_7979.png▾

1...113911401141...1146Latest