bigskysoftware / htmx-extensions

167 stars 51 forks source link

New attribute-tools extension based on class-tools #70

Closed jamcole closed 3 months ago

jamcole commented 3 months ago

This is a new extension that provides similar functionality as class-tools, but for arbitrary attributes.

I use picoCSS and it uses attributes for various display functionality instead of just classes.

The operations are "set" and "remove" (add and toggle from class-tools weren't necessary):

The code-base is a copy of class-tools and update for the new functionality, so hopefully I followed all the project conventions.

netlify[bot] commented 3 months ago

Deploy Preview for htmx-extensions ready!

Name Link
Latest commit 50e1d5088cb606a3884a77777512fdbf35271188
Latest deploy log https://app.netlify.com/sites/htmx-extensions/deploys/66aaebe4bad02600087fffc2
Deploy Preview https://deploy-preview-70--htmx-extensions.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Telroshan commented 3 months ago

Hey, I would suggest publishing your own extension repo for now and list it in this repo's community extensions. Adding an extension to the repo itself makes it kind of an "official" extension that we'd have to provide long-term support for, I hope you'll understand we can't do that with all extensions! All extensions in this repo were already there in 1.0, and with htmx 2 we wanted to take a different approach, to let community easily register their extensions in our extensions list while we let them handle their support.

We can always discuss later if an extension should or should not make it into the core, but I would suggest making it a community extension first.

I know this can feel frustrating, apologies for that! We'll have to define contributing guidelines at some point for this repo, we're still playing it by ear for now

Note: yes, this is a shameless copy-paste from my comments in #44 and #60, but it applies just as well!