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

    hundreds-camera-24900

    11/01/2022, 12:33 PM
    If you're using Alpine, give the Alpine morph extension a try?
  • h

    hundreds-camera-24900

    11/01/2022, 12:33 PM
    https://htmx.org/extensions/alpine-morph/
  • b

    boundless-vase-80440

    11/01/2022, 2:33 PM
    are there any crud-generators for htmx? similar to the scaffold in rails? is this a stupid idea (or maybe just stupid)?
  • b

    bitter-machine-55943

    11/01/2022, 2:40 PM
    I like the idea of this. I’ve used stuff like cookiecutter for this. But the CRUD part depends on the backend, which could vary significantly (express, PHP, ASP, Java, Python, etc) which is different from rails where it is the backend and knows about the database etc
  • b

    boundless-vase-80440

    11/01/2022, 2:41 PM
    you are right, yes. I was thinking of some crud-generator that targeted HTMX as part of the stack.
  • b

    boundless-vase-80440

    11/01/2022, 2:44 PM
    anyway, I think I will give it a try
  • b

    bitter-machine-55943

    11/01/2022, 2:49 PM
    Would you start with the assumption there’s a CRUD backend in place, and this would be the HTMX part for a general CRUD backend? Or would there be different ones for different stacks?
  • b

    boundless-vase-80440

    11/01/2022, 3:11 PM
    Hmm, my first thinking is to start with a specific stack that includes a specific backend... then I will see what I could generalize... But I am open to suggestions! πŸ™‚
  • m

    mysterious-toddler-20573

    11/01/2022, 3:20 PM
    my vague idea is that various back ends will create generators or template projects w/ htmx integrated. this is, unfortunately, one of the bad aspects of being back-end agnostic, when compared with something like hotwire+rails
  • b

    boundless-vase-80440

    11/01/2022, 3:21 PM
    missing.backend ?
  • b

    boundless-vase-80440

    11/01/2022, 3:21 PM
    ducks
  • m

    mysterious-toddler-20573

    11/01/2022, 3:29 PM
    oof
  • g

    gorgeous-airport-54386

    11/01/2022, 3:30 PM
    maybe I should rename this to missing.ts https://github.com/dz4k/deno-htmx-starter/
  • m

    mysterious-toddler-20573

    11/01/2022, 3:32 PM
    speaking of, taking a bit of liberty here in #725789747212976259 to tell folks that @gorgeous-airport-54386 has released #941815579440992337 1.0: the idea of https://missing.style is: - To style vanilla HTML reasonably well, like classes-CSS libraries do - To provide a small, 80/20 set of utilities for building common UI patterns - To use ARIA attributes (rather than classes) where appropriate to drive styling (e.g. tabs) so that doing the right thing from an accessibility standpoint is encouraged - To provide a rich set of CSS variables so you can customize the look and feel programmatically You can include it on a site with this:
    Copy code
    html
    <link rel="stylesheet" href="https://the.missing.style/v1.0.0/missing.min.css">
    missing.css is obviously, by design, bare bones when compared w/ something like bootstrap, and, by itself, is for small, internal or utility sites, but it can also be used as a base for a more elaborate, application-specific style sheet we have plans to use it as the basis for an upcoming commercial application we are working on. congrats @gorgeous-airport-54386 ! πŸ”₯ πŸ”₯ πŸ”₯
  • g

    gorgeous-airport-54386

    11/01/2022, 3:33 PM
    needs a
    v
    in the URL
  • m

    mysterious-toddler-20573

    11/01/2022, 3:33 PM
    taken from https://missing.style/
  • g

    gorgeous-airport-54386

    11/01/2022, 3:35 PM
    fixed
  • r

    ripe-action-67367

    11/01/2022, 4:02 PM
    @rich-autumn-98740 as a follow up, check out https://github.com/bigskysoftware/htmx/pull/1116
  • l

    limited-scientist-86362

    11/02/2022, 8:39 AM
    Hi, new to htmx so trying to get a high level view and how it could be used in company techstack. Is there an eCommerce implementation done by anyone? Also was interested in the sponsor support from ButterCMS. Does that mean their CMS works/integrates with htmx?
  • t

    tall-dinner-62086

    11/02/2022, 9:58 AM
    I don't have anything to show you, but anything "works" with htmx so long as it can return html. At a high level, you replace client-side templates with server-side templates. Instead of sending json data to the client and building the html with javascript, you build the html on the server and then the client just puts it where you want it to be.
  • m

    mysterious-toddler-20573

    11/02/2022, 3:46 PM
    e-commerce should be something htmx is extremely well suited for. I"m not sure how butter is using htmx, I will ask!
  • b

    busy-action-85810

    11/02/2022, 5:36 PM
    Is it wise to always gracefully degrade if Javascript is disabled so the HTML UI is at least functional when HTMX can't be used? Attached is a screen shot of simple tasks that can be completed or uncompleted. At the moment, they are checkbox tags (not wrapped in a form which could make an HTTP PATCH request). So if JavaScript (HTMX) is disabled, the HTTP PATCH request won't be made. Doing so would be a lot more forms embedded within the HTML document but maybe that's a good approach? Curious what the seams are -- where you draw the line -- in terms of DOM design in this regard when using HMTX as an architecture and supporting graceful degradation?
  • b

    busy-action-85810

    11/02/2022, 5:37 PM
    (opps, here's the sceenshot)
  • r

    ripe-action-67367

    11/02/2022, 5:42 PM
    Fully featured graceful degradation is a question of requirements. Only you can decide, based on your app capabilities and expected user base, whether it's feasible to provide a fallback for all (or most of) interactions on the page
  • r

    ripe-action-67367

    11/02/2022, 5:45 PM
    Answering specific question about checkboxes, you can't provide fallback, as patch requests are not supported as per HTML standard
  • r

    ripe-action-67367

    11/02/2022, 5:45 PM
    you would have to do it through POST
  • r

    ripe-action-67367

    11/02/2022, 5:46 PM
    furthermore, checkboxes can't trigger form submission without JS
  • r

    ripe-action-67367

    11/02/2022, 5:46 PM
    as always, "it depends"(c)
  • b

    busy-action-85810

    11/02/2022, 5:48 PM
    Thanks, that makes sense. Are there any design guidelines that are documented anywhere on the site. I don't think graceful degradation is mentioned in the essays (https://htmx.org/essays). Maybe that's not the most appropriate place to look. Just curious if there are other sources to read up on this that might apply to this space. Ha, yeah, I'm using Rails as my framework so when I say PATCH/PUT I mean wrapped within an POST request. πŸ˜… ...but, your right, HTTP doesn't support those methods directly.
  • r

    ripe-action-67367

    11/02/2022, 5:49 PM
    oh, yeah, I heard that rails has a lot of cool stuff like that, but never worked with it myself
1...886887888...1146Latest