Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(dropdown): single search #839

Merged
merged 4 commits into from
Feb 6, 2019

Conversation

bmdalex
Copy link
Collaborator

@bmdalex bmdalex commented Feb 4, 2019

feat(dropdown): single search

Description:

This PR implements the single selection with search flavor Dropdown component (prerequisite for inline Dropdown).

API

<Dropdown
  search
  items={inputItems}
  placeholder="Start typing a name"
  noResultsMessage="We couldn't find any matches."
/>

renders:
screen recording 2019-02-04 at 21 36 07

@codecov
Copy link

codecov bot commented Feb 4, 2019

Codecov Report

Merging #839 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #839   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files          21       21           
  Lines         728      728           
  Branches       73       73           
=======================================
  Hits          681      681           
  Misses         47       47

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b05085...d18a307. Read the comment docs.

@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch 2 times, most recently from 8509875 to 0e3890c Compare February 5, 2019 15:31
@microsoft microsoft deleted a comment from DustyTheBot Feb 5, 2019
@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch 2 times, most recently from b4697b9 to 29e2582 Compare February 5, 2019 18:28
@bmdalex bmdalex changed the title feat(dropdown): multiple selection and single search feat(dropdown): single search Feb 5, 2019
@mnajdova
Copy link
Contributor

mnajdova commented Feb 5, 2019

I don't like the fact that if I want to replace the selected item I have to remove everything and start typing. I like the SUIR implementation: https://react.semantic-ui.com/modules/dropdown/#types-search-selection it's closer to what i would expect. If you have something selected and you are clicking again on the dropdown, clear the dropdown so that the user can start typing the new item. Does not have to be implemented as part of this PR, but this is something I had to mention :)

@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch from 29e2582 to 7c58355 Compare February 6, 2019 11:04
@bmdalex
Copy link
Collaborator Author

bmdalex commented Feb 6, 2019

@mnajdova

We're actually following ARIA standards in this implementation:

https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html
(see Example 3: List with Inline Autocomplete)

I agree there should be a better way to clear the selection. The UX will get better when we'll be adding the 'x' icon to clear the selection. It's on the roadmap for Dropdown

@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch from 7c58355 to b703b60 Compare February 6, 2019 13:18
@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch from b703b60 to 927f132 Compare February 6, 2019 14:16
@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch from 927f132 to 6bc487e Compare February 6, 2019 14:17
@bmdalex bmdalex force-pushed the feat/dropdown-multiple-selection-single-search branch from 6bc487e to e21e1b4 Compare February 6, 2019 14:57
@bmdalex bmdalex merged commit d89668f into master Feb 6, 2019
@bmdalex bmdalex deleted the feat/dropdown-multiple-selection-single-search branch February 6, 2019 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants