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

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

Open
v0tti opened this issue Apr 23, 2024 · 8 comments
Open

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

v0tti opened this issue Apr 23, 2024 · 8 comments
Labels
netbox severity: low Does not significantly disrupt application functionality, or a workaround is available status: blocked Another issue or external requirement is preventing implementation topic: htmx navigation For issues where HTMX navigation is enabled type: bug A confirmed report of unexpected behavior in the application

Comments

@v0tti
Copy link
Contributor

v0tti commented 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

@v0tti v0tti added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Apr 23, 2024
@jeremystretch
Copy link
Member

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 jeremystretch removed their assignment Apr 23, 2024
@jeremystretch jeremystretch added status: revisions needed This issue requires additional information to be actionable beta Concerns a bug/feature in a beta release and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 23, 2024
@julianstolp
Copy link

julianstolp commented 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

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: revisions needed This issue requires additional information to be actionable labels Apr 23, 2024
@jeremystretch jeremystretch changed the title Rack elevations stuck in light mode Rack elevations stuck in light mode when HTMX navigation is enabled Apr 23, 2024
@v0tti
Copy link
Contributor Author

v0tti commented 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.

@arthanson
Copy link
Collaborator

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

@arthanson arthanson added the topic: htmx navigation For issues where HTMX navigation is enabled label Apr 26, 2024
@jeremystretch jeremystretch removed the beta Concerns a bug/feature in a beta release label May 6, 2024
@arthanson
Copy link
Collaborator

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

@llamafilm
Copy link
Contributor

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

@v0tti
Copy link
Contributor Author

v0tti commented 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

@arthanson arthanson added status: blocked Another issue or external requirement is preventing implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Sep 23, 2024
@arthanson
Copy link
Collaborator

blocked by. #17571

@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
netbox severity: low Does not significantly disrupt application functionality, or a workaround is available status: blocked Another issue or external requirement is preventing implementation topic: htmx navigation For issues where HTMX navigation is enabled type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

5 participants