-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Related Objects card rendering, omit empty #17309
Comments
@ross-cello can you please add where this is occurring, perhaps with screenshots to make it clear. |
Sorry good point. I had a screenshot but forgot to include it. Have edited it in above. Basically though, I think everywhere that the Related Objects card is rendered. I have checked through Tenant, Region, Site, VRF, ASN and a few others and observed difference we desire. |
If this does get implemented, I would also propose some placeholder value for the case where there are no related objects at all, as having a card with just a header and no body would look like something is broken to me. An example would be something like what is done for tags today. |
I volunteer for this issue. |
@jeremystretch @arthanson can you assign this to me please? |
@alehaa assigned to you |
NetBox version
v3.7.8
Feature type
Change to existing functionality
Proposed functionality
Proposing a change in behaviour (toggleable or otherwise) that omits rendering Related Objects where said object relations don't exist.
I have naively achieved this (superficially?) with modification to
/netbox/templates/inc/panels/related_objects.html
Bearing in mind that this was an educated guess at best and not necessarily considering efficient implementation, wider compatibility or design intent.
Note this code is from v3.7.8. However the behaviour looks to be unchanged on 4.0 and 4.1beta when looking at the demo instances and code.
Have also chased some of discussions/issues/pulls related to these changes in behaviour to gain insights.
e.g. #14510
From v3.7.8 netbox/templates/inc/panels/related_objects.html
EDIT: removed some snippet code I had snuck in from #16825 while testing.
Outcome on viewing an arbitrary Tenant:

If I have a case and am barking up the right tree, then can attempt contribution.
Use case
Reduction of scroll fatigue in page views. We only recently shifted from v3.6.9 -> v3.7.8 and had a lot of feedback internally about the change in behaviour. Our user base aren't necessarily highly technical.
Database changes
Highly unlikely.
External dependencies
Highly unlikely.
The text was updated successfully, but these errors were encountered: