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: Added post search suggestion when search on searchbar successfully issue 586 #591

Merged
merged 4 commits into from
Aug 10, 2024

Conversation

MeetDOD
Copy link
Contributor

@MeetDOD MeetDOD commented Aug 9, 2024

Pull Request Resolves [ #586 ]

Title: Added post search suggestion when search on searchbar successfully.

Description

  1. In backend, I created the route and controller for getting searchQuery and suggest to user.
  2. In frontend, I am fetching the api in the usePosts and then calling the function in the Posts component.
  3. While writing on the search bar with the help of ul the user can see the dropdown and click on any it will see that posts.
  4. The design is responive and work in both light/dark mode respectively.

Related Issues

Fixes #586

Changes Made

New feature: Added post search suggestion when search on searchbar.

Screenshots

image

Video

Style.Share._.Our.Posts.-.Google.Chrome.2024-08-10.01-58-53.online-video-cutter.com.mp4

I certify that I have carried out the relevant code of conduct and provided the requisite screenshot for validation by submitting this pull request.

Thank You for this contribution.

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
style-share ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 10, 2024 9:36am

Copy link

github-actions bot commented Aug 9, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 9, 2024

@VaibhavArora314 Please give level 3 if possibe after evaluation due to frontend + backend integration 👍

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

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

Currently, a request is sent for every letter typed or removed from the search input. Maybe you can use a setTimeout to call the API after like 300ms and if the user changes something in the search query within those 300ms, then you can clear the previous timeout and set a new timeout for the API call after 300ms. This process of clearing timeout will keep on going on until the user stops changing the search query and then results will be shown.

@VaibhavArora314
Copy link
Owner

If it's too much then tell me here, I will merge it under level 2.

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 10, 2024

Currently, a request is sent for every letter typed or removed from the search input. Maybe you can use a setTimeout to call the API after like 300ms and if the user changes something in the search query within those 300ms, then you can clear the previous timeout and set a new timeout for the API call after 300ms. This process of clearing timeout will keep on going on until the user stops changing the search query and then results will be shown.

Nice optimal solution, I am doing it @VaibhavArora314 👍

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 10, 2024

@VaibhavArora314 Done with the changes as requested 💯

Copy link
Owner

@VaibhavArora314 VaibhavArora314 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, just one minor change
when no suggestions available don't show this empty box
image

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 10, 2024

Looks Good, just one minor change when no suggestions available don't show this empty box image

Noted 👍

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 10, 2024

@VaibhavArora314 Done 💯

@VaibhavArora314
Copy link
Owner

Comment axios default baseurl logic

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 10, 2024

Opps, In hurry I totally forgot about that, my bad :

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Aug 10, 2024

@VaibhavArora314 please merge my PRS only 2 hours is remaining Thank YOU 👍

@VaibhavArora314
Copy link
Owner

@akbatra567 kindly review and merge this as soon as possible

@akbatra567 akbatra567 merged commit f59a147 into VaibhavArora314:main Aug 10, 2024
3 checks passed
Copy link

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

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

Successfully merging this pull request may close these issues.

[Feature Request]: 🔎 Implement Autocomplete Suggestions in Search Bar
3 participants