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

    green-army-74971

    08/31/2022, 11:53 AM
    that makes sense, i haven't really used hx-boost yet.
  • g

    green-army-74971

    08/31/2022, 11:55 AM
    though some of my htmx things are hx-post, which i guess would be a less good fit for hx-boost
  • m

    mysterious-toddler-20573

    08/31/2022, 12:32 PM
    an interesting idea
  • m

    mysterious-toddler-20573

    08/31/2022, 12:33 PM
    iirc, @gorgeous-ghost-95789 did the modal examples...
  • r

    ripe-action-67367

    08/31/2022, 12:38 PM
    links with boosting for navigating, buttons for actions. divs and spans are, in fact, the worst, cause you don't get proper keyboard navigation and screen reader support
  • m

    mysterious-toddler-20573

    08/31/2022, 12:40 PM
    this is the way
  • g

    green-army-74971

    08/31/2022, 12:42 PM
    and would you call bringing up a modal navigation or an action?
  • g

    green-army-74971

    08/31/2022, 12:43 PM
    (don't worry, i was never really gonna go with raw s...)
  • r

    ripe-action-67367

    08/31/2022, 12:43 PM
    great question. Best answer - it depends
  • r

    ripe-action-67367

    08/31/2022, 12:43 PM
    I would think the following way
  • r

    ripe-action-67367

    08/31/2022, 12:45 PM
    Typically modals are used in the context of actions, such as confirmation dialogs, additional input prompts etc. In which case, I would use buttons
  • r

    ripe-action-67367

    08/31/2022, 12:45 PM
    However sometimes modals are used as a way of displaying detailed information about something, like a details link in a row of a table
  • r

    ripe-action-67367

    08/31/2022, 12:46 PM
    In which case a link would also be fine
  • r

    ripe-action-67367

    08/31/2022, 12:48 PM
    I guess, the best way to determine your choice is to ask "Does this click make sense if opened in a new tab"
  • r

    ripe-action-67367

    08/31/2022, 12:48 PM
    "Or loaded from a bookmark or something"
  • g

    green-army-74971

    08/31/2022, 12:48 PM
    nice
  • e

    elegant-raincoat-69176

    08/31/2022, 12:49 PM
    Anyone have any experience of using HTMX with RazorPages, specifically with reference to management? I've got a dialog containing a form that puts the data back to my back end, but my redirect is failing on the main page reload. I'm currently clueless as to why...
  • e

    elegant-raincoat-69176

    08/31/2022, 12:50 PM
    Hmmm... modals seems to be the theme of the day :-D.
  • g

    green-army-74971

    08/31/2022, 12:50 PM
    yeah, happy with that as an overall approach. i've had to deviate a bit because bootstrap wouldn't style things the way i wanted, so i've ended up with an unprincipled mix of and on the page i'm workin on, but that's more a question of workarounds than principle.
  • m

    mysterious-toddler-20573

    08/31/2022, 1:15 PM
    https://twitter.com/buhakmeh can probably help
  • e

    elegant-raincoat-69176

    08/31/2022, 1:18 PM
    Yes, highly likely indeed. However, I did find a "solution" to my problem. HX-Refresh works nicely for my needs. It's not perfect, but it is done. Perfect can come later.
  • e

    elegant-raincoat-69176

    08/31/2022, 1:20 PM
    I just added a "HX-Refresh":"true" header to my response and voila, the page reloads. Not great, but the customer won't be bothered by it and I can fix it later once I've had a chance to fix all the other stuff in my to-do pile.
  • e

    elegant-raincoat-69176

    08/31/2022, 1:22 PM
    I should have, of course, posted my question on the #963040198390861875 channel. That would have been a better place for it.
  • g

    gorgeous-ghost-95789

    08/31/2022, 1:46 PM
    Howdy! It’s been a while, but as I remember, Bootstrap requires a big JS library to handle the final “closing” animation on its modals. While we could make it work in gyms, it’s a lot easier to in-line a little JavaScript/Hyperscript to do this instead. The example should include the necessary code — you just don’t need to include the Bootstrap JS file for it to work.
  • g

    gorgeous-ghost-95789

    08/31/2022, 1:46 PM
    Let me know if you need more help!
  • a

    adamant-state-54102

    08/31/2022, 1:51 PM
    @mysterious-toddler-20573 Bump in case you missed this...
  • m

    mysterious-toddler-20573

    08/31/2022, 2:00 PM
    not currently, I have thought about supporting the following formats:
    #foo
    - look up a local template or fragment
    js:foo()
    - execute a function
    hs:foo()
    - execute a hyperscript function the right thing is to make it pluggable so people can add any sort of prefix "request handler" they want
  • a

    adamant-state-54102

    08/31/2022, 2:01 PM
    Just curious: I haven't played with existing plugin system. Could it be used to implement this feature, or is it "deeper" in the sense that it would require a core source code change?
  • m

    mysterious-toddler-20573

    08/31/2022, 2:03 PM
    I don't think there is a good plugin point for this particular feature right now
  • l

    late-king-98305

    08/31/2022, 3:24 PM
    The more I've thought about it, I know I could it with the Giraffe View Engine. It stores the entire render target as a collection of nodes, so I could spin through that collection and find the node with the specified
    id
    attribute, and render that in isolation; it would grab all the children automatically.
1...804805806...1146Latest