I’m trying to build a UXP panel for both Photoshop and InDesign. Most elements look and behave similar but the sp-menu behaves differently.
In Photoshop, the overlay menu works fine:
But in InDesign, the same menu lacks a background:
So I tried to manually set a background color in CSS, now it’s clipping/flashing:
Any ideas? And is it possible to find documentation about what differs between Photoshop UXP and InDesign UXP? Isn’t the whole point about “unified” that things should look and feel the same across products?
I’m using an sp-overlay containing an sp-actionbutton and a sp-popover with embedded sp-menu.
Yes, there are, sigh, differences between the rendering of things. I was told once during a group meeting with Adobe staff that they handled that separately, but nobody explained why.
This isn’t the only place where there are differences. Here is a text field with the invalid flag in Adobe Photoshop:
And now the same thing in Adobe InDesign:
And while this isn’t CSS controlled, it definitely is something where the UI remains different between these two applications.
Too bad these things are not documented. Maybe If Adobe shipped sources with the built in UXP widgets one could possibly identify, compare and fix some of the disparities.
Do you know any good sources for updates, like a dev news letter or something? The release changelogs are for product features only, not UXP/API
The built-in widgets are deprecated and no longer updated.
The idea is that one should use the Spectrum Web Components instead. Unfortunately these come with issues of their own. They are fully open source though.
Yeah @dspice, we’re moving to the Spectrum Web Components. Just not sure when or how painful that is going to be. I’m sure it gets more painful the longer we wait, however.
I tried installing and referencing sp-menu (through the corresponding SWC wrapper/version), these should then take precedence over the built in sp-menu I assume?
Unfortunately it looks and behaves exactly as before, with the the built in menu widget.
Thanks a lot Philip for verifying. Indeed it looks like one of the SWC components I use (sp-card) has dependencies on and pulls in its own version of sp-menu, probably causing conflicts with the built in one.
Putting this out here as a solution of sorts; sp-menu along with sp-card (I think), needs to have background color and border manually set/overriden in CSS. Something like this fixes the background missing and/or flashing: