Move related objects to separate tabs under each object detail view #7527

Closed
opened 2025-12-29 20:24:45 +01:00 by adam · 1 comment
Owner

Originally created by @jeremystretch on GitHub (Jan 16, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.4.2

Feature type

Change to existing functionality

Proposed functionality

The intent of this FR is to optimize and standardize the display of related objects when viewing an object in NetBox. It was prompted partly by discussion under #11228 and partly to capture patterns identified during the implementation of #8184. There are currently three mechanisms in place for listing related objects:

  • A static (non-paginated, non-sortable) embedded table
  • A dynamic, HTMX-enabled embedded table
  • Separate dedicated tabs leveraging ObjectChildrenView

Each approach has benefits and drawbacks, however there is currently no firm structure in place asserting when each should be employed. I'd like to propose the following guidelines.

  • Primary objects should typically employ tabs to list related objects. For example, a device's components all appear under separate tabs organized by type.
    • This approach enables us to employ ObjectChildrenView to apply specific rendering logic within the context of the object being viewed (for example, to annotate available VLAN IDs within a VLAN group).
    • An exception to this rule would be instances where there is only one specific type of related object that would make sense to embed directly on the object view; for example, listing the circuits which belong to a specific provider. Where two or more types of objects are to be included each of them should be listed under a separate tab.
  • Organizational objects (device roles, manufacturers, etc.) should not include tables or tabs for the objects they organize, and instead link to the appropriate filtered general-purpose object list views.
  • Recursively-nested objects (regions, tenant groups, etc.) should embed a dynamic table listing their own child objects.
  • The use of static tables to display related objects should be avoided except in cases where we can be reasonably confident that no more than a handful of related objects will need to be displayed (e.g. listing parent prefixes).
  • No page should ever display more than one large table, as it may not be clear to the user that additional tables beyond the first are present on the page (it requires too much scrolling to reveal successive tables).

Use case

Embracing a standardized approach for displaying related objects minimizes unnecessary screen clutter and instills a sense of confidence in the user that they'll always know where to look for related objects. It will also address several related object views that are currently missing from the UI.

Database changes

N/A

External dependencies

N/A

Originally created by @jeremystretch on GitHub (Jan 16, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.4.2 ### Feature type Change to existing functionality ### Proposed functionality The intent of this FR is to optimize and standardize the display of related objects when viewing an object in NetBox. It was prompted partly by discussion under #11228 and partly to capture patterns identified during the implementation of #8184. There are currently three mechanisms in place for listing related objects: * A static (non-paginated, non-sortable) embedded table * A dynamic, HTMX-enabled embedded table * Separate dedicated tabs leveraging [`ObjectChildrenView`](https://docs.netbox.dev/en/stable/plugins/development/views/#netbox.views.generic.object_views.ObjectChildrenView) Each approach has benefits and drawbacks, however there is currently no firm structure in place asserting when each should be employed. I'd like to propose the following guidelines. * Primary objects should typically employ tabs to list related objects. For example, a device's components all appear under separate tabs organized by type. * This approach enables us to employ `ObjectChildrenView` to apply specific rendering logic within the context of the object being viewed (for example, to annotate available VLAN IDs within a VLAN group). * An exception to this rule would be instances where there is only one specific type of related object that would make sense to embed directly on the object view; for example, listing the circuits which belong to a specific provider. Where two or more types of objects are to be included each of them should be listed under a separate tab. * Organizational objects (device roles, manufacturers, etc.) should _not_ include tables or tabs for the objects they organize, and instead link to the appropriate filtered general-purpose object list views. * Recursively-nested objects (regions, tenant groups, etc.) should embed a dynamic table listing their own child objects. * The use of static tables to display related objects should be avoided except in cases where we can be reasonably confident that no more than a handful of related objects will need to be displayed (e.g. listing parent prefixes). * No page should ever display more than one large table, as it may not be clear to the user that additional tables beyond the first are present on the page (it requires too much scrolling to reveal successive tables). ### Use case Embracing a standardized approach for displaying related objects minimizes unnecessary screen clutter and instills a sense of confidence in the user that they'll always know where to look for related objects. It will also address several related object views that are currently missing from the UI. ### Database changes N/A ### External dependencies N/A
adam added the status: acceptedtype: feature labels 2025-12-29 20:24:45 +01:00
adam closed this issue 2025-12-29 20:24:46 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 25, 2023):

Going to tackle this for v3.5.

@jeremystretch commented on GitHub (Jan 25, 2023): Going to tackle this for v3.5.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7527