Hide Model Tabs For Record If Tab Unpopulated #11136

Closed
opened 2025-12-29 21:40:48 +01:00 by adam · 5 comments
Owner

Originally created by @mr1716 on GitHub (May 7, 2025).

NetBox version

v4.3.0

Feature type

New functionality

Proposed functionality

Just like the items in the Related Objects for Sites will only be populated and shown in the UI if the related object is there, it would be great if the same concept could be done for the Contacts and other tabs on the Sites and other pages.

The idea being that if the Contacts or other tabs aren’t populated, there isn’t the need to display them to the user. And the only time to display those tabs would be to be when they’re populated.

Not sure if this is the appropriate place for this, but thought it maybe a good idea!

Use case

Make the UI easier to use and understand and potentially cleaner for the users.

Database changes

No response

External dependencies

No response

Originally created by @mr1716 on GitHub (May 7, 2025). ### NetBox version v4.3.0 ### Feature type New functionality ### Proposed functionality Just like the items in the Related Objects for Sites will only be populated and shown in the UI if the related object is there, it would be great if the same concept could be done for the Contacts and other tabs on the Sites and other pages. The idea being that if the Contacts or other tabs aren’t populated, there isn’t the need to display them to the user. And the only time to display those tabs would be to be when they’re populated. Not sure if this is the appropriate place for this, but thought it maybe a good idea! ### Use case Make the UI easier to use and understand and potentially cleaner for the users. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:40:48 +01:00
adam closed this issue 2025-12-29 21:40:48 +01:00
Author
Owner

@atownson commented on GitHub (May 7, 2025):

If I'm understanding the ask correctly, it is to remove tab views from the object details view if there are no related objects. The only downside I see, if this is the case, is that this would remove the ability to quickly add the related object if the user so desired.

Image

@atownson commented on GitHub (May 7, 2025): If I'm understanding the ask correctly, it is to remove tab views from the object details view if there are no related objects. The only downside I see, if this is the case, is that this would remove the ability to quickly add the related object if the user so desired. ![Image](https://github.com/user-attachments/assets/4785deba-073a-4d3e-bbb5-9777810ce774)
Author
Owner

@mr1716 commented on GitHub (May 7, 2025):

@atownson, assuming users have permissions to add. And if they had permission, wouldn’t they be able to use the side navigation to add it via quick add?

@mr1716 commented on GitHub (May 7, 2025): @atownson, assuming users have permissions to add. And if they had permission, wouldn’t they be able to use the side navigation to add it via quick add?
Author
Owner

@atownson commented on GitHub (May 7, 2025):

It looks like in the UI the "Add a contact" button within the tab view is the only way to add contact assignments other than bulk importing them. There are some tabs that function this way (Contacts, Journal) and some that provide a great deal of convenience (Config Context, Reservations, Non-Racked Devices, Related IPs, etc).

@atownson commented on GitHub (May 7, 2025): It looks like in the UI the "Add a contact" button within the tab view is the only way to add contact assignments other than bulk importing them. There are some tabs that function this way (Contacts, Journal) and some that provide a great deal of convenience (Config Context, Reservations, Non-Racked Devices, Related IPs, etc).
Author
Owner

@mr1716 commented on GitHub (May 8, 2025):

@atownson, as it creates a new Contact Assignment, should the button then need to be renamed to “Assign Contact.”

But wouldn’t it also make sense to have the Contact Assignments page be able to assign contacts as well?

@mr1716 commented on GitHub (May 8, 2025): @atownson, as it creates a new Contact Assignment, should the button then need to be renamed to “Assign Contact.” But wouldn’t it also make sense to have the Contact Assignments page be able to assign contacts as well?
Author
Owner

@arthanson commented on GitHub (May 8, 2025):

As mentioned, there is functionality to add sub-objects in these tabs - removing the tabs will remove this functionality so it is a tradeoff in functionality. Closing as not planned.

@arthanson commented on GitHub (May 8, 2025): As mentioned, there is functionality to add sub-objects in these tabs - removing the tabs will remove this functionality so it is a tradeoff in functionality. Closing as not planned.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11136