FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
207 stars 51 forks source link

Multiple default themes #1298

Open bartbutenaers opened 2 months ago

bartbutenaers commented 2 months ago

Current Behavior

A non-urgent issue, that can easily be worked around by deleting themes.

Currently my themes tabsheet looks like this:

image

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

Have you provided an initial effort estimate for this issue?

I can not provide an initial effort estimate

colinl commented 2 months ago

I suspect the problem arises when a flow is imported. It will come with whatever themes the nodes use.

bartbutenaers commented 2 months ago

Thanks @colinl! Yes indeed I also suspect this. Will test it later on.

And suppose that is the reason. What is the expected behaviour:

  1. The current behaviour is ok.
  2. 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.

joepavitt commented 2 months ago

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