Haroenv Github contribution chart
Haroenv Github Stats
Haroenv Most Used Languages

Activity

29 Sep 2022

Haroenv

Built from commit ab9dffdcde3fe2dbf4d734afab4a2314e1dc5562

Pushed On 29 Sep 2022 at 10:54:48

Haroenv

started

Started On 29 Sep 2022 at 05:28:30

Haroenv

feat(hierarchical-menu): add selected class modifier for selected menu item link

This PR adds a --selected class modifier to the link of a refined hierarchical menu item, that allows users to apply styles on the link only, and not the whole container (including sublevel items if they exist).

Before | After ------- | ----- .ais-HierarchicalMenu-item--selected { font-weight: bold } | .ais-HierarchicalMenu-link--selected { font-weight: bold } |

Note This PR does not change the already existing CSS for the link of a refined menu item.

FX-1736

Merged On 29 Sep 2022 at 03:26:21

Haroenv

Commented On 29 Sep 2022 at 03:26:21
Issue Comment

Haroenv

feat(hierarchical-menu): add selected class modifier for selected menu item link

This PR adds a --selected class modifier to the link of a refined hierarchical menu item, that allows users to apply styles on the link only, and not the whole container (including sublevel items if they exist).

Before | After ------- | ----- .ais-HierarchicalMenu-item--selected { font-weight: bold } | .ais-HierarchicalMenu-link--selected { font-weight: bold } |

Note This PR does not change the already existing CSS for the link of a refined menu item.

FX-1736

Forked On 29 Sep 2022 at 03:26:15

Haroenv

in theory you can already style it with .ais-HierarchicalMenu-item--selected > a, but that's indeed not nice

Commented On 29 Sep 2022 at 03:26:15

Haroenv

wip: no longer process dispose search parameters

we have ui state and widgets reading this ui state. This means that when you dispose a widget, you don't need to call that function if you start with a clean helper state instead of persisting the state.

This needs to be done in a major version, as people might rely on state without ui state (i'm not sure if they do) and that would be removed if they dispose a widget.

This allows again for classic react-instantsearch-core style virtual widgets for the modal and dynamic widget use case

Forked On 29 Sep 2022 at 02:40:34

Haroenv

this part here is to ensure that "statically set parameters" on `mainHelper` persist (parameters on `helper` don't, as that actually is the helper of the mainIndex, confusing naming, I know). If we're doing such a refactor, we probably should simply get rid of `helper`, and replace it with `mainHelper` only (which then gets name swapped)
On 29 Sep 2022 at 02:40:34

Haroenv

wip: no longer process dispose search parameters

we have ui state and widgets reading this ui state. This means that when you dispose a widget, you don't need to call that function if you start with a clean helper state instead of persisting the state.

This needs to be done in a major version, as people might rely on state without ui state (i'm not sure if they do) and that would be removed if they dispose a widget.

This allows again for classic react-instantsearch-core style virtual widgets for the modal and dynamic widget use case

Merged On 29 Sep 2022 at 02:40:35

Haroenv

Commented On 29 Sep 2022 at 02:40:35

Haroenv

wip: no longer process dispose search parameters

we have ui state and widgets reading this ui state. This means that when you dispose a widget, you don't need to call that function if you start with a clean helper state instead of persisting the state.

This needs to be done in a major version, as people might rely on state without ui state (i'm not sure if they do) and that would be removed if they dispose a widget.

This allows again for classic react-instantsearch-core style virtual widgets for the modal and dynamic widget use case

Merged On 29 Sep 2022 at 02:38:48

Haroenv

Commented On 29 Sep 2022 at 02:38:48

Haroenv

wip: no longer process dispose search parameters

we have ui state and widgets reading this ui state. This means that when you dispose a widget, you don't need to call that function if you start with a clean helper state instead of persisting the state.

This needs to be done in a major version, as people might rely on state without ui state (i'm not sure if they do) and that would be removed if they dispose a widget.

This allows again for classic react-instantsearch-core style virtual widgets for the modal and dynamic widget use case

Forked On 29 Sep 2022 at 02:38:48

Haroenv

if we're actually doing this, dispose should no longer accept helper, state, nor should it return search parameters, but I didn't do that in this PR out of simplicity.
On 29 Sep 2022 at 02:38:48

Haroenv

wip: no longer process dispose search parameters

Created On 29 Sep 2022 at 02:35:37
Create Branch
Haroenv In algolia/instantsearch.js Create Branchwip/dispose-is-gone

Haroenv

⚡️ A JavaScript library for building performant and instant search experiences with Algolia.

On 29 Sep 2022 at 02:35:28

Haroenv

feat(status): introduce status in InstantSearch class (#5115)

  • refactor(render): extract common function

commit extracted from #5115

  • remove stuff that's not yet done in this pr

  • not done yet in this pr

  • chore(ts): correct inference of defer

  • feat(status): introduce status in InstantSearch class

  • increase dev bundlesize (not so important)

Pushed On 29 Sep 2022 at 01:29:58

Haroenv

feat(status): introduce status in InstantSearch class

Created On 29 Sep 2022 at 01:29:58

Haroenv

refactor(render): extract common function (#5122)

  • refactor(render): extract common function

commit extracted from #5115

  • remove stuff that's not yet done in this pr

  • not done yet in this pr

Pushed On 29 Sep 2022 at 01:13:46

Haroenv

Merge branch 'master' into feat/status

Pushed On 29 Sep 2022 at 01:13:46

Haroenv

refactor(render): extract common function (#5122)

  • refactor(render): extract common function

commit extracted from #5115

  • remove stuff that's not yet done in this pr

  • not done yet in this pr

Pushed On 29 Sep 2022 at 01:13:06

Haroenv

refactor(render): extract common function

Created On 29 Sep 2022 at 01:13:05

Haroenv

fix(facetValues): use additional queries to retrieve refined facet values

Issue

When a refinement list is added to an InstantSearch application, its values are requested with the hits. By default, 10 values are requested per facet.

An option available in refinement lists allows the user to search and refine on specific facet values matching the search query. This creates an issue where sometimes, the refined facet value is not returned as part of the truncated list. For example, you might refine on "Zimbabwe" but the results will contain a list of 10 facet values that won't include it, and there is no way to ask the engine to sort facet values by refinement state at that stage.

The result is that once refined, a facet value disappears from the list, and can only be visible again if the user search for it in a searchable refinement list widget.

CodeSandbox →
(refine on "Partner/REI")

Solution

The solution I have devised adds additional queries to the search request, to get the maximum number of facet values allowed for each refined facet.

Then, when facet values are requested, we check that every refined facet value from the state is present in the updated list of facet values. If one isn't, its name and associated count is added from the additional query results.

This solution has a caveat though, when the refined facet value is not present in the additional query results, because the facet contains than 1000 values. In this case, we still add the facet value, but its associated count is set to 0.

FX-1682

Merged On 29 Sep 2022 at 01:02:07

Haroenv

on reflection, I don't think we should solve this issue by doing extra requests. What I have in mind is letting those customers know to put configure({maxValuesPerFacet: 1000}) (limit will still be respected) rather than doing an extra query altogether, as we don't know the performance implications.

I'm however a fan of trying to control which facets are returned more detailed with the engine in a separate project

Commented On 29 Sep 2022 at 01:02:07

Haroenv

chore: release v6.35.0 (#3643)

This pull request prepares the following release: | Repository | Branch | Update | Change | |---|---|---|---| | react-instantsearch | releases/v6.35.0 | minor | 6.34.06.35.0 |

Release Summary

This is going to be published with the following command:

| Dir | Command | |---|---| | packages/react-instantsearch-core | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch-dom-maps | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch-dom | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch-hooks | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch-hooks-web | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch-hooks-server | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch-native | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest | | packages/react-instantsearch | npm_config_registry=https://registry.npmjs.org/ npm publish --tag latest |

Merging Instructions

When merging this pull request, you need to Squash and merge and make sure that the title starts with chore: release v6.35.0.

After that, a commit chore: release v6.35.0 will be added and you or your CI can run shipjs trigger to trigger the release based on the commit. Squash and
merge


This pull request is automatically generated by Ship.js.

Co-authored-by: Haroen Viaene hello@haroen.me Co-authored-by: Sarah Dayan 5370675+sarahdayan@users.noreply.github.com

Pushed On 29 Sep 2022 at 12:36:00

Haroenv

chore: release v6.35.0

Created On 29 Sep 2022 at 12:35:59

Haroenv

feat(status): introduce status in InstantSearch class

Summary

Introduces the status key to InstantSearch instance and widget rendering. This is done as described in RFC#76.

Result

  • adds status to InstantSearch instance
  • adds error to InstantSearch instance
  • migrates searchMetadata and _isSearchStalled internals to use status === 'stalled'
  • deprecate searchMetadata and _isSearchStalled
  • refactor init and render args into a function (to ensure further they are consistent at every call)

One thing to note is that the error is readable from search.on('render'), but not from widgets, as render can only be called with results, and an error state doesn't necessarily have errors.

FX-1711

Forked On 29 Sep 2022 at 12:30:43

Haroenv

oh and the behaviour if you don't pass the parameter hasn't changed, as it defaults to the same behaviour as before
On 29 Sep 2022 at 12:30:43

Haroenv

feat(status): introduce status in InstantSearch class

Summary

Introduces the status key to InstantSearch instance and widget rendering. This is done as described in RFC#76.

Result

  • adds status to InstantSearch instance
  • adds error to InstantSearch instance
  • migrates searchMetadata and _isSearchStalled internals to use status === 'stalled'
  • deprecate searchMetadata and _isSearchStalled
  • refactor init and render args into a function (to ensure further they are consistent at every call)

One thing to note is that the error is readable from search.on('render'), but not from widgets, as render can only be called with results, and an error state doesn't necessarily have errors.

FX-1711

Merged On 29 Sep 2022 at 12:30:44

Haroenv

Commented On 29 Sep 2022 at 12:30:44

Haroenv

chore(ts): correct inference of defer

Pushed On 29 Sep 2022 at 12:23:57

Haroenv

feat(status): introduce status in InstantSearch class

Pushed On 29 Sep 2022 at 12:23:57

Haroenv

increase dev bundlesize (not so important)

Pushed On 29 Sep 2022 at 12:23:57

Haroenv

not done yet in this pr

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

feat(status): introduce status in InstantSearch class

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

mock

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

remove _isSearchStalled on root

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

increase dev bundlesize (not so important)

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

add status & error to render args

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

re-add _isSearchStalled (because you never know, no breaking change accidentally)

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

rename exported type

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

fix tests of index (status asserted from instantsearch)

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

assert status in existing tests

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

loading should happen in search, not scheduleSearch

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

tests for status (wip: error)

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

tests for error

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

code to avoid resetting error

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

chore(ts): correct inference of defer

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

Apply suggestions from code review

Co-authored-by: Sarah Dayan 5370675+sarahdayan@users.noreply.github.com

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

rename test

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

really render if you want

Pushed On 29 Sep 2022 at 12:18:20

Haroenv

not done yet in this pr

Pushed On 29 Sep 2022 at 12:17:15

Haroenv

feat(status): introduce status in InstantSearch class

Summary

Introduces the status key to InstantSearch instance and widget rendering. This is done as described in RFC#76.

Result

  • adds status to InstantSearch instance
  • adds error to InstantSearch instance
  • migrates searchMetadata and _isSearchStalled internals to use status === 'stalled'
  • deprecate searchMetadata and _isSearchStalled
  • refactor init and render args into a function (to ensure further they are consistent at every call)

One thing to note is that the error is readable from search.on('render'), but not from widgets, as render can only be called with results, and an error state doesn't necessarily have errors.

FX-1711

Forked On 29 Sep 2022 at 12:15:33

Haroenv

https://github.com/algolia/instantsearch.js/pull/5122/files
On 29 Sep 2022 at 12:15:33

Haroenv

feat(status): introduce status in InstantSearch class

Summary

Introduces the status key to InstantSearch instance and widget rendering. This is done as described in RFC#76.

Result

  • adds status to InstantSearch instance
  • adds error to InstantSearch instance
  • migrates searchMetadata and _isSearchStalled internals to use status === 'stalled'
  • deprecate searchMetadata and _isSearchStalled
  • refactor init and render args into a function (to ensure further they are consistent at every call)

One thing to note is that the error is readable from search.on('render'), but not from widgets, as render can only be called with results, and an error state doesn't necessarily have errors.

FX-1711

Merged On 29 Sep 2022 at 12:15:34

Haroenv

Commented On 29 Sep 2022 at 12:15:34

Haroenv

refactor(render): extract common function

commit extracted from #5115

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

remove stuff that's not yet done in this pr

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

feat(status): introduce status in InstantSearch class

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

mock

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

remove _isSearchStalled on root

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

increase dev bundlesize (not so important)

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

add status & error to render args

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

re-add _isSearchStalled (because you never know, no breaking change accidentally)

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

rename exported type

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

fix tests of index (status asserted from instantsearch)

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

assert status in existing tests

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

loading should happen in search, not scheduleSearch

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

tests for status (wip: error)

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

tests for error

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

code to avoid resetting error

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

chore(ts): correct inference of defer

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

Apply suggestions from code review

Co-authored-by: Sarah Dayan 5370675+sarahdayan@users.noreply.github.com

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

rename test

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

really render if you want

Pushed On 29 Sep 2022 at 12:14:18

Haroenv

remove stuff that's not yet done in this pr

Pushed On 29 Sep 2022 at 12:08:48