This repository was archived by the owner on Dec 30, 2022. It is now read-only.
Commit 55e4191
feat(answers): add
* feat(answers): add widget [WIP]
* make queryLanguages required
* add extraParameters
* Update packages/react-instantsearch-dom/src/widgets/Answers.js
Co-authored-by: Haroen Viaene <hello@haroen.me>
* set user agent in answers query
* fix the parameters
* bundle up effects as useAnswers
* update the default component
* expose useAnswers
* spread extraParameters
* add prefix to the useAnswers hook
* do not show list on loading
* debounce search calls
* throw error when react version doesn't support hooks
* error handling
* Update packages/react-instantsearch-dom/src/widgets/Answers.js
Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>
* add test cases
* use fake client
* Update packages/react-instantsearch-dom/src/widgets/__tests__/Answers.js
Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>
* update types of debounce and debounceAsync
* Update packages/react-instantsearch-dom/src/hooks/useAnswers.js
Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>
* remove Boolean() function
* fix type error
* clean debounce functions
* expose debounce time options
* update test not to use waitFor
* update bundlesize
* throw error early if findAnswers doesn't exist
* clean up the code
* remove unnecessary catch
* fix(types): fix type errors regarding SpeechRecognition (#3005)
* fix(types): fix type errors regarding SpeechRecognition
* Apply suggestions from code review
Co-authored-by: Haroen Viaene <hello@haroen.me>
Co-authored-by: Haroen Viaene <hello@haroen.me>
* extract runAllMicroTasks to test/utils
* change wait time
* provide initial values in useAnswers
* remove unnecessary parameter
* remove the user agent workaround
Co-authored-by: Haroen Viaene <hello@haroen.me>
Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>EXPERIMENTAL_Answers widget (#2996)1 parent 4f978e6 commit 55e4191
File tree
25 files changed
+676
-86
lines changed- .codesandbox
- packages
- react-instantsearch-core/src
- core
- __tests__
- react-instantsearch-dom-maps/src/__tests__
- react-instantsearch-dom/src
- components
- hooks
- lib
- voiceSearchHelper
- __tests__
- widgets
- __tests__
- stories
- test/utils
25 files changed
+676
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments