Sp-dropdown => sp-picker?

I was looking at the sp-dropdown page and I was about to submit an Issue because the link to the Spectrum Web Components dropdown just below the screenshot is broken.

Then I’ve realized that Spectrum Web Components don’t have <sp-dropdown> anymore, the replacement being <sp-picker>, see here.

I get that the link between Spectrum UXP and the Web Components is not too tight, yet I was wondering whether the plan is to keep them more or less in sync – i.e. switch to <sp-picker> in UXP too…?

Besides <sp-dropdown> has a troubled history (bugs, etc), maybe a change of name is beneficial :wink:


1 Like

Hah – yeah, this is the fun of building an implementation while the nomenclature is changing on a regular basis. We’ll be aligning this in the future, but we want to do it in a way that doesn’t break plugins, so still figuring out the best way to do that (since it’s not like you’re including a library – Spectrum UXP is part of the runtime).

Please go ahead and file an issue on the repo – that’ll be helpful for tracking.

1 Like

Is the sp-picker still in development or is it functional now? I just tried converting sp-dropdown to sp-picker in one of my plugins. It shows a listbox instead of a dropdown. I used the code exactly as shown in the link Davide posted. I tried PS 22.2 and 22.3 pre-release which both display the same.

Is there an additional setting that needs set for UXP to display the sp-picker as a dropdown? Functionally, it all seems to work other than the display.

sp-picker isn’t a valid Spectrum UXP component just yet; so you should continue to use sp-dropdown for now.

When we roll out changes to the nomenclature, we’ll do it in a versioned manner so that existing plugins won’t break.