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

fix(input): handle IME events on input Enter keydown #992

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
d792021
start writing useMultipleSelection
silviuaavram Jan 9, 2020
7cf7e94
make it work
silviuaavram Jan 13, 2020
93e9c4b
add docz page
silviuaavram Jan 13, 2020
b64562d
fix initial state
silviuaavram Feb 22, 2020
532301a
clear input at selection
silviuaavram Feb 23, 2020
e882d94
add propTypes
silviuaavram Feb 23, 2020
2cb817d
implement addItem
silviuaavram Feb 28, 2020
20d0d3a
fix the reducer delete step
silviuaavram Mar 1, 2020
5a1d137
fix filtering in docsite
silviuaavram Mar 1, 2020
14c63ac
support backspace
silviuaavram Mar 14, 2020
5756112
fix docsite example
silviuaavram Mar 14, 2020
782e17d
check if keydown operation is allowed
silviuaavram Mar 14, 2020
6c28dd2
some jsdoc
silviuaavram Mar 14, 2020
ad8b73a
add dropdown tests and fix some bugs
silviuaavram Mar 15, 2020
ecd8722
remove cleanup from test
silviuaavram Mar 16, 2020
8a0e8c5
replace onIconClick with remove
silviuaavram Mar 16, 2020
a804932
fix typo in hook name
silviuaavram Mar 16, 2020
3a4b0bd
rename to getItemProps
silviuaavram Mar 16, 2020
2c4dd3e
getItemProps tests for hook
silviuaavram Mar 16, 2020
1a7d25e
add more keydown tests for item
silviuaavram Mar 19, 2020
a995d5b
tests for backspace and delete
silviuaavram Mar 21, 2020
522f53f
support a11y removal message
silviuaavram Mar 22, 2020
df92852
finish props tests
silviuaavram Mar 23, 2020
6c60dac
augment props tests for other hooks
silviuaavram Mar 23, 2020
09973fa
add setItems, setActiveIndex, reset
silviuaavram Mar 23, 2020
1111aff
add remove icons to example
silviuaavram Mar 24, 2020
a6b3a59
style improvements
silviuaavram Mar 24, 2020
1c9dea8
pass isOpen to getDropdownProps
silviuaavram Mar 24, 2020
4f84442
fix coverage in testUtils
silviuaavram Mar 25, 2020
f1f4bba
improve docsite example onStateChange
silviuaavram Mar 25, 2020
fa77199
test for full coverage
silviuaavram Mar 25, 2020
ef299b0
finish combobox example
silviuaavram Mar 26, 2020
f735a8c
add useSelect example
silviuaavram Mar 26, 2020
a7bce48
docs code format
silviuaavram Mar 26, 2020
b3dbf6c
update snapshot
silviuaavram Mar 26, 2020
4e32b22
remove unnecessary destructuring
silviuaavram Mar 26, 2020
c521f58
fix stateChangeTypes not being attached to hook
silviuaavram Mar 27, 2020
84d1618
update readme for other hooks
silviuaavram Mar 27, 2020
b8004dd
cann getA11yRemovalMessage with more props
silviuaavram Mar 27, 2020
2ebf3ad
fix prop types
silviuaavram Mar 27, 2020
fa75863
add readme but not done yet, only to getItemProps
silviuaavram Mar 27, 2020
af4e5a2
finish readme
silviuaavram Mar 27, 2020
dadac9f
fix a space in a test
silviuaavram Mar 27, 2020
cd538d3
add defaultItems to propTypes validation
silviuaavram Mar 28, 2020
69ae8aa
add item click as state change
silviuaavram Mar 28, 2020
4a5be6e
add support to change navigation keys
silviuaavram Mar 28, 2020
c80739d
augment the other readmes
silviuaavram Mar 29, 2020
4e23fd4
add typescript support
silviuaavram Mar 29, 2020
e15e694
fix mistakes
silviuaavram Apr 1, 2020
9cc073d
perform rename from item(s) to selectedItem(s)
silviuaavram Apr 1, 2020
52a6042
update select usage codesandbox link
silviuaavram Apr 2, 2020
3ffda5c
fix ts typings after rename
silviuaavram Apr 2, 2020
3217918
review on the docs again
silviuaavram Apr 2, 2020
78ae701
fix ts typings
silviuaavram Apr 4, 2020
2317f55
transition to import * as React
silviuaavram Apr 7, 2020
390661e
improve documentation in docsite example
silviuaavram Apr 9, 2020
12e32ee
fix unrelated test
silviuaavram Apr 9, 2020
1980a28
change isOpen to preventKeyAction
silviuaavram Apr 9, 2020
83dcb95
update types
silviuaavram Apr 9, 2020
b80ead1
remove custom navi from cypress
silviuaavram Apr 10, 2020
ee4bf0e
update nvmrc
silviuaavram Apr 10, 2020
9f9dba6
update snapshot
silviuaavram Apr 10, 2020
e8aed7c
update props table
silviuaavram Apr 10, 2020
b779ec7
revert cypress test fix
silviuaavram Apr 10, 2020
98484b0
some Readme polish
silviuaavram Apr 10, 2020
64f84c7
fix Downshift component
silviuaavram Apr 11, 2020
d0ab1f9
fix useCombobox
silviuaavram Apr 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8
v10
60 changes: 30 additions & 30 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
{
"dist/downshift.cjs.js": {
"bundled": 115575,
"minified": 53667,
"gzipped": 11596
"bundled": 132243,
"minified": 61564,
"gzipped": 12969
},
"preact/dist/downshift.cjs.js": {
"bundled": 114297,
"minified": 52633,
"gzipped": 11493
"bundled": 130972,
"minified": 60537,
"gzipped": 12870
},
"preact/dist/downshift.umd.min.js": {
"bundled": 125520,
"minified": 41642,
"gzipped": 11225
"bundled": 142178,
"minified": 46194,
"gzipped": 12321
},
"dist/downshift.umd.min.js": {
"bundled": 129728,
"minified": 42946,
"gzipped": 11780
"bundled": 146379,
"minified": 47500,
"gzipped": 12876
},
"preact/dist/downshift.umd.js": {
"bundled": 135218,
"minified": 48644,
"gzipped": 12423
"bundled": 152291,
"minified": 54421,
"gzipped": 13636
},
"dist/downshift.umd.js": {
"bundled": 164816,
"minified": 57565,
"gzipped": 15043
"bundled": 181882,
"minified": 63348,
"gzipped": 16259
},
"dist/downshift.esm.js": {
"bundled": 115076,
"minified": 53237,
"gzipped": 11526,
"bundled": 131667,
"minified": 61065,
"gzipped": 12899,
"treeshaked": {
"rollup": {
"code": 2081,
"import_statements": 428
"code": 2209,
"import_statements": 317
},
"webpack": {
"code": 4240
"code": 4341
}
}
},
"preact/dist/downshift.esm.js": {
"bundled": 113764,
"minified": 52169,
"gzipped": 11425,
"bundled": 130355,
"minified": 59997,
"gzipped": 12796,
"treeshaked": {
"rollup": {
"code": 2082,
"import_statements": 429
"code": 2210,
"import_statements": 318
},
"webpack": {
"code": 4239
"code": 4340
}
}
}
Expand Down
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ This library provides its users two main sets of solutions: the `Downshift`
component and a set of hooks. The component is still the main part of the
library, providing autocomplete/combobox logic as a render prop. The hooks are
newer and are going to be the way forward to provide accessibility logic to
widgets. Right now we support `useSelect` for `<select>` components and
`useCombobox` for combobox/autocomplete.
widgets. Right now we support `useSelect` for `select` components, `useCombobox`
for `combobox/autocomplete` and `useMultipleSelection` to make multiple
selection easier for the first two experiences.

Since `useCombobox` and `<Downshift />` aim to provide accessibility to the same
kind of widget, we suggest trying the new `useCombobox` and if you feel that
`<Downshift />` still covers your use case better then use that instead. Both of
them are actively maintained but we are cool kids from the future and prefer to
share `React` logic via hooks.
Since `useCombobox` and the component `Downshift` aim to provide accessibility
to the same kind of widget, we suggest trying the new `useCombobox` and if you
feel that `Downshift` still covers your use case better then use that instead.
Both of them are actively maintained but we are cool kids from the future and
prefer to share `React` logic via hooks.

The `README` on this page is only for the component while each hook has its own
`README` file, check below. But they are similar in many concepts so you can
Expand Down Expand Up @@ -77,11 +78,12 @@ specific dropdown variation and be named accordingly: `useSelect`,
`useCombobox`, `useMultipleSelection` etc.

You can check the progress in the [hooks page][hooks-readme] and contribute! If
you want to create a custom `<select>` or `combobox autocomplete` dropdown and
want it to be functional and accessible, jump directly to the already
implemented [useSelect][useselect-readme] and [useCombobox][combobox-readme].
For more examples of how to use the hooks check out our
[docsite](https://downshift.netlify.com/)!
you want to create a custom `select` or `combobox/autocomplete` dropdown, with
the possibility of multiple selection, and want it to be functional and
accessible, jump directly to the already implemented
[useSelect][useselect-readme], [useCombobox][combobox-readme] and
[useMultipleSelection][multiple-selection-readme]. For more examples of how to
use the hooks check out our [docsite](https://downshift.netlify.com/)!

### Bundle size concerns

Expand All @@ -97,6 +99,7 @@ the library treeshaked (pruned) and given only the code you need. Since version
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Installation](#installation)
- [Usage](#usage)
- [Basic Props](#basic-props)
Expand Down Expand Up @@ -1464,4 +1467,6 @@ MIT
https://github.com/downshift-js/downshift/blob/master/src/hooks/useSelect
[combobox-readme]:
https://github.com/downshift-js/downshift/tree/master/src/hooks/useCombobox
[multiple-selection-readme]:
https://github.com/downshift-js/downshift/tree/master/src/hooks/useMultipleSelection
[bundle-phobia-link]: https://bundlephobia.com/result?p=downshift@3.4.8
Loading