I’m interested in building my own UXP plugin for Photoshop and would like to use the most up-to-date stack that Adobe officially supports.
I initially tried the SWC UXP Wrapper, but I found the available widgets to be quite limiting. The swc-starter-webpack example displays a broken layout in the latest version of Photoshop, which doesn’t give me confidence to use it in my project.
I also noticed that Adobe appears to be moving away from UXP Widgets in favor of Spectrum v2. However, I haven’t been able to find any documentation explaining how to use them in UXP plugins, apart from the UXP Wrapper which hasn’t been updated in three years.
Is Adobe’s expectation that new plugin developers should use Webview instead? It seems that many of Photoshop’s newer panels are essentially full-on webpage now.
I wouldn’t say Adobe expects anything. They have created support which would allow you to use several frameworks. The one they’ve shown the most is React working with the native spectrum components. That works well (as does vanilla JS with spectrum), but limits you from some customization and UXP is a pseudo browser without full support for HTML5 standards. That hasn’t changed much in a while.
Using a webview can add its own complexity, but opens up much more potential to customize your UI. I don’t recall much from Adobe using this interface, I believe it’s more 3rd-party work.
Which is best probably depends on your goals, skills, and capabilities.
Does webview needs an external server to be run so it can load the webview? Because I haven’t find a way to make webview work unless an external server is on.
That’s fair, I suppose I’m just a bit frustrated because as you mentioned the customization is limited. It’s like there’s a huge disparity between Photoshop native UI and what UXP UI if you want to create something beyond panel of buttons and texts (like table views, collapsible panels, etc). I’m expecting widgets should have these covered, but the provided sample no longer properly built on me. So I’m a bit clueless on where’s Adobe UXP is heading to. All most recent documentation I found is related to Spectrum v2 which looks like a full on HTML design.
No, it does not necessarily need an external server anymore.
Starting from UXP v8.0.1, WebView supports local HTML rendering. You need to enable it in the manifest by declaring the WebView configuration like this: