Flyouts can only have a single separator and no nesting?

I’m currently in the process of porting a plugin from CEP to UXP where I have a quite expansive panel menu, which I want to keep the same in UXP as it is now in CEP.
I run into weird issues however: It seems that I can only add a single separator in the whole menu. Whenever I add additional separator items (label: “-”), even to a submenu (!) it is completely ignored.

Additionally it seems that submenus can only go one level deep? No submenus in submenus? (yes, bad UI practice etc etc… ) - CEP supports this without issues.

The flyout menu is, in fact, a regular InDesign menu, and if you manage its contents (menu items, menu separators, submenus etc.) as you would, for instance, a custom menu in InDesign’s main menu, then you can have all the things you want – there are no problems. In the uxp code for your panel, you just need minimal code to trigger the creation of the menu. I explained how to do it, with an attached sample plugin so anyone can see/hack the code, here:

https://forums.creativeclouddeveloper.com/t/dynamic-flyout-menus-in-uxp-plugins-for-indesign/8596/1

I came to this approach after trying but failing to control/manage the flyout menu from the uxp side. You have discovered some of the “weird issues”. There are others (all specific to InDesign plugins BTW, not Photoshop plugins). I came to the conclusion that there were too many. Thankfully they can be sidestepped.

Philip

Thanks Philip, this is really helpful!

I must say that I find the he whole UXP dev experience in InDesign to be really lacking coming from CEP, which yes is a resource hog, but at least everything just works and is fairly complete. UXP feels so unpolished and buggy even so many years in - it really frustrates me.

1 Like

I share your frustration!

What I really like with UXP is that we can use all the ES6 features when scripting InDesign – all the ES6 array functions, for instance. That is a great improvement. However, the irony is that so little of my time is actually spent scripting InDesign because so much of my time is spent on the interface – fighting with UXP in the panel!

Philip

3 Likes

Oh I totally agree on that aspect. This I do like about UXP a lot and this (the scripting/backend part) for the most part works without any issues!

It is as you stated, mostly/only the UI stuff I’m constantly struggling with… it is buggy and incomplete… it is so weird too because in PS this mostly all just works fine. Things that are broken also have a tendency to stay broken for years on end. I mean, Icons for minimized panels are STILL not working in 2024, we only just got flyout panels and the implementation is half-baked to put it kindly. Other bugs which have been there forever just remain unfixed… it is really kind of depressing. I wish Adobe would either open-source UXP or at least take in private contributions just to get these things addressed.

1 Like