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

Implement a faceted search. #34

Open
johnvanbreda opened this issue Oct 22, 2024 · 5 comments
Open

Implement a faceted search. #34

johnvanbreda opened this issue Oct 22, 2024 · 5 comments

Comments

@johnvanbreda
Copy link
Collaborator

Follows on from #12.

Add a faceted search tool as an alternative/replacement for the standard species browser which allows browsing via taxonomy, territory and global search as now, but also by other fields in the species account such as impact. A good example is https://www.iucnredlist.org/search. Functionality similar to this can be achieved using the Drupal Facets module.

@johnvanbreda
Copy link
Collaborator Author

@StephRorke @DavidRoy there is a rough draft of a new browse tool on the searchdev version of the site - via the territory icon links on https://searchdev-ceh-ukotas-d10.pantheonsite.io. This is not complete yet as I've only implemented some of the facets, but please can I have some feedback to confirm this is on the right lines before I start properly building on the live site?

I have configured the facets in the left column to show a "no values" message if they are empty - in reality we probably want only the active facets to appear, so I'll change this on the live version. Also note that the tool currently requires a page load when you change a value for a search facet - AJAX is supported by the underlying module which removes the need to reload the entire page, but it is unfortunately very buggy (there is a long list of issues and patches around this - see https://www.drupal.org/project/facets/issues/3075378).

@StephRorke
Copy link
Collaborator

@johnvanbreda I've had a quick look at this and yes most definitely along the lines I was expecting. Will it be possible to have the global search as available here: https://searchdev-ceh-ukotas-d10.pantheonsite.io/browse-species working alongside the facet search functionality?
I think only showing active facets would be beneficial if it doesn't cause long refresh times

@johnvanbreda
Copy link
Collaborator Author

@StephRorke there is a version of the faceted search now on the live site at https://live-ceh-ukotas-d10.pantheonsite.io/species-browser. I can swap it for the one you get when you click on a territory flag on the home page once you've checked it's OK. It includes an updated global search as well as hiding facets that have no options.

@StephRorke
Copy link
Collaborator

@johnvanbreda it looks like we may have lost some of the formatting from the species entry and review pages - the headers for each of the fields don't seem to be displayed at present: https://live-ceh-ukotas-d10.pantheonsite.io/species-browser?search=worm&f%5B0%5D=territories%3A234
Previously I was certain they were shown as per the edit pages on the dev site: https://dev-ceh-ukotas-d10.pantheonsite.io/species/tristan-da-cunha/bimastos-eiseni

@johnvanbreda
Copy link
Collaborator Author

I've re-added the labels on the species page, I'm not quite sure how they were turned off. I've also added common names into the taxonomy part of the faceted search options.

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

No branches or pull requests

2 participants