Problem/Motivation

Educare's /search is the search view's page display: a keyword box and a plain list of titles with excerpts. There is no way to narrow results by category, content type or date, and it does not use Varbase Search Base like the other site templates.

Steps to reproduce

  1. Install Educare and open /search?keywords=research.
  2. Try to narrow the results to events, or to the past week.

Proposed resolution

  • Require and apply drupal/varbase_search_base (tested on 1.0.x b2e0fc1).
  • Ship a Canvas page at /search with the keyword form, the results and a filter rail: Category, Content type, Date Published. Disable the view's page display.
  • Category is one index field built from the program type, news category and event category, so it covers programs, news and events. It shows 8 items with Show more.
  • Results use a search_result view mode with Canvas templates: type label, title, summary and authored date for every bundle. News also shows its featured image, bound the way Educare's news cards already bind it.
  • The header search keeps its own keyword-only form and submits to /search.
  • Results list nodes only, as in Varbase Search Base, so Canvas pages such as About no longer show up in search.
  • Functional tests updated and added for the page, the filters and every content type.

Styling of the date radios and the header bar is in #3631204.

Screenshots

Before (1.0.x), 1440, logged out, keyword "research":

educare-search-before-1440.png

After, 1440:

educare-search-after-1440.png

Before and after, 390:

educare-search-before-390.png educare-search-after-390.png

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ✅ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • New /search page with a filter rail and result cards.

API changes

  • N/A

Data model changes

  • New category_name field on the content search index and a search_category facet.

Release notes snippet

  • Search on Varbase Search Base, with a filter rail for category, content type and date.

AI-Generated: Yes. Prepared with an AI coding assistant and tested on a local Educare site, per the Drupal AI policy.

Issue fork educare-3631205

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Status: Active » Needs review

  • rajab natshah committed 8a433aba on 1.0.x
    feat: #3631205 Use Varbase Search Base for search, with a Canvas search...
rajab natshah’s picture

Status: Needs review » Fixed
Issue tags: +educare-1.0.8

✅ Released educare-1.0.8

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.