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

Function Node Editor Bg gone to White (again) #3779

Closed
3ative opened this issue Jul 17, 2022 · 28 comments · Fixed by #3794
Closed

Function Node Editor Bg gone to White (again) #3779

3ative opened this issue Jul 17, 2022 · 28 comments · Fixed by #3794
Labels

Comments

@3ative
Copy link

3ative commented Jul 17, 2022

Current Behavior

After update 3.0 the Function Node Editor background is White (not dark)
image

Expected Behavior

No response

Steps To Reproduce

No response

Example flow

paste your flow here

Environment

  • Node-RED version: 3.0
  • Node.js version: v16.15.0
  • npm version:
  • Platform/OS: Home Assistant OS 8.2
  • Browser: Chrome 103.0.5060.114
@hardillb
Copy link
Member

Please fill our the whole template and include details of which theme you are using.

@Steve-Mcl
Copy link
Contributor

I'm pretty sure this is due to the theme you are using not been updated to set the Monaco theme.

Have you checked to see if there is an update to your current theme?

You can also manually set the Monaco theme in the settings.js file of you wish.

@3ative
Copy link
Author

3ative commented Jul 18, 2022

Please fill our the whole template and include details of which theme you are using.

I've tried to add all the info I could find. My NR is an add-on in Home Assistant. It's using the "midnight-Red" theme... or most of at least LOL

If you need anything else, please let me know what and where/how to find it. :)

@3ative
Copy link
Author

3ative commented Jul 18, 2022

@Steve-Mcl
Thanks for the reply... I've looked around and did notice that info too - Something about themes being managed by another rep.
Sadly, the instructions for updating didn't point me to anything I could use/understand - I'm not a Unix guy and my NR is an add-on in Home Assistant.
I tried some of the commands I found, in what I think was Terminal, but got some errors about destination paths, etc.

@Steve-Mcl
Copy link
Contributor

Hi, we don't use HA so not certain we can help other than offer some pointers. You may need to ask for help on the HA forum.

  1. I know that the excellent theme pack by @bonanitech has been updated for v3 & pretty sure the themes set an appropriate code editor theme
  2. If you know how to (or can find out how to) edit your settings.js file , you can choose from any of the built in Monaco themes - take a look at this post on the forum: https://discourse.nodered.org/t/editor-text-size/53944/4

@Steve-Mcl
Copy link
Contributor

Steve-Mcl commented Jul 18, 2022

Also, I forgot to add, if this theme is provided/created by the HA team, It would probably be a good thing to let them know (via an issue on their repository) that the theme in question does not set an appropriate Monaco theme.

@bonanitech
Copy link
Contributor

bonanitech commented Jul 18, 2022

@3ative, it looks like you have theme: "vs" enabled in your settings.js.
Just comment out that line and then restart Node-RED.

EDIT: The settings file is in the /config/node-red directory in the add-on for Home Assistant.

@3ative
Copy link
Author

3ative commented Jul 18, 2022

Thanks for all the replies ppl.

Like I said I'm in no way a linux guy 😁 but here's what I could find:
In the config tab of Node-Red (HA Add-on Page) I have set the theme;
Screenshot 2022-07-18 12 42 57

And everything in the NR interface is the same colours as before, etc apart from the BG of the Function Node Editor- as seen in the OP.

  • So [most] of the theme is being used.

As for the settings.js, there is no [theme:] so, I'm guessing the above setting is covering that bit. :)

    // The following property can be used to order the categories in the editor
    // palette. If a node's category is not in the list, the category will get
    // added to the end of the palette.
    // If not set, the following default order is used:
    paletteCategories: [
        'home_assistant',
        'subflows',
        'input',
        'output',
        'function',
        'social',
        'mobile',
        'storage',
        'analysis',
        'advanced'
    ],

    // Configure the logging output
    logging: {
        // Only console logging is currently supported
        console: {
            // Whether or not to include metric events in the log output
            metrics: false,
            // Whether or not to include audit events in the log output
            audit: false
        }
    },

    // Customising the editor
    editorTheme: {
        projects: {
            // To enable the Projects feature, set this value to true
            enabled: false
        }
    }
}

From what I can gather, this "midnight-red" theme IS still being used, it's just the Function Node Editor BG part of the theme itself that hasn't been updated.

  • Also, while looking at the docs and other web page about updating themes... it talks about npm install to place a theme in a "theme" folder... which there isn't one in /config/node-red.

@bonanitech
Copy link
Contributor

I'll work with the add-on developer to find a fix for this.

@3ative
Copy link
Author

3ative commented Jul 18, 2022

@bonanitech Thank you, it's very much appreciated.
The "midnight-red" is the only one I use and it looks so good in my tutorial videos... can't wait to get back to it and show off the new features in V3

  • I've downgraded to NR 2.2.2, for the moment.

@knolleary
Copy link
Member

Closing this issue as it is an upstream theme issue.

@3ative
Copy link
Author

3ative commented Jul 20, 2022

@knolleary Please explain "upstream theme issue" and let me know who I need to ask about getting it fixed.
Thanks.

@3ative
Copy link
Author

3ative commented Jul 20, 2022

@knolleary Sorry, belay my last... I believe @bonanitech is looking into it.

@knolleary
Copy link
Member

@3ative the core node-red project doesn't maintain any custom themes for the editor. They are mostly all provided by the excellent work done by @bonanitech.

The problem you are having will not lead to any code changes or fixes in Node-RED itself (which is what this issue list is for tracking) - this is what 'upstream' means in this context.

@3ative
Copy link
Author

3ative commented Jul 20, 2022

@3ative the core node-red project doesn't maintain any custom themes for the editor. They are mostly all provided by the excellent work done by @bonanitech.

The problem you are having will not lead to any code changes or fixes in Node-RED itself (which is what this issue list is for tracking) - this is what 'upstream' means in this context.

I understand now it's not a NR issue and is something in addition to... Thanks for the clarification too. 👍

@bonanitech
Copy link
Contributor

It looks like the problem is that they don't have codeEditor in their settings.

@bonanitech
Copy link
Contributor

bonanitech commented Jul 21, 2022

@knolleary, shouldn't it work anyway?

EDIT: Maybe something related to #3732?

@knolleary
Copy link
Member

@bonanitech can you explain a bit more? Is this not related to the theme then? Do you have a way to recreate this?

@bonanitech
Copy link
Contributor

If there is no codeEditor object in settings.js, it will not load the customizations made in the theme.

@Steve-Mcl
Copy link
Contributor

I'll take a look

@knolleary is there time before 3.0.1 for me to see if I can resolve this?

@knolleary
Copy link
Member

@Steve-Mcl we need to get 3.0.1 released today. I would rather not being doing that late in the evening. If there's a fix that is forthcoming, then yes. Otherwise it'll have to wait until 3.0.2.

@Steve-Mcl
Copy link
Contributor

5 mins I will push modification - i believe is straight forward and non invasive.

If it makes the cut, great. If not, then 3.0.2

@Steve-Mcl
Copy link
Contributor

@knolleary PR done (tests running)

@bonanitech
Copy link
Contributor

Thanks, guys!

@3ative
Copy link
Author

3ative commented Jul 21, 2022

🥰 Great work guys... but,Alas it didn't make 3.0.1

image

Looking forward to 3.0.2 😀

@knolleary
Copy link
Member

@3ative 3.0.1 has not been published yet. Other things got in the way. We'll get it released tomorrow.

@3ative
Copy link
Author

3ative commented Jul 21, 2022

@3ative 3.0.1 has not been published yet. Other things got in the way. We'll get it released tomorrow.

LOL Yeah, I saw this in my Home Assistant and got excited. 🤣

Screenshot 2022-07-21 21 39 32

@3ative
Copy link
Author

3ative commented Jul 27, 2022

I can confirm that with the latest Home Assistant Add-on update for NR... Now is all good.

Thanks go to everyone involved. 💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants