Is RED.tray public? and general custom tab discussion

So...

I am working on a MASSIVE refactor, and want to ensure I use API's that are designed for custom nodes.

to date, I use:

  • RED.tabs
  • RED.comms

My custom tab opens up jQuery dialogs, but I am always cautions, if this is frowned upon?

So...My questions are:

  • Is it 'bad practice' for one to open a jQuery dialog from a custom tab?
  • If it is
    • is RED.tray a public API? (if so, is there any documentation)

The module I am referring to, is for z-wave - and its extremely complex and fully featured.
and really has 2 parts.

  • Events, Updates, Reactive automation (where flows are in use)
  • Network management (adding, removing, configuring devices and the network as a whole)

And its the 2nd point, that requires such a fruitful UI (there are lots of network management areas).

Marcus

I don't think it is documented. The only place I think it might be used (other than in core programming) is in the Blockly node.

Generally better to use RED.notify I think - also not really documented I don't believe but certainly in use in a number of core and contributed nodes.

2 Likes

The notify API wont fit an entire UI :sweat_smile: . - hence the need for a dialog window approach.
The Network side of Z-Wave - is very involved, so I use modals to present the UI.

This is not not to be confused with general flow development (the network side is not involved with every day flow interaction)

The UI (sidebar + Modal windows) - is to manage the network only

The side panel lists devices / and basic controller info - then the dialogs reveal all the advanced areas

EDIT:

The side panel is occupied quite a bit - hence the more advanced areas in a dialog/modal window

RED.notify is documented: RED.notify : Node-RED

I don't have a strong opinion on whether using tray or dialog is better.

RED.tray is available to use, will look at adding docs for it.

There are a few examples in the editor src you could crib from for now: node-red/packages/node_modules/@node-red/editor-client/src/js/ui at master · node-red/node-red · GitHub

1 Like

This at least fills me with confidence its not 'not right' :crazy_face:

Thanks @TotallyInformation @knolleary.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.