Closed amberreeves closed 6 years ago
@mtedeschi just don't want this to slip off the radar. let me know if you've got a response for her.
@amberreeves sorry about that.
The obvious solution I had was to add the number of results to the tab (so you could see if there was anything returned), but that's not doable without changing the entire search page (which is possible, but time consuming—probably 8-12 hours of work).
Here are a few alternative ideas:
sent to karie for review
From Karie I like the option: Move away from tabs, and instead show them as a single list, labeled by type in the individual result's row.
Would results be sorted alphabetically, or by type or ? And can we use PAGES for the label for the items that appear in the SITE tab?
I can give an update on what our sorting options are based on how Drupal handles it. I believe it's returned by relevance, which is some Drupal magic, but I'll let you know when I dig into it.
We can use PAGES for the items currently in the SITE tab.
This is complete, here's a test link to see how it looks/works:
Question for Karie: Does she want to also show the snippet that I added in in the example? If not, I can turn it off. It just shows where the keyword appears in the item.
sent to karie for review
From Karie: Thanks for this. I like the snippet. Is there any way to display number of results? Fine it not.
Spent a bit of time diving into this—unfortunately, the only way to customize the Drupal search in D8 is to completely override it via a custom module, so I'm not able to pull in the number of results (without considerable work).
sent to karie for review
@mtedeschi karie says she's good with what's on the staging site, so we can push that live as soon as you're ready.
Merged into production.
From Karie Can you give me an idea of what would be involved in styling the search results page so that users get an indication that tabs other than the first one displayed include search results?
https://www.historyofvaccines.org/search/node?keys=shingles&f[0]=type:article&f[1]=type:page&f[2]=type:simulation&f[2]=type:timeline_entry
@mtedeschi i'm not exactly sure what she means here. do you?