netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.93k stars 2.56k forks source link

Use HTMX for general UI navigation #14736

Closed jeremystretch closed 6 months ago

jeremystretch commented 9 months ago

NetBox version

v3.7.0

Feature type

New functionality

Proposed functionality

NetBox has employed HTMX in several areas of the UI for a while now, to improve responsiveness. These areas include:

This proposal seeks to extend the use of HTMX across the entire application, leveraging it for nearly all views. For instance, clicking a navigation menu link would replace only the main portion of the page with new content, avoiding a full page refresh.

Use case

HTMX strikes a very natural balance between traditional full-page rendering and reactive SPA frameworks, returning only the portion of HTML content necessary to update the page. This provides a much more seamless user experience, and can significantly reduce page load times. These gains can be achieved with relatively little backend work, leveraging existing HTML templates.

Database changes

None

External dependencies

We'll use the django-htmx package per #14735.

jeremystretch commented 9 months ago

Marking this as blocked by #14735 for now.

jeremystretch commented 8 months ago

I'm planning a phased approach to implementing HTMX.

Phase 1 (v4.0)

Phase 2 (v4.1+)

This approach should allow us to implement HTMX application-wide with a relatively light touch, while retaining full HTML rendering by default for backward compatibility.

jeremystretch commented 7 months ago

Here's a great, quick intro to HTMX for the uninitiated: https://youtu.be/r-GSGH2RxJs