Multiple default themes
Current Behavior
A non-urgent issue, that can easily be worked around by deleting themes.
Currently my themes tabsheet looks like this:
Not sure how I ended up with some many default themes, from which most even have the same color. Not sure whether these are perhaps there already quite some time from an older dashboard D2 version, or that I have imported them somehow.
Expected Behavior
Well I am not quite sure which behaviour I would expect, because I really don't know how these themes arrived in my dashboard. But having multiple themes with the same name and colors is somehow strange. Although perhaps not...
Steps To Reproduce
Don't know unfortunately...
Environment
- Dashboard version: 1.16.0
- Node-RED version: 3.1.3
- Node.js version: 18.19.0
- npm version:
- Platform/OS: raspberry (Linux 6.1.0-rpi7-rpi-v8 arm64 LE)
- Browser: Chrome
Have you provided an initial effort estimate for this issue?
I can not provide an initial effort estimate
I suspect the problem arises when a flow is imported. It will come with whatever themes the nodes use.
Thanks @colinl! Yes indeed I also suspect this. Will test it later on.
And suppose that is the reason. What is the expected behaviour:
- The current behaviour is ok.
- If there is a similar theme (same name and same colours), the the existing theme would be used.
Perhaps option 2 is not that easy to implement..
What bothers me with the current approach is that I don't see which one is my original theme, because they all have the same name. You have to look at the number of pages where it is being used, in order to find it.
Yes, this does arise from importing flows.
We could check (I think we are able to) whether an existing theme the same name, and the same colors/sizes already exists, then we can merge them
Raised again here: https://discourse.nodered.org/t/ui-theme-making-copies-of/98122
I also noticed I have lots of same theme entries.
While it would be very nice to handle this upon import, that doesn't help people consolidate what they already have. Maybe some kind of consolidate routine that scans for identical themes and merges them would be useful.