swup-morph-plugin icon indicating copy to clipboard operation
swup-morph-plugin copied to clipboard

Consider switching to Idiomorph

Open hirasso opened this issue 2 years ago • 3 comments

Morphdom has a few known limitations if it comes to id-less parent elements. That's why the creator of HTMX has developed an alternative library called Idiomorph. The improvements are being presented quite nicely in the library's readme.

Maybe it would be worth a thought for morph plugin to consider switching to Idiodom?

hirasso avatar Dec 27 '22 19:12 hirasso

Thanks for calling my attention to idiomorph, it certainly looks interesting. I'll need to check it out and see about backward compatibility. The options and callbacks look like they follow their own naming conventions, unfortunately.

This might be a good fit for the head plugin as well? Not sure if it understands the order of style tags, but probably worth giving it a go.

daun avatar Dec 27 '22 22:12 daun

I haven't used head plugin yet, so I can't tell if Idiomorph would be a good fit for that plugin as well. But I think it's good to be aware that it exists and especially of the limitations of Morphdom

hirasso avatar Dec 27 '22 22:12 hirasso

Note to self: idiomorph still looks very interesting but currently has two major flaws: it doesn't support returning false from callbacks to prevent replacing or removing nodes, and it's distributed as AMD only. There's PRs for both of these in the pipeline, but nothing released yet.

daun avatar Sep 07 '23 10:09 daun