[PR #15158] [MERGED] Closes #14736: Enable HTMX navigation globally #14534

Closed
opened 2025-12-29 23:25:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15158
Author: @jeremystretch
Created: 2/14/2024
Status: Merged
Merged: 3/28/2024
Merged by: @jeremystretch

Base: featureHead: 14736-htmx


📝 Commits (10+)

  • 6d06152 Enable HTMX boosting
  • a742f2e Refactor HTMX properties for tables
  • 4f3f214 Fix dashboard object list widget
  • fa4f489 Disable scrolling to page content
  • a78fb80 Fix initialization of TomSelect dropdowns after HTMX loading
  • 881b994 Replace formaction properties with hx-post
  • d224f73 Fix quick search field on object list view
  • 648a14a Reinitialize copy-to-clipboard buttons upon HTMX load
  • c377d83 Merge branch 'feature' into 14736-htmx
  • 236c561 Disable scrolling effect for intra-page navigation

📊 Changes

54 files changed (+213 additions, -160 deletions)

View changed files

📝 netbox/core/views.py (+4 -3)
📝 netbox/extras/views.py (+2 -1)
📝 netbox/netbox/context_processors.py (+3 -1)
📝 netbox/netbox/preferences.py (+8 -0)
📝 netbox/netbox/views/generic/bulk_views.py (+3 -2)
📝 netbox/netbox/views/generic/object_views.py (+4 -3)
📝 netbox/netbox/views/misc.py (+2 -1)
📝 netbox/project-static/dist/netbox.css (+1 -1)
📝 netbox/project-static/dist/netbox.js (+5 -5)
📝 netbox/project-static/dist/netbox.js.map (+1 -1)
📝 netbox/project-static/src/htmx.ts (+4 -14)
📝 netbox/project-static/styles/netbox.scss (+1 -0)
netbox/project-static/styles/overrides/_bootstrap.scss (+4 -0)
📝 netbox/templates/account/preferences.html (+1 -1)
📝 netbox/templates/base/base.html (+1 -0)
📝 netbox/templates/base/layout.html (+45 -2)
📝 netbox/templates/dcim/component_list.html (+1 -1)
📝 netbox/templates/dcim/device/components_base.html (+2 -2)
📝 netbox/templates/dcim/device/consoleports.html (+1 -1)
📝 netbox/templates/dcim/device/consoleserverports.html (+1 -1)

...and 34 more files

📄 Description

Fixes: #14736

  • Introduce the ui.htmx_navigation user preference for toggling HTMX navigation per user
  • Introduce the render_partial() utility function for determining when to return a partial HTML response
  • Add htmx_navigation (boolean) to the default template context
  • Add a page-content element in the base layout template
  • Introduce the {% htmx_boost %} template tag to enable boosting certain areas of the page
  • Introduce the {% formaction %} template tag to enable HTMX support for form controls with a formaction attribute
  • Merge inc/user_menu.html into base/layout.html

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15158 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/14/2024 **Status:** ✅ Merged **Merged:** 3/28/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `14736-htmx` --- ### 📝 Commits (10+) - [`6d06152`](https://github.com/netbox-community/netbox/commit/6d06152573b9ceb0c7d8b7ee371eb4b1f6c6706d) Enable HTMX boosting - [`a742f2e`](https://github.com/netbox-community/netbox/commit/a742f2ebfd6a06d8da11910d8c7fcfbc5122328c) Refactor HTMX properties for tables - [`4f3f214`](https://github.com/netbox-community/netbox/commit/4f3f2142f466861a655c6049448afee444591e0a) Fix dashboard object list widget - [`fa4f489`](https://github.com/netbox-community/netbox/commit/fa4f4893a39af4d8a342de4209350f96fe68601e) Disable scrolling to page content - [`a78fb80`](https://github.com/netbox-community/netbox/commit/a78fb8033c8bb6dad08202fc678893827e19e708) Fix initialization of TomSelect dropdowns after HTMX loading - [`881b994`](https://github.com/netbox-community/netbox/commit/881b994038c650365cdf2c540547633a33bfe02f) Replace formaction properties with hx-post - [`d224f73`](https://github.com/netbox-community/netbox/commit/d224f734d5cd08f6027b309143c1beb73a067291) Fix quick search field on object list view - [`648a14a`](https://github.com/netbox-community/netbox/commit/648a14ad98b5fa12dec3d51a18d7557e95e1f8f3) Reinitialize copy-to-clipboard buttons upon HTMX load - [`c377d83`](https://github.com/netbox-community/netbox/commit/c377d8360c85e581713024045515e9be4f3c5350) Merge branch 'feature' into 14736-htmx - [`236c561`](https://github.com/netbox-community/netbox/commit/236c56167788ce8d470d2c1779b4f3e4ea387a19) Disable scrolling effect for intra-page navigation ### 📊 Changes **54 files changed** (+213 additions, -160 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/views.py` (+4 -3) 📝 `netbox/extras/views.py` (+2 -1) 📝 `netbox/netbox/context_processors.py` (+3 -1) 📝 `netbox/netbox/preferences.py` (+8 -0) 📝 `netbox/netbox/views/generic/bulk_views.py` (+3 -2) 📝 `netbox/netbox/views/generic/object_views.py` (+4 -3) 📝 `netbox/netbox/views/misc.py` (+2 -1) 📝 `netbox/project-static/dist/netbox.css` (+1 -1) 📝 `netbox/project-static/dist/netbox.js` (+5 -5) 📝 `netbox/project-static/dist/netbox.js.map` (+1 -1) 📝 `netbox/project-static/src/htmx.ts` (+4 -14) 📝 `netbox/project-static/styles/netbox.scss` (+1 -0) ➕ `netbox/project-static/styles/overrides/_bootstrap.scss` (+4 -0) 📝 `netbox/templates/account/preferences.html` (+1 -1) 📝 `netbox/templates/base/base.html` (+1 -0) 📝 `netbox/templates/base/layout.html` (+45 -2) 📝 `netbox/templates/dcim/component_list.html` (+1 -1) 📝 `netbox/templates/dcim/device/components_base.html` (+2 -2) 📝 `netbox/templates/dcim/device/consoleports.html` (+1 -1) 📝 `netbox/templates/dcim/device/consoleserverports.html` (+1 -1) _...and 34 more files_ </details> ### 📄 Description ### Fixes: #14736 - Introduce the `ui.htmx_navigation` user preference for toggling HTMX navigation per user - Introduce the `render_partial()` utility function for determining when to return a partial HTML response - Add `htmx_navigation` (boolean) to the default template context - Add a `page-content` element in the base layout template - Introduce the `{% htmx_boost %}` template tag to enable [boosting](https://htmx.org/attributes/hx-boost/) certain areas of the page - Introduce the `{% formaction %}` template tag to enable HTMX support for form controls with a `formaction` attribute - Merge `inc/user_menu.html` into `base/layout.html` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:02 +01:00
adam closed this issue 2025-12-29 23:25:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14534