Commit 75b2ca3
authored
feat(routing): provide a mechanism to synchronize the search (#2829)
* chore(serve): fix serve cmd with webpack config
* fix(refinementList): wrong error message with wrong parameters
* refactor(url-sync): remove unused code
* feat(url-sync-2): add an experimental history handler
* feat: support for new history handler in ref. list and searchbox
* chore: cleanup dead code
* feat(modern-history): add configurable debounce
* chore(modern-history): make title update
* feat(hierarchicalMenu): makes the connector syncable
* feat(modern-history): methods to make customization easier
* feat(pagination): add support for URLSync2
* chore(refactoring): renaming based after review
* chore(refactor): update methods to final API
* chore: do not uglify in dev + better banner
* chore: fix naming refactoring
* feat: pagination starts at 1
* feat: support hitsPerPage
* feat: support for menu
* fix: ui state create for menu
* chore: fix doc
* feat: support for numericRefinementList
* chore: do not encode by default
* feat: support for numericSelector
* feat(routing): add support for priceRanges
* feat(routing): support for range-*
* fix(routing): prevent override in refinementList
* feat(routing): support for sort-by
* refactoring: make inner methode use searchparameters
And fix test accordingly.
* feat(routing): support for starRating
* feat(routing): refinementlist support of conjunctive facets
* fix(routing): prevent from breaking other widget routing feat
* fix(connectMenu): do not add entry in view state when not used
* feat(routing): add support for toggle widget
* feat(routing): tests for hierarchical menu and hitsperpage connectors
* feat(routing): add test for connectMenu
* feat(routing): add tests for connectNumericRefinementList
* chore: prettierify
* feat(routing): support for numericSelector
* feat(routing): support for pagination
* fix(routing): should enforce the default value
* feat(routing): support for priceRanges
* feat: tests for connnectRange and connectPriceRanges
* chore: formating
* chore(connectRefinementList): refactor test
* feat(routing): add tests connectRefinementList (and fix behavior)
* feat(routing): add tests for searchbox
* feat(routing): add tests for sortBy
* feat(routing): add tests for star rating
* feat(routing): add tests for toggle
* chore: prettier
* fix: move router -> routers, stateMapping -> stateMappings
And also the namespace when using InstantSearch without a package
manager is routers not routing
* chore: rename writeTimeout => writeDelay
* chore: rename titleFromUIState into windowTitle
* fix(routing): history routers should be robust by default
* fix(connectSortBySelector): correct behavior of default index
Previously the index name used as the default was the one at the init.
However this one is the one from the URL if provided. We should rely on
the one provided on the instance of InstantSearch.
For this purpose, I had to provide also an instance of InstantSearch in
the test.
* fix(connectToggle): was reseting the page
This widget uses the Helper in order to modify the current value of the
facet at init. This resets the page to 0. Now it stores the currrent
page before and reapply it after.
* fix(routing): hierarchicalMenu.getWidgetState should keep other entries
* chore: add some comments to the tests
* chore: prettier
* fix(rangeSlider): handles were blocked (#2849)
This was because rheostat (our preact version) was using incompatible
versions from ours (preact and preact-compat).
This PR makes sure that we are using the same exact version as the min.
for rhoestat in order to end up with the same dependencies when resolving
the dependencies.
* v2.6.3
<a name=2.6.3></a>
## [2.6.3](v2.6.2...v2.6.3) (2018-03-30)
### Bug Fixes
* **rangeSlider:** handles were blocked ([#2849](#2849)) ([a2af4f0](a2af4f0))
* chore(doc): better error message for @type wrong def
* chore(doc): Give more context for "undefined type" warning
* chore(doc): fix doc
* chore(test): use real helper when necessary
All tests should be updated to follow this pattern eventually.
* chore: add yarn-error.log to .gitignore
* v2.7.0-beta.0
<a name=2.7.0-beta.0></a>
# [2.7.0-beta.0](v2.6.3...v2.7.0-beta.0) (2018-04-01)
### Bug Fixes
* **connectMenu:** do not add entry in view state when not used ([5f105b2](5f105b2))
* **connectSortBySelector:** correct behavior of default index ([a8fcec5](a8fcec5))
* **connectToggle:** was reseting the page ([89456e9](89456e9))
* **refinementList:** wrong error message with wrong parameters ([3b251ee](3b251ee))
* **routing:** hierarchicalMenu.getWidgetState should keep other entries ([7ef34e3](7ef34e3))
* **routing:** history routers should be robust by default ([8ad84b1](8ad84b1))
* **routing:** prevent from breaking other widget routing feat ([9a8e0f2](9a8e0f2))
* **routing:** prevent override in refinementList ([46ac948](46ac948))
* **routing:** should enforce the default value ([693401a](693401a))
* move router -> routers, stateMapping -> stateMappings ([e0aec47](e0aec47))
* ui state create for menu ([6236e59](6236e59))
### Features
* **hierarchicalMenu:** makes the connector syncable ([6dd3a33](6dd3a33))
* **modern-history:** add configurable debounce ([01aa150](01aa150))
* **modern-history:** methods to make customization easier ([3cb8b1f](3cb8b1f))
* **pagination:** add support for URLSync2 ([3f8f030](3f8f030))
* **routing:** add support for priceRanges ([70134eb](70134eb))
* **routing:** add support for toggle widget ([ca0ba8c](ca0ba8c))
* **routing:** add test for connectMenu ([046c85d](046c85d))
* **routing:** add tests connectRefinementList (and fix behavior) ([b6b6553](b6b6553))
* **routing:** add tests for connectNumericRefinementList ([e84e49b](e84e49b))
* **routing:** add tests for searchbox ([831d507](831d507))
* **routing:** add tests for sortBy ([2cbbe20](2cbbe20))
* **routing:** add tests for star rating ([a315c27](a315c27))
* **routing:** add tests for toggle ([2e43ac7](2e43ac7))
* **routing:** refinementlist support of conjunctive facets ([1a2a6fa](1a2a6fa))
* **routing:** support for numericSelector ([259eaab](259eaab))
* **routing:** support for pagination ([12ad719](12ad719))
* **routing:** support for priceRanges ([3d72729](3d72729))
* **routing:** support for range-* ([84961b4](84961b4))
* **routing:** support for sort-by ([15f7337](15f7337))
* **routing:** support for starRating ([bc7903e](bc7903e))
* **routing:** tests for hierarchical menu and hitsperpage connectors ([de54f9a](de54f9a))
* **url-sync-2:** add an experimental history handler ([28976c7](28976c7))
* pagination starts at 1 ([c068c75](c068c75))
* support for menu ([8270386](8270386))
* support for new history handler in ref. list and searchbox ([c7867ff](c7867ff))
* support for numericRefinementList ([6634997](6634997))
* support for numericSelector ([887f889](887f889))
* support hitsPerPage ([7b9e567](7b9e567))
* tests for connnectRange and connectPriceRanges ([03d0f3a](03d0f3a))
* fix: default routing options should be instanciated
* fix: simple state mapping doesn't take parameters
* v2.7.0-beta.1
<a name=2.7.0-beta.1></a>
# [2.7.0-beta.1](v2.6.3...v2.7.0-beta.1) (2018-04-01)
### Bug Fixes
* **connectMenu:** do not add entry in view state when not used ([5f105b2](5f105b2))
* **connectSortBySelector:** correct behavior of default index ([a8fcec5](a8fcec5))
* **connectToggle:** was reseting the page ([89456e9](89456e9))
* move router -> routers, stateMapping -> stateMappings ([e0aec47](e0aec47))
* **refinementList:** wrong error message with wrong parameters ([3b251ee](3b251ee))
* **routing:** hierarchicalMenu.getWidgetState should keep other entries ([7ef34e3](7ef34e3))
* default routing options should be instanciated ([34b089e](34b089e))
* simple state mapping doesn't take parameters ([6517f27](6517f27))
* ui state create for menu ([6236e59](6236e59))
* **routing:** history routers should be robust by default ([8ad84b1](8ad84b1))
* **routing:** prevent from breaking other widget routing feat ([9a8e0f2](9a8e0f2))
* **routing:** prevent override in refinementList ([46ac948](46ac948))
* **routing:** should enforce the default value ([693401a](693401a))
### Features
* **hierarchicalMenu:** makes the connector syncable ([6dd3a33](6dd3a33))
* **modern-history:** add configurable debounce ([01aa150](01aa150))
* **modern-history:** methods to make customization easier ([3cb8b1f](3cb8b1f))
* **pagination:** add support for URLSync2 ([3f8f030](3f8f030))
* **routing:** add support for priceRanges ([70134eb](70134eb))
* **routing:** add support for toggle widget ([ca0ba8c](ca0ba8c))
* **routing:** add test for connectMenu ([046c85d](046c85d))
* **routing:** add tests connectRefinementList (and fix behavior) ([b6b6553](b6b6553))
* **routing:** add tests for connectNumericRefinementList ([e84e49b](e84e49b))
* **routing:** add tests for searchbox ([831d507](831d507))
* **routing:** add tests for sortBy ([2cbbe20](2cbbe20))
* **routing:** add tests for star rating ([a315c27](a315c27))
* **routing:** add tests for toggle ([2e43ac7](2e43ac7))
* **routing:** refinementlist support of conjunctive facets ([1a2a6fa](1a2a6fa))
* **routing:** support for numericSelector ([259eaab](259eaab))
* **routing:** support for pagination ([12ad719](12ad719))
* **routing:** support for priceRanges ([3d72729](3d72729))
* **routing:** support for range-* ([84961b4](84961b4))
* **routing:** support for sort-by ([15f7337](15f7337))
* **routing:** support for starRating ([bc7903e](bc7903e))
* **routing:** tests for hierarchical menu and hitsperpage connectors ([de54f9a](de54f9a))
* **url-sync-2:** add an experimental history handler ([28976c7](28976c7))
* pagination starts at 1 ([c068c75](c068c75))
* support for menu ([8270386](8270386))
* support for new history handler in ref. list and searchbox ([c7867ff](c7867ff))
* support for numericRefinementList ([6634997](6634997))
* support for numericSelector ([887f889](887f889))
* support hitsPerPage ([7b9e567](7b9e567))
* tests for connnectRange and connectPriceRanges ([03d0f3a](03d0f3a))
* fix(test): also test for beta versions
* fix: using urlsync and router should trigger an error
* chore(docs): add jsdoc for the router on InstantSearch.js
* chore: refactor API names + test of RoutingManager
* chore: better import of helper in tests
* chore: remove useless else branch
* refactor(priceRanges): return early and intentional code
* fix(priceRanges): widen test spectrum for other range of values
* refactor(connectRange): make code more intentional
Also add more test.
* v2.7.0-beta.2
<a name=2.7.0-beta.2></a>
# [2.7.0-beta.2](v2.6.3...v2.7.0-beta.2) (2018-04-07)
### Bug Fixes
* **connectMenu:** do not add entry in view state when not used ([5f105b2](5f105b2))
* **connectSortBySelector:** correct behavior of default index ([a8fcec5](a8fcec5))
* **connectToggle:** was reseting the page ([89456e9](89456e9))
* **priceRanges:** widen test spectrum for other range of values ([caaca8c](caaca8c))
* **refinementList:** wrong error message with wrong parameters ([3b251ee](3b251ee))
* **routing:** hierarchicalMenu.getWidgetState should keep other entries ([7ef34e3](7ef34e3))
* **routing:** history routers should be robust by default ([8ad84b1](8ad84b1))
* **routing:** prevent from breaking other widget routing feat ([9a8e0f2](9a8e0f2))
* **routing:** prevent override in refinementList ([46ac948](46ac948))
* **routing:** should enforce the default value ([693401a](693401a))
* **test:** also test for beta versions ([33f2dfb](33f2dfb))
* default routing options should be instanciated ([34b089e](34b089e))
* move router -> routers, stateMapping -> stateMappings ([e0aec47](e0aec47))
* simple state mapping doesn't take parameters ([6517f27](6517f27))
* ui state create for menu ([6236e59](6236e59))
* using urlsync and router should trigger an error ([9e0bc57](9e0bc57))
### Features
* **hierarchicalMenu:** makes the connector syncable ([6dd3a33](6dd3a33))
* **modern-history:** add configurable debounce ([01aa150](01aa150))
* **modern-history:** methods to make customization easier ([3cb8b1f](3cb8b1f))
* **pagination:** add support for URLSync2 ([3f8f030](3f8f030))
* **routing:** add support for priceRanges ([70134eb](70134eb))
* **routing:** add support for toggle widget ([ca0ba8c](ca0ba8c))
* **routing:** add test for connectMenu ([046c85d](046c85d))
* **routing:** add tests connectRefinementList (and fix behavior) ([b6b6553](b6b6553))
* **routing:** add tests for connectNumericRefinementList ([e84e49b](e84e49b))
* **routing:** add tests for searchbox ([831d507](831d507))
* **routing:** add tests for sortBy ([2cbbe20](2cbbe20))
* **routing:** add tests for star rating ([a315c27](a315c27))
* **routing:** add tests for toggle ([2e43ac7](2e43ac7))
* **routing:** refinementlist support of conjunctive facets ([1a2a6fa](1a2a6fa))
* **routing:** support for numericSelector ([259eaab](259eaab))
* **routing:** support for pagination ([12ad719](12ad719))
* **routing:** support for priceRanges ([3d72729](3d72729))
* **routing:** support for range-* ([84961b4](84961b4))
* **routing:** support for sort-by ([15f7337](15f7337))
* **routing:** support for starRating ([bc7903e](bc7903e))
* **routing:** tests for hierarchical menu and hitsperpage connectors ([de54f9a](de54f9a))
* **url-sync-2:** add an experimental history handler ([28976c7](28976c7))
* pagination starts at 1 ([c068c75](c068c75))
* support for menu ([8270386](8270386))
* support for new history handler in ref. list and searchbox ([c7867ff](c7867ff))
* support for numericRefinementList ([6634997](6634997))
* support for numericSelector ([887f889](887f889))
* support hitsPerPage ([7b9e567](7b9e567))
* tests for connnectRange and connectPriceRanges ([03d0f3a](03d0f3a))
* fix(priceRanges): partial update from URL should not drop values
* fix(range): partial update from URL should not drop values
* chore(RoutingManager-test): use native done in tests
* fix(connectRange): use lodash isFinite
* refactor(connectNumericRefinementList): show intent and return sooner
for getWidgetSearchParameters.
* chore(connectNumericRefinementList): add tests for equality1 parent 8fdf752 commit 75b2ca3
File tree
62 files changed
+5274
-184
lines changed- docgen/plugins
- scripts
- src
- connectors
- hits-per-page
- __tests__
- __snapshots__
- numeric-refinement-list
- __tests__
- __snapshots__
- numeric-selector
- __tests__
- __snapshots__
- pagination
- __tests__
- __snapshots__
- price-ranges
- __tests__
- __snapshots__
- range
- __tests__
- __snapshots__
- refinement-list
- __tests__
- __snapshots__
- search-box
- __tests__
- __snapshots__
- sort-by-selector
- __tests__
- __snapshots__
- star-rating
- __tests__
- __snapshots__
- toggle
- __tests__
- __snapshots__
- lib
- __tests__
- routers
- stateMappings
- widgets
- refinement-list
- sort-by-selector/__tests__
- star-rating/__tests__
- toggle/__tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
62 files changed
+5274
-184
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
1 | 11 | | |
2 | 12 | | |
3 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| |||
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
209 | | - | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
138 | | - | |
| 138 | + | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 96 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
Lines changed: 120 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
258 | 378 | | |
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
216 | 253 | | |
217 | 254 | | |
218 | 255 | | |
0 commit comments