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

    gorgeous-ghost-95789

    12/19/2020, 8:42 PM
    We've been locked down since March. Mask mandates on and off, but my family has basically stayed separated ever since.
  • m

    most-jelly-15242

    12/19/2020, 11:22 PM
    @User If it's of any help, I have a modal example here https://app.getyoyo.dev/#list-with-modal-component But I am also using AlpineJS with it, although mostly for effects. To trap the focus, and finally to close it using a server triggered event.
  • h

    helpful-secretary-3515

    12/19/2020, 11:43 PM
    i went through your magic work 🙂 great job. i was checking also your source-code. really! wenn done
  • h

    helpful-secretary-3515

    12/19/2020, 11:44 PM
    i have this mission: 1. user clicks on a modal, it opens. 2. this modal, show him some information (without any requests to any url so far!), 3. and now (or after point 1.) htmx should start to poll (for an external URL).
  • h

    helpful-secretary-3515

    12/19/2020, 11:48 PM
    i can solve it in this way. thanks for that!! i am just wondering, is there a way to avoid this one request (getting the modal-html external).i think its a better user experience (avoiding this minimal delay) . but maybe i am wrong, and it makes no difference at all. i will test it soon with my backend (django/python)
  • g

    gorgeous-ghost-95789

    12/19/2020, 11:51 PM
    The difference with or without the modal boilerplate is minimal.
  • h

    helpful-secretary-3515

    12/19/2020, 11:51 PM
    which backend do you use, guys?
  • g

    gorgeous-ghost-95789

    12/19/2020, 11:51 PM
    It might make a difference if you’re starting to animate the modal before the inner content is already loaded, but it should not be a big factor.
  • g

    gorgeous-ghost-95789

    12/19/2020, 11:52 PM
    I’m building a custom Go server.
  • h

    helpful-secretary-3515

    12/19/2020, 11:53 PM
    nice. i read a lot of good stuff about go, and its easy and smart way to get things done. or why did you end up with this underdog Go? 🙂
  • m

    most-jelly-15242

    12/19/2020, 11:55 PM
    To trigger the polling after the modal opens then maybe you shouldn't "hook" it to the button. Instead you can add another element with a custom event name ("poll" instead of "click") and trigger that event after the modal opens.
  • m

    most-jelly-15242

    12/19/2020, 11:56 PM
    Actually, you are using bootstrap modals, right? There's a
    shown.bs.modal
    event that's triggered on the modal. So you could maybe do hx-trigger="shown.bs.modal" on the modal itself
  • g

    gorgeous-ghost-95789

    12/19/2020, 11:58 PM
    I wanted a simple, clean language for building app servers that I didn’t need to babysit. It’s been amazing for the last five years or so of projects.
  • m

    most-jelly-15242

    12/19/2020, 11:58 PM
    Here you go https://codepen.io/jreviews/pen/NWRgQGG?editors=1000
  • g

    gorgeous-ghost-95789

    12/19/2020, 11:59 PM
    Also, the bootstrap modal requires its own JavaScript to do the in/out animations. It’s not really all that sophisticated, and can be easily replicated with JavaScript/Hyperscript. That simplifies your site and means one less resource to load.
  • h

    helpful-secretary-3515

    12/20/2020, 1:09 AM
    fantastic!!!! thank you a lot !
  • e

    elegant-park-15829

    12/21/2020, 9:04 AM
    Should I open a bug report?
  • s

    salmon-xylophone-28580

    12/22/2020, 12:29 PM
    Today I told a friend about htmx and we looked at this page: https://htmx.org/ He develops since several years, so he is not a newcomer. But one thing he did no realize while reading the text of the start page: htmx transfers html-snippets. Maybe it would make sense to add this sentence: htmx keeps your software stack simple: You send SEO friendly HTML over the wire. You don't need React or Vue to build modern applications.
  • l

    lively-beach-14291

    12/22/2020, 5:31 PM
    `https://news.ycombinator.com/item?id=25507942
  • l

    lively-beach-14291

    12/22/2020, 5:31 PM
    HN attention on this general topic....
  • g

    gorgeous-airport-54386

    12/22/2020, 7:48 PM
    https://twitter.com/technosailor/status/1341430303643082758?s=20 posting this here because i don't have the energy to argue
  • g

    gorgeous-airport-54386

    12/22/2020, 7:50 PM
    tfw all static sites are an antipattern
  • g

    gorgeous-airport-54386

    12/22/2020, 8:11 PM
    better make this(https://github.com/WICG/webcomponents/issues/807) a reality
  • l

    lively-beach-14291

    12/22/2020, 9:26 PM
    https://turbo.hotwire.dev/handbook/
  • l

    lively-beach-14291

    12/22/2020, 9:27 PM
    So, it's nice to have market validation... it seems that Turbo can use WebSockets to avoid the HTTP overhead.
  • g

    gorgeous-ghost-95789

    12/22/2020, 9:29 PM
    I’m all for smaller and faster, but how much overhead is there with an HTTP request, anyway?
  • l

    lively-beach-14291

    12/22/2020, 9:31 PM
    I think it's significant, for small changes, the headers can easily be a multiple of the content. Remember, cookies and all sorts of things come along for the ride.
  • l

    lively-beach-14291

    12/22/2020, 9:31 PM
    We'll have to benchmark 😉
  • l

    lively-beach-14291

    12/22/2020, 9:32 PM
    With pure HTTP, the server-side is easy; once you go websocks, you need to decide on a protocol, ie, WebPack or what ever.
  • f

    future-boots-43048

    12/22/2020, 9:35 PM
    Don't forget SSE. 🙂
1...105106107...1146Latest