Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jeremystretch opened this issue Jan 16, 2023 · 1 comment
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

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

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jan 16, 2023
@jeremystretch jeremystretch self-assigned this Jan 25, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jan 25, 2023
@jeremystretch jeremystretch added this to the v3.5 milestone Jan 25, 2023
@jeremystretch
Copy link
Member Author

Going to tackle this for v3.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant