Skip to content

Refactor search to use object #796

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

Merged
merged 2 commits into from
Dec 29, 2021
Merged

Refactor search to use object #796

merged 2 commits into from
Dec 29, 2021

Conversation

joedixon
Copy link
Contributor

This pull request resolves #787

To fix the search , I refactored the Alpine component to use an object to handle state which brings it more in line with other components such as the editor.

Doing this allowed me to fix a couple of bugs introduced since the upgrade to Alpine v3 and will make it easier to maintain moving forward.

Some queries have hundreds or thousands of matching results, but we only ever ask for the 5 most relevant so our dropdown menu doesn't get too large. As part of this PR, I am outputting the actual total number of matching results as opposed to just the total we are actually asking for.

Screenshot 2021-12-28 at 11 11 08

@driesvints driesvints merged commit d8ade21 into main Dec 29, 2021
@driesvints
Copy link
Member

Amazing, thanks @joedixon!

@driesvints driesvints deleted the fix-search branch December 29, 2021 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Article search broken
2 participants