Skip to content

Rework filtering of tabbed list views - convert from javascript to HTMX #19336

@arthanson

Description

@arthanson

NetBox version

v4.2.8

Feature type

Change to existing functionality

Proposed functionality

Currently for related objects we present some of them as tabs under the detail view (for example look at a Device that has interfaces and click on the interfaces tab). We have some javascript filters under the Quick Search dropdown (see screenshot). The proposal is to potentially convert these to HTMX as these predate HTMX being in NetBox. But also look at re-working the UI to potentially provide a way to get to the normal filters to the list view.

These tabbed lists are a convenience and replicate functionality in the main list views, for example you can got to the Interfaces list and filter by a specific Device to get this list. Potential solutions:

  • Make the tabbed list views have all the filtering functionality of the main list views - so there is a button? that brings up the filtering dialog like on the main list views, also show the filter chits and allow saved filter functionality.
  • Use the current UX (but remove the saved filter dropdown) but convert the JS filters to HTMX. This would fix the display issues with the pagination buttons.
  • Instead of displaying the lists in tabs do what related objects do and just go the main list view that is filtered by the Device.

Image

Use case

There are several issues with the current implementation:

  • The drop-down are in javascript which is more difficult to change and replicates code that is much easier to implement in HTMX
  • The UI is limited (a dropdown without being able to enter in any parameters like the normal filtering), not very obvious as it is on the Quick Search.
  • The Saved filter dropdown appears on this page which does not work correctly.
  • If you do filter the items it can cause UX confusion as the pagination does not reflect the filtering, for example if you have more then one page of interfaces and don't have any interfaces that are disabled and you click hide disabled, your lists will show as empty but you will still have the pagination showing.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity: mediumRequires a substantial but not unusual amount of effort to implementstatus: backlogAwaiting selection for worktype: featureIntroduction of new functionality to the application

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions