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

    mysterious-toddler-20573

    10/13/2022, 8:20 PM
    šŸ˜‘
  • e

    echoing-dress-67727

    10/13/2022, 8:20 PM
    Are you using
    package-lock.json
    or
    yarn.lock
    to pin the version?
  • w

    white-motorcycle-95262

    10/13/2022, 8:21 PM
    I'm not super familiar with npm, but I do know that
    package-lock.json
    is being used
  • e

    echoing-dress-67727

    10/13/2022, 8:22 PM
    Okay. In there, you should find
    htmx.org
    somewhere, and it should specify a version. Is it 1.8.0 or 1.7.0? I'd think 1.8.0, but šŸ¤·ā€ā™‚ļø
  • e

    echoing-dress-67727

    10/13/2022, 8:24 PM
    Assuming it's 1.8.0, the next thing I'd check is whether your code has been recompiled on production, and if the server has been restarted since that.
  • w

    white-motorcycle-95262

    10/13/2022, 8:24 PM
    It's listed twice. But doing
    npm list
    shows 1.8
  • e

    echoing-dress-67727

    10/13/2022, 8:26 PM
    Seeing it twice makes sense. The first
    ^1.7.0
    says "I want any version above 1.7, but below 2.0" so, 1.7.0 and 1.8.0 are both allowed. (more about that versioning syntax here: https://docs.npmjs.com/about-semantic-versioning) The second screenshot is where it's pinned to a specific version (1.8.0). So when you run
    npm install
    , it should be using 1.8.0
  • m

    mysterious-toddler-20573

    10/13/2022, 8:27 PM
    https://github.com/bigskysoftware/htmx/commit/c6c139546907806c18ef0dbd5da72352ac05155d
  • m

    mysterious-toddler-20573

    10/13/2022, 8:27 PM
    head merge extension landed in dev just now
  • w

    white-motorcycle-95262

    10/13/2022, 8:27 PM
    Yeah, hmm. I'll try running
    npm intall
    on the prod server. Thanks for your help
  • m

    mysterious-toddler-20573

    10/13/2022, 8:28 PM
    will cut a 1.8.3 with it soon /cc@square-oyster-36295
  • e

    echoing-dress-67727

    10/13/2022, 8:29 PM
    @mysterious-toddler-20573 any thoughts on this?
  • e

    echoing-dress-67727

    10/13/2022, 8:29 PM
    I can submit a PR if you agree that's an okay change
  • m

    mysterious-toddler-20573

    10/13/2022, 8:30 PM
    I kinda don't want to move that logic around, I can see it breaking things in strange ways for people
  • e

    echoing-dress-67727

    10/13/2022, 8:30 PM
    Hmm, okay
  • e

    echoing-dress-67727

    10/13/2022, 8:33 PM
    I just feel like "polling + redirect" is a common pattern. eg I have a delayed job running on my server, I want to check if it's done, and when it's done, I want to send the user to a new page that they now have access to. I could solve it with
    HX-Trigger
    like you said, but I agree that feels hacky. I could also solve it with load polling, but imo that obfuscates the polling a bit, making it more complicated to understand.
    every 1s
    makes it pretty clear it's polling, whereas
    load delay:1s
    doesn't read as polling to me
  • e

    echoing-dress-67727

    10/13/2022, 8:33 PM
    I agree it could break for people though. So a minor version bump would probably be required. I doubt a major one is needed though, personally
  • b

    boundless-vase-80440

    10/13/2022, 9:29 PM
    I have been tripped up by nginx silently dropping non-standard headers once... not sure if that's your case...
  • h

    hundreds-cartoon-20446

    10/13/2022, 9:41 PM
    My head hurts, but I think there was more to the Safari back button issue than I thought: https://github.com/bigskysoftware/htmx/issues/1076#issuecomment-1278206624
  • m

    mysterious-toddler-20573

    10/13/2022, 10:27 PM
    The javascript history api will be the death of me
  • m

    miniature-lizard-24702

    10/13/2022, 11:54 PM
    Sometimes I worry for the future of software and software development
  • m

    mysterious-toddler-20573

    10/14/2022, 12:25 AM
    you should
  • b

    bitter-machine-55943

    10/14/2022, 2:05 AM
    Hey, is it possible to swap CSS or JS using HTMX? Like can you swap the or tag?
  • m

    mysterious-toddler-20573

    10/14/2022, 2:45 AM
    in a head tag?
  • b

    bitter-machine-55943

    10/14/2022, 3:40 AM
    Maybe. I guess I’m trying to think through how far the concept can be extended. Like if the server-side could drive not only HTML swaps, but also hot swap CSS and JS, what that might enable.
  • m

    mysterious-toddler-20573

    10/14/2022, 3:59 AM
    I am currently working on an extension to merge head tags: https://discord.com/channels/725789699527933952/725789747212976259/1030151411079585892
  • m

    mysterious-toddler-20573

    10/14/2022, 3:59 AM
    I'm gonna try to cut a release next week w/ it
  • b

    bitter-machine-55943

    10/14/2022, 4:19 AM
    Oh, I should have just scrolled up 😊
  • f

    freezing-waitress-26396

    10/14/2022, 8:10 AM
    Honestly I looked at htmx and I wouldn't have thought "swap out CSS/JS/Head with it" would be a use case and I don't intend to do it. I see how ppl have use for it though.
  • f

    freezing-waitress-26396

    10/14/2022, 8:11 AM
    Didn't even cross my mind
1...854855856...1146Latest