Optional "keywords" on node definitions for palette filter and quick-add

Hi all,

I mentioned this to Nick a while ago, so here it is properly.

The palette filter and the quick-add dialog only match a node's type and label. That makes nodes hard to find when users search for the product they own rather than the generic node name. Our example: the Victron Energy Switch node handles several switching products (GX IO-Extender, the new Koro 640 GX S with its Aurelia DC distribution, virtual switches). Users search for "koro" or "aurelia" and get no results.

While searching the forum I came across an older thread asking for the same thing: Extending the search box. There, searching the node help was considered too noisy (common words like "input" would match everything), and a tag list was suggested as a backwards compatible alternative. My proposal is along those lines.

Not to be confused with package.json keywords: the palette manager's Install tab already searches those (see Pallette keywords - #5 by BartButenaers). This is about finding an installed node in the palette filter and quick-add, per node rather than per package.

Proposal: an optional keywords array in RED.nodes.registerType:

    RED.nodes.registerType('victron-input-switch', {
        category: 'Victron Energy',
        paletteLabel: 'Switch',
        keywords: ['Koro', 'Aurelia', 'IO-Extender'],
        ...
    })

The palette filter and quick-add would match these in addition to type and label. No UI change, nodes without keywords behave as before, and older Node-RED versions ignore the field, so nodes can add it straight away.

I have a working change against dev (palette.js and typeSearch.js, about 10 lines) and am happy to open a PR if this fits your plans:

Best,
Dirk-Jan

Hi @dirkjanfaber

Please do raise the PR - much easier to review and discuss with working code in front of us.

Regards,
Nick

Sure! I've created one here.