# Is RED.tray public? and general custom tab discussion

**URL:** <https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983>\
**Category:** Developing Nodes\
**Created:** [20 January 2023 19:04 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983 "2023-01-20T19:04:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [20 January 2023 19:04 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983/1 "2023-01-20T19:04:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 January 2023 22:45 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983/2 "2023-01-20T22:45:42Z")

</div>

> [@marcus-j-davies](#):
>
> RED.tray

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.

> [@marcus-j-davies](#):
>
> Is it 'bad practice' for one to open a jQuery dialog from a custom tab?

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.

> <https://github.com/node-red/node-red/blob/master/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js#L24>

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [20 January 2023 22:56 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983/3 "2023-01-20T22:56:40Z")

</div>

> [@TotallyInformation](#):
>
> RED.notify

The notify API wont fit an entire UI 😅 . - 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

 ![Screenshot 2023-01-20 at 22.55.14](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e8a4f26c15840dbbe2c2a9a58ddce5ad93b56ed.jpeg)

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

 ![Screenshot 2023-01-20 at 23.02.32](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b60ff334cccb878bebd20171693f28f96cc82490.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 January 2023 23:11 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983/4 "2023-01-20T23:11:50Z")

</div>

`RED.notify` is documented: [RED.notify : Node-RED](https://nodered.org/docs/api/ui/notifications/)

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](https://github.com/node-red/node-red/tree/master/packages/node_modules/%40node-red/editor-client/src/js/ui)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [20 January 2023 23:16 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983/5 "2023-01-20T23:16:09Z")

</div>

> [@knolleary](#):
>
> I don't have a strong opinion on whether using tray or dialog is better.

This at least fills me with confidence its not 'not right' 🤪

Thanks @TotallyInformation @knolleary.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 February 2023 23:16 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983/6 "2023-02-03T23:16:57Z")

</div>

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