Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(index): add multi-index widget #745

Merged
merged 19 commits into from
Jan 10, 2020
Merged

feat(index): add multi-index widget #745

merged 19 commits into from
Jan 10, 2020

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Nov 7, 2019

This new widget <ais-index> allows you to search through multiple indices at once, without manually needing to keep parameters in sync.

BREAKING CHANGE: this introduces the dependency on InstantSearch v4, which has its own breaking changes, you might see if you're using methods on helper. See more here: https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/#upgrade-from-v3-to-v4

src/components/Index.js Show resolved Hide resolved
src/mixins/widget.js Outdated Show resolved Hide resolved
src/mixins/widget.js Outdated Show resolved Hide resolved
stories/Autocomplete.stories.js Show resolved Hide resolved
@Haroenv Haroenv force-pushed the feat/index-widget branch 4 times, most recently from 1eefc8a to cf5dbf5 Compare November 20, 2019 11:35
BREAKING CHANGE: see migration guide, changes are mostly related to helper usage

chore(bundlesize): update for ISv4
BREAKING CHANGE: replace the index prop by additional `ais-index` widgets as sibling
test(widgetMixin): allow for multi-index
test(index): add basic tests

fix: move to $ais_ for provides

docs: add index widget stories

chore: correct previous commit
@Haroenv Haroenv requested a review from a team November 20, 2019 14:26
@ghost ghost requested review from tkrugg and yannickcr and removed request for a team November 20, 2019 14:26
package.json Outdated Show resolved Hide resolved
src/components/Index.js Show resolved Hide resolved
src/components/Index.js Outdated Show resolved Hide resolved
src/components/Index.js Outdated Show resolved Hide resolved
@eunjae-lee eunjae-lee self-requested a review November 29, 2019 09:59
@Haroenv Haroenv removed the request for review from tkrugg November 29, 2019 13:42
@Haroenv
Copy link
Contributor Author

Haroenv commented Nov 29, 2019

I don't understand why the e2e tests fail still :( @yannickcr

@yannickcr
Copy link
Contributor

@Haroenv Seems that there is an issue with the router.
In https://app.saucelabs.com/tests/79198096cecc4c0087e8cc09d942705f the parameters from the URLs are not applied to the widgets.
And in https://app.saucelabs.com/tests/7ba577349b0d462eb1366cd5bf11ace9 the URL is not updated when navigating in categories/pages.

@Haroenv
Copy link
Contributor Author

Haroenv commented Nov 29, 2019

hmm, that's weird since Vue InstantSearch isn't doing anything special with the routing there that InstantSearch wouldn't also have

Copy link
Member

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we'd really benefit from changing our test stack. The tests are really hard to understand, and we never use the components like we do when using the library.

src/mixins/widget.js Outdated Show resolved Hide resolved
@eunjae-lee
Copy link
Contributor

This seems good to me. Is there any part of the code you want us to look deeply? Or anything to test out?

Copy link
Contributor

@yannickcr yannickcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small question but beside that LGTM.

But I find the tests really unreadable (too many mocks and checks on internals IMHO). Like @francoischalifour I think we should change the way we tests our components.

PS: I see that the e2e tests are still failing, did you find the issue about it?

src/mixins/widget.js Outdated Show resolved Hide resolved
stories/Autocomplete.stories.js Show resolved Hide resolved
Copy link
Member

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try running the e-commerce demo with this version?

We should probably change the base branch to a next branch.

src/components/Index.js Outdated Show resolved Hide resolved
src/components/__tests__/Index-integration.js Outdated Show resolved Hide resolved
src/components/__tests__/Index-integration.js Outdated Show resolved Hide resolved
src/components/__tests__/InstantSearch-integration.js Outdated Show resolved Hide resolved
@Haroenv Haroenv changed the base branch from master to next January 9, 2020 13:50
Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

src/components/__tests__/Index-integration.js Outdated Show resolved Hide resolved
stories/Index.stories.js Outdated Show resolved Hide resolved
Co-Authored-By: François Chalifour <francoischalifour@users.noreply.github.com>
@Haroenv Haroenv merged commit 3c32cfe into next Jan 10, 2020
@Haroenv Haroenv deleted the feat/index-widget branch March 5, 2020 08:19
Haroenv added a commit to algolia/instantsearch that referenced this pull request Dec 28, 2022
This new widget <ais-index> allows you to search through multiple indices at once, without manually needing to keep parameters in sync.

BREAKING CHANGE: this introduces the dependency on InstantSearch v4, which has its own breaking changes, you might see if you're using methods on helper. See more here: https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/#upgrade-from-v3-to-v4
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants