Allow palette.theme to be set via theme plugin and include icons#5500
Merged
Allow palette.theme to be set via theme plugin and include icons#5500
Conversation
This was referenced Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5487
This PR adds support for setting the
palette.themesetting via a theme plugin. It also extends support for this setting to provide custom icons to nodes.The docs need updating to provide full details, but here are my working notes.
editorTheme.palette.themeis a way for custom colors to be specific for individual nodes identified by type or category (using a regex to match multiple where needed).iconproperty to set the icon of any matching nodes - see notes below on how icons are provided.Theme Plugins
A theme plugin can now include this setting, meaning the
settings.jsfile does not need to be touched. It also means the plugin can bundle any icons it wants to apply in its own package - making distribution much easier.The plugin
.jsfile (that registers itself) should contain thepalettesetting:In the same directory as the plugins
.jsfile should be aniconsdirectory. This should contain (with no further sub-directories iirc) the icons the plugin provides.The icon can then be referenced by name without including the
iconspart of the path.To enable a theme plugin, edit
settings.jsand seteditorTheme.themeto the name of the theme -test-theme-pluginin the example above (the first arg passed to theregisterPlugincall).Useful debug tip: if icons aren't loading as expected, in the browser console, run
RED.nodes.getIconSets();- this will return an object listing all of the custom icons known to the editor, organised by which module is providing them. Check the theme plugin shows up and lists the icons you think it should.