Properties on the UXP panel

Are there any special properties on the panel object that developers can use? I saw a uxpContainer property in one edit session.

Occasionally my plugin panel is blank and I can’t track it down or reproduce it consistently.

Is there a way to check if my panel has been added (visible) and to what node it’s added to? I’m setting a global boolean flag now with show() and hide() methods and checking if myDialog.parentNode is null.

Do you have to use panel object?

let panelContainer = document.createElement("panel");

Further down the page the example uses a “div”:

panel = document.createElement("div");

not at all. panel object actually does not exist. It’s equivalent to a div

I’m getting a blank plugins panel on some projects.

Is it possible that I could be accidentally removing all of the panels? I’m not talking about my own plugin panel but all plugins are gone. On another open project in another window my plugin panel is working fine.

The documentation has how to show a panel but how do you remove it?

https://adobexdplatform.com/plugin-docs/tutorials/quick-start-panel/

In my case I remove the form from the panel and show it in a dialog and when the dialog is closed I remove it from the dialog and then add it back to the panel.

Here’s how I remove on hide():

hide(event) {
	globalModel.panelVisible = false;

	try {

		if (event.node && event.node.firstElementChild) {
			event.node.firstElementChild.remove();
		}
	}
	catch(error) {
		log(error);
	}
},

Using the hide method correctly is pretty hard. We will need to look into your show method to debug this properly, A workaround for this could be not using the hide method at all and only create your panel UI when the UI is not present in a global variable.

Do you get any log in the developer console when the plugins disappear?

I haven’t seen any but if it happens again I’ll check. So far so good. :crossed_fingers: