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

feat(answers): add EXPERIMENTAL_answers widget #4581

Merged
merged 91 commits into from
Feb 26, 2021
Merged

Conversation

eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented Nov 17, 2020

Summary

This PR adds answers widget.

TODO

  • Fix type errors
  • Test highlighting
  • Write tests
  • Put comments on the properties
  • Do we need a connector or not?
  • Fix type errors
  • Debounce
  • Concurrent-safe
  • The loader is flickering too much (probably can be solved by debouncing)
  • Remove stories/algoliasearch.umd.js

Next

In the subsequent PR

  • Applying findAnswers from helper
  • Applying facets
  • Use index name from parent index widget
  • loading state ('idle' | 'loading' | 'stalled')

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 17, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 38bfec1:

Sandbox Source
InstantSearch.js Configuration
InstantSearch.js (forked) PR

Base automatically changed from feat/render-state to master November 30, 2020 14:05
@eunjae-lee eunjae-lee marked this pull request as ready for review December 1, 2020 10:48
@eunjae-lee
Copy link
Contributor Author

I see the type errors regarding highlight, which I think is coming from algoliasearch package.

I need to apply facets to /answers call but don't know how to get search parameter. If I understand correctly, first I need to find which index this answers widget belongs to, and call theIndex.getWidgetSearchParameter(...). Is it correct?

@eunjae-lee eunjae-lee requested a review from a team December 1, 2020 10:49
@ghost ghost requested review from Haroenv and shortcuts and removed request for a team December 1, 2020 10:49
@Haroenv
Copy link
Contributor

Haroenv commented Dec 1, 2020

I see the type errors regarding highlight, which I think is coming from algoliasearch package.

I fixed these in #4587, either we merge that quickly or split it up

@eunjae-lee
Copy link
Contributor Author

I fixed these in #4587, either we merge that quickly or split it up

Oh nice. I can wait for its merge :)

src/connectors/answers/connectAnswers.ts Show resolved Hide resolved
src/lib/utils/createConcurrentSafePromise.ts Outdated Show resolved Hide resolved
src/types/algoliasearch.ts Outdated Show resolved Hide resolved
src/types/algoliasearch.ts Outdated Show resolved Hide resolved
src/connectors/answers/connectAnswers.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants