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

    miniature-lizard-24702

    11/13/2022, 12:16 AM
    but there are other libraries that do better with bundle size
  • m

    miniature-lizard-24702

    11/13/2022, 12:18 AM
    htmx is mainly about sending html over the file. most of the site could probably be built using htmx
  • m

    miniature-lizard-24702

    11/13/2022, 12:20 AM
    personally, I would say try alpine or stimulus (but I don't actually know how complex your audio component is)
  • t

    thankful-apartment-66679

    11/13/2022, 1:03 AM
    No
  • m

    mysterious-toddler-20573

    11/13/2022, 1:39 AM
    I think the audio part might somewhere where doing some scripting might be ideal. I know there is an audio API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API but I've never worked with it. I think htmx would dovetail pretty well with this, especially if you had a separate section in which the audio/media played, separate from the feed. One thing that drives me nuts in twitter is when I accidentally navigate away from something I'm listening to, or the feed hard refreshes, and I lose my place.
  • b

    busy-tomato-43957

    11/13/2022, 4:09 AM
    You're right that's what it says, but it doesn't say what "doesn't work" means. The current implementation works as "any hx response with an interior element that has hx-swap-oob is stripped from the response and entirely omitted from the document" where my preference would be "any hx response with an interior element that has hx-swap-oob attribute is inserted as normal except the attribute is ignored and omitted"
  • b

    busy-tomato-43957

    11/13/2022, 4:10 AM
    The upside of my version is that you don't have to add extra logic to add or remove hx-swap-oob depending on whether you're rendering a whole page or you're updating sections of the page. You can just always add it and the attribute itself is ignored when its not used in an effectful location
  • s

    shy-zebra-22292

    11/13/2022, 5:01 AM
    @white-london-59674 I... support what others said. For the general ui you can definitely do htmx to achieve the likeness of twitter. for the audio capture/playing: Web Audio API seems to be the way to do it with JS (or some other lib based on it?). You could use some Alpine.js component/Vue/Vanilla JS or something else you know and like to make "saving" the audio as a file to the BE look good to the user. Once you save the clip in the BE there is the thing of showing it to the other users again. I suspect you will need to put some kind of player UI. Probably separate for each clip.. something like SoiundCloud website?
  • s

    shy-zebra-22292

    11/13/2022, 5:12 AM
    Iiiii think I get what you are explaining but it brings me to the the limit of my "working memory" to understand so much abstract text at once 😁 I definitely need some examples to be sure. Probably the docs need some examples too. Like: "this will work: # code block: html code with htmx attributes # code block: response html and this won't work: #html code block #response code block "
  • c

    creamy-dawn-16627

    11/13/2022, 12:27 PM
    So I've done a todo list with htmx to play with more things and discover it's capabilities, what I quickly noticed is that the I don't always need to swap an entire element, but just some parts of the element, i'm now understanding that idiomorph is the way to go for such things. But from the backend perspective, i think it would be faster to send a response with just the elements that change for swap and to match them against the children of the target element ? Is there such a feature to achieve this? I think swap-oob doesn't cover it according to docs.
  • m

    mysterious-toddler-20573

    11/13/2022, 2:18 PM
    this seems reasonable
  • m

    mysterious-toddler-20573

    11/13/2022, 2:18 PM
    I'll need to review how OOB stuff works
  • c

    clean-helicopter-84116

    11/13/2022, 5:29 PM
    is there any way to disable the htmx on a button from javascript? i tried disabled but it doesn't work for touch events on elements
  • c

    clean-helicopter-84116

    11/13/2022, 5:31 PM
    also tried to change the trigger but i think it uses the trigger when page loads
  • m

    most-flag-2080

    11/13/2022, 5:49 PM
    github.com now uses hotwire!
  • g

    gorgeous-airport-54386

    11/13/2022, 5:49 PM
    how many libraries do they use?
  • m

    most-flag-2080

    11/13/2022, 5:49 PM
    big news!
  • g

    gorgeous-airport-54386

    11/13/2022, 5:50 PM
    react, hotwire...
  • r

    refined-waiter-90422

    11/13/2022, 6:20 PM
    Cool yeah. Hotwire is a natural fit for github, shopify, gitlab..they are on Rails, probably Rails 7 which ships with hotwire built-in.
  • r

    refined-waiter-90422

    11/13/2022, 6:20 PM
    Rails 7 is a sweet piece of work
  • r

    refined-waiter-90422

    11/13/2022, 6:24 PM
    DHH was pretty proud of removing the JavaScript build step in rails 7
  • p

    plain-church-24039

    11/14/2022, 10:04 AM
    I just take a peek at htmx source code, I'm not frontend guys but this is 2022 do we still need AMD insanity?
  • t

    tall-dinner-62086

    11/14/2022, 10:06 AM
    We still support ie 11, the current year means very little to htmx
  • p

    plain-church-24039

    11/14/2022, 10:09 AM
    Here I thought it coded using modern js but downscaled for "legacy" browser
  • r

    refined-waiter-90422

    11/14/2022, 1:12 PM
    We have this conversation legitimately every 2 months lol. Browsers need to fix the "run htmx without an entire freakin web server installed" story regarding CORS/js modules, before AMD can go away.
  • r

    refined-waiter-90422

    11/14/2022, 1:12 PM
    aka it's still there for very good reasons.
  • b

    boundless-vase-80440

    11/14/2022, 1:38 PM
    aka Chesterton's fence
  • m

    mysterious-toddler-20573

    11/14/2022, 2:51 PM
    > “I am the punishment of God...If you had not committed great sins, God would not have sent a punishment like me upon you.” > > ― AMD
  • d

    dazzling-refrigerator-62542

    11/14/2022, 2:56 PM
    will the next major version of htmx drop ie11?
  • m

    mysterious-toddler-20573

    11/14/2022, 2:59 PM
    htmx 2.0 will drop IE support
1...904905906...1146Latest