Multiple panels from a single CCX?

The documentation references the ability to create additional entrypoints via manifest or JS, but I’m not clear how you actually populate it. How do you point a panel to something other than the top level main property (index.html) used for the first panel?

Any manifest or plain vanilla JS examples for 2+ panels from a single install?

https://www.adobe.io/photoshop/uxp/guides/uxp_guide/uxp-misc/manifest-v4/#example-manifest

does this help?

1 Like

Just added this to the UXP 5.2 Kitchen Sink demo branch. This will work w/o 5.2, but thought it a good idea to add it here.

See second panel example · AdobeDocs/uxp-photoshop-plugin-samples@f8c6cf9 · GitHub

4 Likes

@kerrishotts Perfect, thanks!

Dear Kerri,

I’ve got a hold of the linked code but when I try to run your plugin ‘as is’, I’m getting a strange error.

com.adobe.example.uxp-ui-kitchen-sink

Validate command failed in App with ID PS and Version 24.1.0

Plugin Load Failed.

Devtools: Plugin com.adobe.example.uxp-ui-kitchen-sink : Expected an object for the permission ‘launchProcess’

I have PS version 22 installed.

I’ve made my code match yours anyway, but I’m not able to get my second panel to show.

What I’m trying to achieve is to have the panels in the entrypoints be shown when clicked in the plugin manager dialog. Currently, I’m not getting a second panel showing.

Most of plugin samples have issues now. As you may notice, only one of them is a few months old and all others are at least a year old. It’s sad that this repository got abandoned and is a very bad example for new to UXP devs, because they implement old ways of dealing with things.

2 Likes

Thank you for confirming it isn’t my usage. Even trying to run freshly pulled it seems the samples up don’t actually work.

There is a very easy way to add additional panels nowadays:

  1. in your Manifest.json, define a second panel entry in the entrypoints array, in this example I give it an ID of “mySecondPanel”
  2. in your index.html, add a <uxp-panel panelid="mySecondPanel"> </uxp-panel> element inside the <body> element.

Put any of your interactable elements inside the uxp-panel element and they will be placed in the 2nd panel.

2 Likes

@Zob

Thank you for this. It’s now achieving what I was hoping to do. Last question is any idea how to not have all the panels open by default?

Clicking the buttons on the right opens each panel correctly, but I don’t want the user to have them displayed when opening the plugin.

I’d also like it to close any other panels when clicking one, so you don’t end up with 2 panels showing at once. Any ideas would be appreciated! Thanks.