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

Reactive search for libraries on website #93

Open
richbowen opened this issue Feb 26, 2017 · 5 comments
Open

Reactive search for libraries on website #93

richbowen opened this issue Feb 26, 2017 · 5 comments
Labels
Milestone

Comments

@richbowen
Copy link

richbowen commented Feb 26, 2017

When searching for a library from the search bar, filter results real-time in the same view, as the user types ( eg. If the user types the search term 'gpl' they see all 'gpl/lgpl' libraries, 'windows' => all windows compatible libraries etc.). Being that all package data is in JSON, manipulating it for this purpose should be very doable. Vue comes to mind for implementing the reactive search feature without any bells and whistles (Heres an example of 'reactive search' using vue).

Advantages:

  • One less view to render as only the main view is being used to display search results (no Alt-Left arrow to go back to list of libraries page).
  • Makes search fun, easier to use and more intuitive.
  • Provides a custom search for Inqlude without having to rely on external services like Google Custom Search.
@richbowen richbowen changed the title Reactive search on website Reactive search for packages on website Feb 26, 2017
@richbowen richbowen changed the title Reactive search for packages on website Reactive search for libraries on website Feb 26, 2017
@cornelius
Copy link
Owner

This sounds like a good idea. Maybe somebody finds some time to implement it. The relevant code is in the view template for the two column layout.

@cornelius
Copy link
Owner

We currently use Google Site Search. This will be shut down by April 1 2018 so we need to find an alternative like the one mentioned above.

Another alternative might be https://github.com/cebe/js-search

@cornelius cornelius added High Priority Web Site Inqlude web site labels Dec 29, 2017
@cornelius cornelius added this to the 0.12 milestone Dec 29, 2017
@richbowen
Copy link
Author

richbowen commented Dec 29, 2017

Cool. Not sure if you realized but js-search relies on PHP to generate the search index.

Here are a few libraries I've come across:

I'll do some more research and update this accordingly.

@cornelius
Copy link
Owner

Using PHP to create the index might be ok as long as it's not required at runtime. I would like to keep the web site static HTML to avoid any trouble with server-side components, but for the toolchain to generate the site I would be open to use the tools which do the job best even if that means another dependency.

@cornelius
Copy link
Owner

Fuzzysort and Lunr look interesting. Thanks for looking into this. I would try to avoid a non free software solution if there is a decent alternative.

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

No branches or pull requests

2 participants