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

implement real time suggestion #292

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Rajgupta36
Copy link
Collaborator

@Rajgupta36 Rajgupta36 commented Dec 28, 2024

Resolves #148

Implemented real-time suggestions using the autocomplete.js library provided by Algolia.

  • Created a SearchBar component
  • Added search logic
  • Set up a query suggestion index
  • Implemented custom loading for the search bar
  • Enhanced query handling for better suggestions
  • Fixes test cases

Preview

Screen.Recording.2024-12-29.165757.mp4

@Rajgupta36 Rajgupta36 marked this pull request as ready for review December 30, 2024 16:54
@kasya
Copy link
Collaborator

kasya commented Dec 30, 2024

@Rajgupta36 Thank you for working on this! Could you please resolve existing conflicts before we review this one? Thanks!

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

It seems we can create suggestions index programmatically.

frontend/package.json Outdated Show resolved Hide resolved
frontend/src/components/Search.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

I also noticed multiple loading indicators upon data loading 🤷‍♂️

@Rajgupta36
Copy link
Collaborator Author

Rajgupta36 commented Dec 31, 2024

I also noticed multiple loading indicators upon data loading 🤷‍♂️

yeah it's only when our component load first time . i have fixed it

@Rajgupta36 Rajgupta36 requested a review from arkid15r December 31, 2024 10:19
Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

It seems we can create suggestions index programmatically.

So what about the index settings, do we need to update them manually?

@@ -18,6 +18,7 @@ beforeEach(() => {
})
})
jest.mock('@algolia/autocomplete-theme-classic', () => ({}))
import React from 'react'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it need to be here? Can we group the imports?

Copy link
Collaborator Author

@Rajgupta36 Rajgupta36 Dec 31, 2024

Choose a reason for hiding this comment

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

i am trying

@Rajgupta36
Copy link
Collaborator Author

Rajgupta36 commented Dec 31, 2024

We need new indexes for query suggestions. we can add facet values programmatically. I think we can create query suggestion indexes for a single user and then update it, just like we used to update the local_issues and other indexes via make load-data or make index-data command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Real-time Search Suggestion Feature for Project Search Engine
3 participants