Rack elevations stuck in light mode when HTMX navigation is enabled #9525

Closed
opened 2025-12-29 20:50:58 +01:00 by adam · 9 comments
Owner

Originally created by @v0tti on GitHub (Apr 23, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.0-beta2

Python Version

3.11

Steps to Reproduce

  1. Switch to dark mode
  2. Visit /dcim/rack-elevations/ or any rack directly

Expected Behavior

I expect the racks to be display with a dark background.

Correctly displayed elevations happening some times in my self-hosted NetBox:
Screenshot 2024-04-23 at 11-45-11 Rack Elevations NetBox

Observed Behavior

The racks and the numbers to their left are displayed with a light background.
Sometimes they are displayed correctly in my self-hosted install, but I could not reproduce when this is happening.

Elevations in light mode while NetBox is in dark mode (NetBox demo page):
Light mode elevations at NetBox demo

Originally created by @v0tti on GitHub (Apr 23, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.0-beta2 ### Python Version 3.11 ### Steps to Reproduce 1. Switch to dark mode 2. Visit `/dcim/rack-elevations/` or any rack directly ### Expected Behavior I expect the racks to be display with a dark background. Correctly displayed elevations happening some times in my self-hosted NetBox: ![Screenshot 2024-04-23 at 11-45-11 Rack Elevations NetBox](https://github.com/netbox-community/netbox/assets/7140592/f35616af-16fa-4542-b702-3e0f0ad55cc2) ### Observed Behavior The racks and the numbers to their left are displayed with a light background. Sometimes they are displayed correctly in my self-hosted install, but I could not reproduce when this is happening. Elevations in light mode while NetBox is in dark mode (NetBox demo page): ![Light mode elevations at NetBox demo](https://github.com/netbox-community/netbox/assets/7140592/c1b68df2-ccfb-431f-a487-02e649d0c717)
adam added the type: bugnetboxtopic: UI/UXseverity: lowtopic: htmx navigation labels 2025-12-29 20:50:58 +01:00
adam closed this issue 2025-12-29 20:50:58 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 23, 2024):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.0-beta2. Please see if you can identify steps to reproduce the behavior consistently.

@jeremystretch commented on GitHub (Apr 23, 2024): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.0-beta2. Please see if you can identify steps to reproduce the behavior consistently.
Author
Owner

@julianstolp commented on GitHub (Apr 23, 2024):

I can confirm this issue, also happening the other way around in light mode,
image

  1. Enable HTMX Navigation
  2. Go to racks -> open rack
  3. Toggle color theme
  4. Go back to racks -> open rack again
  5. See this
    image
  6. Bonus: color theme toggle does not work anymore + bottom right corner date, servername and netbox version dissapear
  7. STRG+F5 everything works as expected
@julianstolp commented on GitHub (Apr 23, 2024): I can confirm this issue, also happening the other way around in light mode, ![image](https://github.com/netbox-community/netbox/assets/41152397/f380f2e4-f1c1-4373-a06b-f658551b68b6) 1. Enable HTMX Navigation 2. Go to racks -> open rack 3. Toggle color theme 4. Go back to racks -> open rack again 5. See this ![image](https://github.com/netbox-community/netbox/assets/41152397/08edb373-67fd-481e-9f85-18e155c1e92d) 6. Bonus: color theme toggle does not work anymore + bottom right corner date, servername and netbox version dissapear 7. STRG+F5 everything works as expected
Author
Owner

@v0tti commented on GitHub (Apr 24, 2024):

I would like to at that I can also reproduce this issue without HTMX at https://beta-demo.netbox.dev/dcim/rack-elevations/ even without being logged in. Just visit the rack elevations and switch to dark mode and the racks will be displayed with a light background.
This also affects my local self-hosted install, but there it changes to dark mode after page load in finished.

@v0tti commented on GitHub (Apr 24, 2024): I would like to at that I can also reproduce this issue without HTMX at https://beta-demo.netbox.dev/dcim/rack-elevations/ even without being logged in. Just visit the rack elevations and switch to dark mode and the racks will be displayed with a light background. This also affects my local self-hosted install, but there it changes to dark mode after page load in finished.
Author
Owner

@arthanson commented on GitHub (Apr 26, 2024):

Note: Any fix for this should also check cable trace SVG.

@arthanson commented on GitHub (Apr 26, 2024): Note: Any fix for this should also check cable trace SVG.
Author
Owner

@arthanson commented on GitHub (Jun 17, 2024):

@v0tti I think this is fixed in the latest releases, can you please re-try in NetBox 4.0.3?

@arthanson commented on GitHub (Jun 17, 2024): @v0tti I think this is fixed in the latest releases, can you please re-try in NetBox 4.0.3?
Author
Owner

@llamafilm commented on GitHub (Jun 26, 2024):

This is still a problem in 4.0.5. Refreshing the page fixes it.

@llamafilm commented on GitHub (Jun 26, 2024): This is still a problem in 4.0.5. Refreshing the page fixes it.
Author
Owner

@v0tti commented on GitHub (Jun 26, 2024):

@v0tti I think this is fixed in the latest releases, can you please re-try in NetBox 4.0.3?

It seems to still display the elevations in light mode during page load, but as soon as the page is fully loaded they are displayed correctly:
Screenshot from 2024-06-26 16-47-11

After manually switching to light mode they seem to be stuck in the wrong mode:
Screenshot 2024-06-26 at 16-40-22 Rack Elevations NetBox

By reloading the page they are properly displayed in light mode (notice the different hue of white behind the unit numbers):
Screenshot 2024-06-26 at 16-40-35 Rack Elevations NetBox

@v0tti commented on GitHub (Jun 26, 2024): > @v0tti I think this is fixed in the latest releases, can you please re-try in NetBox 4.0.3? It seems to still display the elevations in light mode during page load, but as soon as the page is fully loaded they are displayed correctly: ![Screenshot from 2024-06-26 16-47-11](https://github.com/netbox-community/netbox/assets/7140592/b7241ec3-754d-4f48-8f90-58dbf134ec29) After manually switching to light mode they seem to be stuck in the wrong mode: ![Screenshot 2024-06-26 at 16-40-22 Rack Elevations NetBox](https://github.com/netbox-community/netbox/assets/7140592/bc8ee7c9-727d-4818-a5c9-218b7a51cce0) By reloading the page they are properly displayed in light mode (notice the different hue of white behind the unit numbers): ![Screenshot 2024-06-26 at 16-40-35 Rack Elevations NetBox](https://github.com/netbox-community/netbox/assets/7140592/f3510a5d-c7dd-4872-a19a-bc1b53a428ff)
Author
Owner

@arthanson commented on GitHub (Sep 23, 2024):

blocked by. #17571

@arthanson commented on GitHub (Sep 23, 2024): blocked by. #17571
Author
Owner

@jeremystretch commented on GitHub (Nov 7, 2025):

Closing this out as the experimental HTMX navigation feature is being removed in NetBox v4.5.

@jeremystretch commented on GitHub (Nov 7, 2025): Closing this out as the experimental HTMX navigation feature is being removed in NetBox v4.5.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9525