node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Angular Theme sets to "Light" in UI after some changes deployed

Open midnight1979 opened this issue 5 years ago • 31 comments

What are the steps to reproduce?

  1. Set "Angular theme everywhere" in "Site" options.
  2. Set in "Angular" tab "Dark" in "Light / Dark" option.
  3. Do Deploy
  4. Restart NR or refresh admin page or logout / login

What happens?

Theme sets to "Light (default)" again

What do you expect to happen?

Theme must stay as it was set before restart NR (DARK)

Please tell us about your environment:

  • [x] Node-RED-Dashboard version:2.19.2
  • [x] Node-RED version:1.0.3
  • [ ] node.js version:
  • [ ] npm version:
  • [x] Platform/OS:Linux
  • [x] Browser:Chromium

midnight1979 avatar Dec 08 '19 00:12 midnight1979

It is still happening even in 2.19.3 release!

  1. Logout
  2. Login
  3. Do some changes in any flow (even just move some node)
  4. Do deploy Theme will change to Light (default).

midnight1979 avatar Dec 23 '19 21:12 midnight1979

Did you reset/ clear your local browser cache before loading dashboard after upgrading ?

dceejay avatar Dec 23 '19 21:12 dceejay

Yes i did!

midnight1979 avatar Dec 23 '19 22:12 midnight1979

strange thing - it happening not always...

midnight1979 avatar Dec 23 '19 22:12 midnight1979

look https://youtu.be/nRnpQ4Jm-4M even no need to logout - just page refresh...

midnight1979 avatar Dec 23 '19 22:12 midnight1979

i think this issue must be reopened... problem is not solved.

midnight1979 avatar Jan 01 '20 22:01 midnight1979

OK - you'll need to give me more info on how to re-create. I am in angular only - dark mode. I can stop / restart server - close reopen local browser (or just refresh) - and it comes up dark every time so far.

dceejay avatar Jan 03 '20 09:01 dceejay

OK - you'll need to give me more info on how to re-create. I am in angular only - dark mode. I can stop / restart server - close reopen local browser (or just refresh) - and it comes up dark every time so far.

I posted the link to video where i can produce this situation. Have you see it?

midnight1979 avatar Jan 03 '20 21:01 midnight1979

Yes. But I don’t have that flow.

dceejay avatar Jan 03 '20 21:01 dceejay

Yes. But I don’t have that flow.

Ok, i'll create another one, add some nodes and will try to simulate (re-create) an issue one more time.

midnight1979 avatar Jan 04 '20 13:01 midnight1979

the same here :(

odenisenko-zz avatar Mar 03 '20 17:03 odenisenko-zz

Same here. Too inconsistent to figure out the exact steps, but for me it happens after several deployments.

lantheman89 avatar Apr 06 '20 16:04 lantheman89

issue is still present in 2.23.3. For me dashboard randomly gets reset to defaults.

carefulcomputer avatar Sep 17 '20 01:09 carefulcomputer

"randomly" is the problem... we need to be able to replicate this so we can get a handle on it. Are you importing flows/nodes ? Re-deploying ? just restarting ? just refreshing the page ?

dceejay avatar Sep 17 '20 11:09 dceejay

in my case, it was always after redeploy (preceded with some changes in dashboard).

carefulcomputer avatar Sep 17 '20 14:09 carefulcomputer

great - that helps... any thoughts on what changes ? anything in common ?

dceejay avatar Sep 17 '20 15:09 dceejay

i tried few times and it seems to happen more when I change property of a widget (e.g. change number of days/data points) in chart and redeploy.

carefulcomputer avatar Sep 17 '20 22:09 carefulcomputer

Problem is still presents in the last version, after some changes and deploying flows - theme can become light in /UI but in theme properties it stay "dark", now I'm just switch theme to light and then again to dark, deploying changes and it stay dark in /UI. But after some changes in flows can become light again...

p.s. to be honest, I'm already used to it )), but it's certainly a bug.

midnight1979 avatar Feb 17 '21 19:02 midnight1979

Just to add that even on 2.29.1 this is still happening. NR v 1.3.5 Same issue as everyone above.

My-Random-Thoughts avatar May 20 '21 16:05 My-Random-Thoughts

any repeatable way to demonstrate this ?

dceejay avatar May 20 '21 16:05 dceejay

Same steps as @midnight1979 in their first post.

  • Set to dark
  • Make minor change and deploy (even using Modified Nodes option)
  • Refresh page (CTRL+F5) - May need to do this a couple of times
  • Observe setting has changed back to light..

With further testing, just refreshing the admin page does not change dark to light, there needs to be a deploy first.

My-Random-Thoughts avatar May 20 '21 16:05 My-Random-Thoughts

Have pushed a small fix to master - (not on npm) - would be great if you can try it. (I still can't replicate it here - but did spot some inconsistencies n saving/restoring that value so hopefully this fixes it)

dceejay avatar May 25 '21 09:05 dceejay

With some limited testing it seems to be OK now. I can't reproduce the issue anymore. Thank you.

EDIT: After a bit more testing, it's still broken, but it takes a lot longer than it did before.

My-Random-Thoughts avatar May 25 '21 10:05 My-Random-Thoughts

I'm experiencing the same, with node-red 1.3.5 and latest version of dashboard. When I restart node-red the dashboard become "light" even if the theme remains dark. To fix I have to set the them to light, deploy, set it back to dark and then refresh the theme.

MountainKing91 avatar Jun 11 '21 19:06 MountainKing91

yes - the fix is in master branch - not the latest on npm - well it'll be there soon as I release it.

dceejay avatar Jun 11 '21 22:06 dceejay

This is still an issue, and I think it might be due to the ui_chart. I only say that because every other control switched to "light" mode except for the chart whose axis labels are still in dark mode (white text on light grey background)

My-Random-Thoughts avatar Jun 13 '21 10:06 My-Random-Thoughts

Really ? you have to refresh the client after deploy to ensure the changes flow through - Is it still dark after a refresh ?

dceejay avatar Jun 13 '21 15:06 dceejay

I'll keep testing, but it did do it a couple of times. There isn't really a consistent way of reproducing the issue, which I know makes it so much harder to debug :)

My-Random-Thoughts avatar Jun 13 '21 15:06 My-Random-Thoughts

I can sort of reproduce the issue now using just the buttons on the Layout > Tabs and Links side panel. Ensure you are set to use the dark theme and open the dashboard page in another tab.

  • Click the + Tab button to create one or more new tabs
  • From the new tabs click the + Group button a few times (I did 7) to create a bunch of new groups.
  • Edit one or more of the groups, change the name or tick the options
  • Deploy
  • Delete the Tab(s)
  • Delete the groups from the Configuration > Unused tab
  • Deploy

It doesn't happen every time and but it's a more reliable method than anything else that I have tried.

My-Random-Thoughts avatar Jun 14 '21 14:06 My-Random-Thoughts

hmm - I don't have the knack.. tried several times... still stays dark for me.

dceejay avatar Jun 14 '21 15:06 dceejay