InteractiveMechanics / historyofvaccines-drupal8

0 stars 0 forks source link

[x] Styling adjustment to search results tabs #369

Closed amberreeves closed 6 years ago

amberreeves commented 6 years ago

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

search for shingles history of vaccines

@mtedeschi i'm not exactly sure what she means here. do you?

amberreeves commented 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.

mtedeschi commented 6 years ago

@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:

amberreeves commented 6 years ago

sent to karie for review

amberreeves commented 6 years ago

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?

mtedeschi commented 6 years ago

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.

mtedeschi commented 6 years ago

This is complete, here's a test link to see how it looks/works:

http://staging.historyofvaccines.org/search/node?keys=vaccine&f%5B0%5D=type%3Aarticle&f%5B1%5D=type%3Apage&f%5B2%5D=type%3Asimulation&f%5B3%5D=type%3Atimeline_entry&f%5B4%5D=type%3Ablog_post&f%5B5%5D=type%3Amedia&f%5B6%5D=language%3Aen

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.

amberreeves commented 6 years ago

sent to karie for review

amberreeves commented 6 years ago

From Karie: Thanks for this. I like the snippet. Is there any way to display number of results? Fine it not.

mtedeschi commented 6 years ago

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).

amberreeves commented 6 years ago

sent to karie for review

amberreeves commented 6 years ago

@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.

http://staging.historyofvaccines.org/search/node?keys=vaccine&f%5B0%5D=type%3Aarticle&f%5B1%5D=type%3Apage&f%5B2%5D=type%3Asimulation&f%5B3%5D=type%3Atimeline_entry&f%5B4%5D=type%3Ablog_post&f%5B5%5D=type%3Amedia&f%5B6%5D=language%3Aen

mtedeschi commented 6 years ago

Merged into production.