I am currently trying to evaluate converting an internally used ExtendScript plugin to UXP. The plugin uses ScriptUI to display a modal configuration dialog, which is not supported any more in UXP (I think?).
I tried to use UXP to create a modal dialog, but I could not find a complete example on how to do so.
You need to launch your dialog in a modal context using the uxpShowModal method. You’ll just need a way to launch your dialog. It can be done via a button or a menu command defined in your manifest and entrypoint setup in main.js. I have pasted a simple example below showing both options.
Try it out and let me know if you have any questions?
Googling “uxpShowModal()” lead me to a blog post from Davide Barranca that contains an example that looks fine (and with correct text color) without any additional css:
You don’t have to call uxpShowModal(), showModal() works as well
show() also works and looks identical - in case one needs a non-modal dialog.
I have no idea why <sp-banner> did not work. Maybe it is not supported by Indesign.
I wish there was more official documentation from Adobe. I am a bit unsure whether I should proceed with my project - is UXP in Indesign “production-ready”?
Seems you are headed in the right direction. And, yes, uxpShowModal() aliases to showModal() for now, but I think that is expected to change in the future…
The sp- components are definitely hit or miss in my experience.
As for the production “ready-ness” of UXP, I guess that is up for debate. Adobe seems to think it is production ready. UXP does work well for some projects but has many unimplemented features so I definitely don’t think it is a top area of focus/priority for them.