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

Darkmode is not consistent, page flashes in default mode during page load #2075

Closed
sirtux opened this issue Jul 19, 2022 · 3 comments · Fixed by #2493
Closed

Darkmode is not consistent, page flashes in default mode during page load #2075

sirtux opened this issue Jul 19, 2022 · 3 comments · Fixed by #2493
Labels
type: bug Something isn't working as expected

Comments

@sirtux
Copy link
Contributor

sirtux commented Jul 19, 2022

Environment

  • Python version: 3.9
  • Nautobot version: v1.4.0a2

Steps to Reproduce

  1. Enable dark mode
  2. Go to any other page then the current one

Expected Behavior

Dark mode is permanent active

Observed Behavior

During load, I can see the light mode pop up for less then a second before it switches to dark mode.
This breaks the user experience and also hurts in the eye.

@lampwins
Copy link
Member

@sirtux can you confirm what browser/os and version you are seeing this on?

@lampwins
Copy link
Member

Actually just confirmed this on https://next.demo.nautobot.com/dcim/devices/?per_page=1000

Seems this is because we load the theme JS after content (which is a general JS best practice), but that is biting us here.

@lampwins lampwins added group: ui-ux type: bug Something isn't working as expected labels Jul 19, 2022
@gsnider2195
Copy link
Contributor

Could we switch this to on dom ready instead of page load complete?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants