# Window.open : Bad practice?

**URL:** https://discourse.nodered.org/t/window-open-bad-practice/88390
**Category:** Developing Nodes
**Created:** [30 May 2024 18:49 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390 "2024-05-30T18:49:58Z")
**Posts on this page:** 10
**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: [30 May 2024 18:49 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/1 "2024-05-30T18:49:58Z")

</div>

~~So...~~

~~I am on a massive refactoring project with my Node (ZWave)  
ZWave has a very colourful and involved management system, and for this I (currently) use blocking modals to display everything I need to + using the sidebar (there is that much to it).~~

~~The modals are opened via the Side Bar~~

~~The management is Network Management, and isn't affecting the flow or interacting with it  
(just in case those types of comments come flooding in)~~

~~This refactor is removing the sidebar content (most of it at least).  
and I am now opening up a new window (non blocking)~~

~~Whilst doing this, I am passing the browsers `RED` object, and loading the jQuery runtime via a script link - this is so I can use what is already being provided, and so can still use all the auth headers I need to (various admin endpoints are in use)~~

~~My question is,  
Is this bad practice, frowned upon?~~

~~I can't see why it would be a bad thing?, but still would like some opinion from the core team.~~

~~Here is a preview, of what I am doing.~~

~~Thank you please~~

---

<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: [31 May 2024 06:55 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/2 "2024-05-31T06:55:15Z")

</div>

Found a flaw in my design, nothing to see here, move on..

---

<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: [31 May 2024 08:09 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/3 "2024-05-31T08:09:28Z")

</div>

Sounds like you might need some help from UIBUILDER to help integrate your ZWave page integrated with Node-RED.

🤣

---

<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: [31 May 2024 08:19 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/4 "2024-05-31T08:19:19Z")

</div>

I started this refactor last year - but have since been pulled in other directions (Professional Career) - I now have some time

I spent a large amount of time perfecting its integrated approach into Node RED (Side Bar).  
but this is at a cost of complexity - and with this refactor, I aim to make it easier for myself.

by detaching the modal you see into a new window entirely.  
but a few problems occurred with this approach.

ZWave is a beast with its management, so I can't just use the side bar alone.

 ![Screenshot 2024-05-31 at 09.13.00](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/68ffea8359bf11cde98c8c7be4001ce8b4506fe8.png)

Can UIB be used a dependancy?

---

<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: [31 May 2024 08:41 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/5 "2024-05-31T08:41:47Z")

</div>

> [@marcus-j-davies](#):
>
> Can UIB be used a dependancy?

It can indeed. Not a common approach but all you need to do is use the `uibuilder.start()` function with some parameters if your web page is served from a non-Node-RED web server. The parameters tell the library where Node-RED resides and how to connect to it. Details in the client docs.

---

<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: [4 June 2024 13:34 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/6 "2024-06-04T13:34:06Z")

</div>

Ok!

I have come up with a new UI workflow for my V10 release.  
My aim for V10 is to give it a complete polish! (let alone the Typescript refractor), as well as allowing to fit perfectly in the Node RED UI standards, if there was one

But the new UI I think works really well! (and uses all standard Node RED APIs)

For those interested.

- RED.sidebar ([RED.sidebar : Node-RED](https://nodered.org/docs/api/ui/sidebar/))
- RED.tray (No documentation yet)  
I used the dashboard as reference material

🕶

![Jun-04-2024 14-28-56](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/49ba4de7369aee7da5c61bd1b9a5944ae015b7ef.gif)

---

<div class="post-metadata">

### Author: ![magicman](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@magicman](https://discourse.nodered.org/u/magicman)
#### Post date: [5 June 2024 11:34 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/7 "2024-06-05T11:34:07Z")

</div>

Hi Marcus,  
Big fan of your Zwave work how do i get a look at this and try it ? 🙂

---

<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: [5 June 2024 11:42 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/8 "2024-06-05T11:42:38Z")

</div>

Hi @magicman

Thanks for the kind words.  
V10 is a big big release (a lot has changed in this domain), and is still being worked on.  
I started it last year (but work got in the way).

Just some things to look forward to

- Long Range Support (for supported sticks / devices)
- Controller Firmware Update Support
- Better Map Render
- Unlimited Networks
- Custom Packet Routing (overrides the controllers routing matrix - sometimes they are not great)
- Better / slicker management UI (as above)

Once I get close, I'll push a BETA - but its not ready just yet

---

<div class="post-metadata">

### Author: ![magicman](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@magicman](https://discourse.nodered.org/u/magicman)
#### Post date: [5 June 2024 13:52 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/9 "2024-06-05T13:52:41Z")

</div>

Ok thanks look forward to it

---

<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: [4 August 2024 13:53 UTC](https://discourse.nodered.org/t/window-open-bad-practice/88390/10 "2024-08-04T13:53:17Z")

</div>

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