astropy / learn-astropy

The Learn Astropy homepage
https://learn.astropy.org
BSD 3-Clause "New" or "Revised" License
13 stars 11 forks source link

Implement search UI #25

Closed jonathansick closed 3 years ago

jonathansick commented 3 years ago

This PR implements a search UI with Algolia instantsearch.

This work is built around the concept that content and search results should be shown directly on the homepage rather than in per-category listing pages. To do this I've pared down the UI so we don't have the category cards and large search box on the homepage.

This replaces #22 which was built around the idea of per-category result pages.

A demo of the design is available at https://astropy-search-demo.jsick.dev/

jonathansick commented 3 years ago

This should be merged after #24

jonathansick commented 3 years ago

@adrn There's still more to do but this is 80% of it, and it might be easier to make smaller improvements in individual PRs after this.

adrn commented 3 years ago

Awesome!! I'll take a look over the next few days.

eblur commented 3 years ago

This looks good to me! I like that each card has a "Guide", "Tutorial", etc attached to it. I'm glad that they are labeled in that way.

One issue I note is that there is probably a lot of metadata still missing in order to properly search and sort. For example, the CCD Data Reduction Guide relies heavily on ccdproc, a package that is being developed to replace IRAF and will be of key interest to many people.

eblur commented 3 years ago

I would not require my above note to be fixed to accept the PR. After some discussion, we noticed it is related to astropy-librarian Issue 14

jonathansick commented 3 years ago

@eblur That's a really good point about the keyword metadata for guides. We'll need to either establish a metadata file to go along with a guide to provide that or start extracting Python package usage from code samples as discussed in https://github.com/astropy/learn-astropy-librarian/issues/14 (which has some up-front challenges, but would be a nice system to have in the long run. Either way, the front-end wouldn't need to change to make that possible, so it's something I'll need to add to https://github.com/astropy/learn-astropy-librarian. I do think a metadata header standard or metadata file would be good for guides, and I've created a second ticket for that: https://github.com/astropy/learn-astropy-librarian/issues/17