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

Front/rear image obscures device name #6879

Closed
candlerb opened this issue Aug 4, 2021 · 3 comments · Fixed by #6960
Closed

Front/rear image obscures device name #6879

candlerb opened this issue Aug 4, 2021 · 3 comments · Fixed by #6960
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@candlerb
Copy link
Contributor

candlerb commented Aug 4, 2021

NetBox version

v2.11.10

Feature type

Change to existing functionality

Proposed functionality

I have just started using the front/rear images functionality. I found that the SVG is built up in the following sequence:

  • background rectangle
  • device name
  • device image

This means that once you add images, you no longer can see the device names.

I propose simply reordering the rendering sequence so that the text is added after the image. Before:

image

After:

image

Doing the same for rear suffers from the default text colour being black. Before:

image

After:

image

I would therefore change the colour to white when there's an image, on the assumption that most images are "dark-like". It then becomes:

image

Or else have setting(s) in the device type to select the text colour for the front and rear text when images are present.

Use case

Being able to see at-a-glance the positions and the names of all the devices in a rack is an important use for rack elevations.

I do realise that there's a button to turn images on and off. However, images without device names is pretty but not very useful. This means that generally I would have to turn the images off all the time, which in turn means there is no point uploading images in the first place.

Potentially the button could be changed to a 3-state (show names and images; show names only; show images only). But for me, the "images without names" variation is not something I'd use.

Database changes

None

External dependencies

None

@candlerb candlerb added the type: feature Introduction of new functionality to the application label Aug 4, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Aug 4, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Aug 4, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Aug 4, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Aug 4, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Aug 5, 2021
@sleepinggenius2
Copy link
Contributor

I would definitely like to see the option to specify the text color. I think black or white would be sufficient, but I don't know if it's easier to use the existing color picker. We have a fair bit of white, beige, and light grey equipment in our environment that I don't think would meet web accessibility guidelines with pure white text. Another option would be black or white text with a small opposite-colored outline or drop shadow around it, which should provide sufficient contrast on any background color as well as some visual separation for busier images.

I would also like to see the option for displaying the images without the names. When doing physical site audits, it's more important for us to see the images clearly than the names of the devices. Also, when displaying the names, I wonder if it's possible to truncate them to the width of the rack or possibly wrap them for multi-U devices. Maybe it wouldn't be as bad with them in front of the images, but long names look really weird today peeking out from behind the images and extending beyond the bounds of the rack. This is especially prevalent on unnamed devices that default to the manufacturer and device type.

candlerb added a commit to candlerb/netbox that referenced this issue Aug 7, 2021
@candlerb
Copy link
Contributor Author

candlerb commented Aug 7, 2021

@sleepinggenius2: what do you think of the renderings here and here ?

These put a halo around the text in the role colour. This means the text contrast is the same as if the image were not displayed at all, and the halo vanishes when the images are turned off (as it's the same colour as the plain role background).

Changing the toggle to display images without names ought to be doable, either by having a 3-state toggle or separate toggles for text and images.

I think name truncation should be a separate feature request.

candlerb added a commit to candlerb/netbox that referenced this issue Aug 7, 2021
@sleepinggenius2
Copy link
Contributor

sleepinggenius2 commented Aug 11, 2021

While I think it looks okay for the red and blue colors in the examples, I'm concerned with how it's going to look across the full range of colors. Looking through the current NetBox interface, it looks like there is some logic to change the foreground color to black or white to provide contrast against the selected background color. I'm not sure how that is being calculated, as the white on aqua that is in place today fails WCAG guideline with a ratio of only 1.25:1. Also want to make sure that none of this is affected by the dark mode option in the new UI.

However you do the toggles, I would like to see the "images or text" option, like the system defaults to today. This seems to be the most useful option for our use case, as we typically use the elevations for site audits and build-out documentation, but I know some people prefer turning the images off to make the elevations "less busy" when they're just doing design and space allocation. I can't see a use case for images only without the text for devices without an image, so the display options I would want to see are "Text only", "Images or text", and "Images and text", basically that last option would trigger this feature request.

candlerb pushed a commit to candlerb/netbox that referenced this issue Aug 14, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Aug 15, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Oct 1, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Oct 1, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Oct 1, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Oct 6, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Oct 6, 2021
candlerb added a commit to candlerb/netbox that referenced this issue Oct 6, 2021
jeremystretch added a commit that referenced this issue Oct 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2022
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
3 participants