Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider switching from react-select to Adobe’s React Spectrum #2469

Closed
fregante opened this issue Jan 22, 2022 · 3 comments
Closed

Consider switching from react-select to Adobe’s React Spectrum #2469

fregante opened this issue Jan 22, 2022 · 3 comments
Labels
enhancement New feature or request low priority

Comments

@fregante
Copy link
Contributor

fregante commented Jan 22, 2022

React Spectrum is Adobe’s customizable and accessible component system. You can gauge the quality by checking out its documentation pages: https://spectrum.adobe.com/page/combo-box/

While React Select works reasonably well, its virtual counterpart isn't ideal:

// Package has no types: https://github.com/guiyep/react-select-virtualized/issues/293
declare module "react-select-virtualized" {
export { default } from "react-select";
}

// Required for react-select-virtualized https://github.com/guiyep/react-select-virtualized/issues/283
import "regenerator-runtime/runtime";

// Only style the selected value because `react-select-virtualized`
// does not allow the customization of the list
// https://github.com/guiyep/react-select-virtualized/issues/13#issuecomment-527238574
components={{ SingleValue }}

Not to mention that this isn't great UI to pick icons, and there's no way to customize it:

Screen Shot

I don't know if react-spectrum performs well on long lists of items but if there's interest we could look into it. It also has several other high-quality components that could always be useful.

@fregante fregante added enhancement New feature or request low priority labels Jan 22, 2022
@fregante
Copy link
Contributor Author

I don't know if react-spectrum performs well on long lists

It looks like it automatically virtualizes them!

Design goals

Async loading
Virtualization for large collections
Infinite scrolling to load more items on demand

@fregante
Copy link
Contributor Author

fregante commented Mar 1, 2022

It can also replace react-autocomplete, which currently has a different look from react-select and is only used in SelectorSelectorWidget:

https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#custom-value

It also supports the usage described in #688

gif

@twschiller
Copy link
Contributor

twschiller commented Jun 9, 2022

Closing because it's not on our priority radar. Can revisit during future design system update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

2 participants