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

Add search capability #89

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Add search capability #89

wants to merge 5 commits into from

Conversation

gmantele
Copy link
Member

@gmantele gmantele commented Oct 3, 2024

This PR aims to add an indexing capability using PageFile and then to add somewhere in the IVOA pages the search form and results.

Fixes #88

@gmantele gmantele added the new feature New feature or request label Oct 3, 2024
@gmantele gmantele self-assigned this Oct 3, 2024
@gmantele
Copy link
Member Author

gmantele commented Oct 3, 2024

Currently, PageFind is all configured. The Makefile has been adapted to index pages after their generation (PageFind indexes HTML files). This works well with the preview and the new html targets.

Left to do:

  • Adapt the CI to generate the search index (either using the Makefile or using directly the commands)
  • Add the search field
  • Add the search results

Questions to answer:

  • where should be the search field?
    • in the top navigation bar?
    • visible by default or a button should be clicked to show a search form (including the search field and eventually some filters)?
  • where should be displayed the search results?
    • in a contextual menu after having entered some letters?
    • in a dialog?
    • in a separate page?
  • do we want to filter the search results?
    • by date?
    • by section/direction? (e.g. newsletter, members, ...)
    • by tag? (then we should put some in our content pages)

Two examples of search capabilities with PageFind:

The search feature already works. The current layout, styles and JS are a quickly adapted version of the CDS search feature.

The style should be adapted to the IVOA.

Questions left to answer:
- Are images necessary here?
- Do we need tags and dates being visible?
- Should this search feature be available as a modal on all pages?
…ically generated by Hugo should not be inspected.
@gmantele
Copy link
Member Author

For the moment, the current prototype uses the CSS and JS of the same feature on the CDS website. They have been slightly adapted, but they should be completely adapted to the desired features and style of the IVOA website.

Anyway, the search capability is fully working here. You can already test it if you want, although it may be even more interesting while we will have the newsletters (which contain a lot of content).

Currently, the search capability is only available on a single dedicated page (/search/ ; a link is visible, temporarily at first position, in the top navigation bar). We have to decide where how we would like to trigger this search capability. A dedicated page like now or a modal dialog available on all pages when clicking on search button/icon?

@gmantele
Copy link
Member Author

I have not yet adapted the CI, so you will have to test this feature on your local repository ; it does not work yet on https://webtest.ivoa.info/v/iss88-search-index//search/ as PageFind is not installed and run.

To do that locally on your machine, you will have to:

  1. Checkout this branch
  2. Run make preview ; this will install PageFind, generate the search index and open the generated website in your web browser.

Only running the Hugo command is no more enough if you want to use the search capability.

@JeremyMcCormick
Copy link
Collaborator

JeremyMcCormick commented Oct 12, 2024

This looks great!

Is this ready to be merged? Or do you have more changes planned?

I'm starting to think the version sites are problemmatic to fully support. If this update would work on main, then I am okay merging it even if it doesn't function on the version/branch site.

@gmantele
Copy link
Member Author

As I said, it is not yet ready to be merged. I still have few style things to do, and tuning of the search engine.

And, we also have to decide

  • if this search feature is nice this way?
  • Do we want it as a dialog available on any page of the website (as on the CDS website)?
  • Is the link on the top left in the main nav bar is OK or should it be somewhere else?

@molinaro-m
Copy link
Member

I checked out and tried the solution on my laptop and it worked seamlessly (even before I realised it had finished).
We have to remember to discuss Grégory's questions in the comment above at our next vconf/meeting.

My preference: nice to have, dialog-wise, as a "lens" at the right end of the nav-bar.

@JeremyMcCormick
Copy link
Collaborator

As I said, it is not yet ready to be merged.

My apologies, I see this is marked as draft.

@JeremyMcCormick
Copy link
Collaborator

JeremyMcCormick commented Oct 15, 2024

Questions to answer:

I have no problem to defer most of these questions until a later update in order to just get the search functionality enabled and working on the site first; I don't think we need to make all of those decisions now. From my perspective, you can do whatever you think is best for the initial implementation and then we can go from there. CDS website search functionality looks nice to me, personally, so I would have no issue if you just copied that for this PR.

My only preference is that we have a box that says "Search" in a prominent place in the upper right of the index page, mainly for accessibility purposes.

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

Successfully merging this pull request may close these issues.

Add a Search Page feature
3 participants