https://htmx.org logo
Join Discord
Powered by
# πŸ”₯-django-htmx
  • e

    eager-tiger-27508

    11/05/2021, 6:44 PM
    For those who don't use TailwindUI, dev tools will not allow you to get the code for free. They have free examples that you can use, but the rest is behind a paywall. I bought it pretty early in its' development and it's been a great investment. Highly recommend. I really like the combination of HTMX+Tailwind. Works like a charm.
  • b

    bitter-dog-98292

    11/05/2021, 6:44 PM
    Nice
  • b

    bitter-dog-98292

    11/05/2021, 6:44 PM
    Me too
  • b

    bitter-dog-98292

    11/05/2021, 6:45 PM
    But yeah tailwindui are just examples and without their library headlessui, it’s more an inspiration than something else
  • b

    bitter-dog-98292

    11/05/2021, 6:47 PM
    So yeah if I were you, I would write headlessui components like in hyperscript but with another name. Like hyperui lol
  • e

    eager-tiger-27508

    11/05/2021, 6:47 PM
    Yep, that sounds like what I'll do. I'll get back to you when I have something going. Thank you for your input!
  • e

    eager-tiger-27508

    11/05/2021, 6:48 PM
    +1 for hyperui haha
  • b

    bitter-dog-98292

    11/05/2021, 6:50 PM
    Np πŸ˜‰
  • b

    brave-raincoat-81051

    11/05/2021, 10:53 PM
    @User I both paid for TailwindUI and am currently using alpine js, where in dev tools do I need to look to see what they're using in Alpine JS?
  • b

    brave-raincoat-81051

    11/05/2021, 10:56 PM
    ah ok I believe I've found it
  • c

    colossal-tomato-28211

    11/05/2021, 11:17 PM
    @User in case you haven't found it, here's a good example.
  • c

    colossal-tomato-28211

    11/05/2021, 11:18 PM
    this section of the doc also has a good one: https://tailwindui.com/documentation#html-dynamic-classes
  • b

    brave-raincoat-81051

    11/05/2021, 11:19 PM
    are you referring to the dev tools elements tab and then using the element finder tool?
  • c

    colossal-tomato-28211

    11/05/2021, 11:22 PM
    i am referring to right-clicking the button whose transition i want to see and choosing "Inspect" from firefox's context menu. that highlights the node in the inspector, where i can see the scripts attached to it
  • c

    colossal-tomato-28211

    11/05/2021, 11:23 PM
    so the thing highlighted in the blue square is what i was just right-clicking and inspecting
  • b

    brave-raincoat-81051

    11/05/2021, 11:23 PM
    yeah and then looking at this to see what they did with alpine to achieve it?
  • c

    colossal-tomato-28211

    11/05/2021, 11:24 PM
    yep
  • c

    colossal-tomato-28211

    11/05/2021, 11:24 PM
    they used to include some alpine-focused instructions, but i can't find that anymore other than the doc section i linked
  • b

    brave-raincoat-81051

    11/05/2021, 11:25 PM
    yeah this is a good note, thank you
  • e

    eager-tiger-27508

    11/06/2021, 2:20 PM
    @User Yep @User is right. That's how I do it.
  • b

    brave-raincoat-81051

    11/06/2021, 10:09 PM
    so Ive got an initial form that is just a select drop down with 3 choices. Each one of those 3 choices should cause a different form to render right below the drop down. So basically if they pick option A, then right below the drop down they get Form A, if they pick option B from the drop down then they get form B and so on. Any recommendation on how to tackle this? Mainly wondering how the view should be handled...I've got the select dropdown setup such that its trigger="changed" so that works great for sending a request everytime the user selects a different option. Should this be two views, one for the select dropdown and one for handling the other form? I'm doing FBVs for this
  • b

    brave-raincoat-81051

    11/07/2021, 12:04 AM
    arg, super close. When I change the select from the default of --- to an option it loads the new form correctly, in the correct spot. But when I swap it back to --- it actually nests the entire page within that id instead, lol :x
  • b

    brave-raincoat-81051

    11/07/2021, 12:05 AM
    inception haha
  • b

    brave-raincoat-81051

    11/07/2021, 12:10 AM
    ah ok I think I got it
  • b

    bitter-dog-98292

    11/07/2021, 7:25 AM
    https://htmx.org/examples/value-select/
  • b

    bitter-dog-98292

    11/07/2021, 7:26 AM
    Instead of the second select, you return a whole form
  • b

    bitter-dog-98292

    11/07/2021, 7:27 AM
    And then when you submit, you submit the value of your first choice and then you handle the three cases if your view
  • b

    brave-raincoat-81051

    11/07/2021, 2:17 PM
    thats actually exactly what I ended up doing. I ended up with a view for the main select form, and then one view for each of the options. Maybe not necessary but it reads really cleanly
  • b

    bitter-dog-98292

    11/07/2021, 3:39 PM
    Nice
  • a

    ambitious-london-57076

    11/07/2021, 8:12 PM
    Hi all, I am just beginning to learn HTMX and have a issue with changing an image for an icon when an item is bookmarked. The logic in the back end is working with Django but I am not sure how to return a response correctly for this.
1...141516...100Latest