Problem/Motivation
Search on Horizon Aid is its own setup on the Drupal CMS search view: a page display with a keyword box and a list of titles and excerpts. Visitors cannot narrow results, and the template does not share the search the other Vardot site templates get from Varbase Search Base.
Steps to reproduce
- Install Horizon Aid.
- Open
/search?keywords=water. - The results are a plain title list, with no way to filter by category, content type or date.
Proposed resolution
- Apply
varbase_search_baseinrecipe.ymland requiredrupal/varbase_search_base. - Ship
/searchas a Canvas page: an h1, the keyword panel, a filter rail (Category, Content Type, then Date Published as a select), and the results. The view's page display is disabled. The header search form keeps working, it still submitskeywordsto/search. - Category combines the resource categories (News, Report, Policy brief) and the event categories (Summit, Webinar, Briefing, In-person). These are the labels visitors already see on the Resources and Events cards, and they cover 50 of the 70 demo items. Program types and countries are few and have their own listings.
- Results are image cards with a content type badge, two per row, through a
search_resultCanvas template for every content type. The templates bind only the title, description, featured image and URL, so an item without an image or description still renders. - All search keys are ones the base recipe does not write, so applying it again keeps them.
Needs the theme change in vartheme_bs5_horizonaid #3631109 (merge that first) so the facet lists and the rail's date filter align.
The design file has no search page. The page follows the Resources listing: the filter panel, the "Showing x-y of n" summary, the image cards and the pager. A search results frame, facet checkbox states and a date filter control would let the design own this page.
Screenshots
Before (1440 and 390)


After (1440 and 390)



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
/searchgets a keyword panel, a filter rail and image result cards.
API changes
- N/A
Data model changes
- A
category_namefield in the content search index, and a Category facet.
Release notes snippet
- Search now uses Varbase Search Base, with Category, Content Type and Date Published filters on
/search.
AI-Generated: Yes. Drafted with an AI assistant and reviewed before posting.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | horizonaid-search-date-after-390.png | 18.81 KB | rajab natshah |
| #8 | horizonaid-search-date-after-1440.png | 24.21 KB | rajab natshah |
| #4 | horizonaid-search-two-types-1440.png | 1.63 MB | rajab natshah |
| #4 | horizonaid-search-mixed-p1-390.png | 1.7 MB | rajab natshah |
| #4 | horizonaid-search-mixed-p1-1440.png | 2.54 MB | rajab natshah |
Issue fork horizonaid-3631112
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
Comment #3
rajab natshahDate Published now sits in the filter rail, directly after Content Type, as a select. The keyword panel holds only the keyword field and the Search button. Each form carries the other's value as a hidden field, so a new keyword keeps the date and a new date keeps the keyword.
The theme MR (#3631109) now only aligns the facet lists and drops the rail date form's own panel; the phone stacking rule is no longer needed.
The header search was checked at 1440 and 390: it opens and closes by keyboard, the field has a label, Enter lands on
/searchwith the keyword filled in and results shown, and the facets then narrow them. It looks the same as before. The 12-search tests pass (25 scenarios).Screenshots
After (1440 and 390)
Header search, before / after
Comment #4
rajab natshahFresh screenshots of the current MR state: horizonaid !112 at 8428bc6, vartheme_bs5_horizonaid !45 at 132f6cc (#3631109), varbase_search_base 1.0.x b5a9d13, caches cleared, logged out.
Every content type in the index was checked at 1440 and 390, one at a time through the Content Type facet and mixed:
Each card uses the type's
search_resulttemplate: right badge, title, working link, description, image loaded, same width and 4:3 image on every type. No template binds a delta of an optional field, and a node with no image or description still renders. Mixed pages (27 results for "the", across two pages) keep one grid, and ticking Country and Program together returns both types. No LogicException, no console errors. Nothing needed fixing.Before
After
Header search (open, then the result page)
One content type at a time (1440)
Mixed types
Comment #5
rajab natshahComment #8
rajab natshahNew screenshots for MR !113: Date Published in the filter rail is now radios, and the Category facet shows 8 items with Show more.
After (1440 and 390)
Comment #10
rajab natshah✅ Released horizonaid-1.0.8