patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
773 stars 350 forks source link

PF4: Custom Select Component: Type-ahead select (single item) #1215

Closed tlabaj closed 5 years ago

tlabaj commented 5 years ago

This issue covers the Type-ahead select (single item) variation of the Custom Select only: (This issue is a child of issue #1206 )

On hold until the Single select variation is complete (issue #1214 )

Related issue in Core: patternfly/patternfly-next#651

Info provided on the component: https://docs.google.com/document/d/1rrCdARutABI-Vpa_mdMWGl2xJJTtt2dPQ2bjFx2zwCM/edit?usp=sharing

see: https://pf-next.com/components/Select/examples/

In addition to a React review, this issue should be reviewed by the core contributors: CSS: @srambach (CSS) @mcarrano (interaction design) @christiemolloy (visual design)

priley86 commented 5 years ago

Doing some PF3 typeahead integration work recently in CNV, I noted some of the following things about the React API surface. Would just like to share these for consideration as we begin to review this React component.

Some additional design notes we found were that the React Bootstrap Typeahead did not support copy/paste selection (the user needed to tab and press enter after pasting the copied string which matched the typeahead selection). I am not sure about PF design intent/accessibility guidelines on this, but it would be interesting to consider. From a JS standpoint, I assume you could crawl the labelKeys and auto select, but I do not typically see this with other typeahead components I've used in the past. It seems that the user should clearly be able to distinguish the selection state of the item after selection occurs.

downstream pr in kubevirt w/ pf3

Hope this helps as you get started and happy to review further w/ you!

priley86 commented 5 years ago

some other interesting autocomplete/typeahead implementations for React "in the wild". Downshift is a great library to consider as well: https://material-ui.com/demos/autocomplete/

dgutride commented 5 years ago

Closed via https://github.com/patternfly/patternfly-react/pull/1839