rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
550 stars 137 forks source link

Reduce JS libs dependencies via HTMX 2 #2735

Open phillxnet opened 10 months ago

phillxnet commented 10 months ago

HTMX looks to be the right way to go on this front, especially given:

See/hear: https://talkpython.fm/episodes/show/437/htmx-for-django-developers-and-all-of-us

There is also Django middleware and PyCharm plugins. PyPi: https://pypi.org/project/django-htmx/ Project Changelog: https://django-htmx.readthedocs.io/en/latest/changelog.html

The aim here would be to swap out the entirety of our rockstor-jslibs for whatever is required to do the same but via HTMX. And in the process eradicate our hands-on JS need entirely; hopefully.

This would be a piecemeal approach where we do one page/section at a time type as we gain familiarity, so likely an initial enlargement of our dependencies: but ultimately the proposed aim here is to standardise on HTMX entirely.

Required Dependencies

phillxnet commented 10 months ago

This issue depends on: "Update Django to next LTS" #2734

Context: https://django-htmx.readthedocs.io/en/latest/changelog.html#id9

1.11.0 (2022-05-10) Drop support for Django 2.2, 3.0, and 3.1.

phillxnet commented 9 months ago

Re:

This issue depends on: "Update Django to next LTS" #2734

2734 has now been resolved via PR: "Update Django to next LTS #2734" #2737

With a follow-up further Django update via PR: "Update Django to latest 4.2 LTS #2750" #2752

phillxnet commented 5 months ago

Adding contextual link back to our Django Server Side Events issue: #2739

phillxnet commented 2 months ago

As of this comment, we have a release announcement for htmx 2.0.0, initially known as the next variant as latest is to remain reference for compatibility purposes to the original 1 series untill Jan 1, 2025.

https://htmx.org/posts/2024-06-17-htmx-2-0-0-is-released/

We should skate to where the puck will be on this front: given we are starting out fresh with htmx in our pending testing phase (hopefully).

phillxnet commented 2 months ago

Installation notes:

Django-htmx:

https://django-htmx.readthedocs.io/en/latest/installation.html

js library component

https://unpkg.com/browse/htmx.org@2.0.0/ https://unpkg.com/browse/htmx.org@2.0.0/dist/


partner rockstor-jslibs issue: https://github.com/rockstor/rockstor-jslibs/issues/38