Problem/Motivation
The Home page placed its country cards and its update cards as Canvas component trees, so the site template shipped a homepage that does not change when the site's content does, and six of its links pointed at stand-in paths that no longer exist.
The "Where We Work" section was also unstyled. The slider's CSS targets its direct > .card-country children, and the view rendered card-overlay instead, so the cards collapsed:
country card box: 11 x 7 px (then 2 px after a second attempt)Steps to reproduce
- Install the Horizon Aid site template.
- Add or unpublish a country, an event or a blog post.
- Open the front page: the cards do not follow the content.
- Follow the "Read more" links in the Our Programs section: they lead to
/program-page, which returns 404.
Proposed resolution
content/canvas_page/01-home.yml— replace the country-slider and impressed-card-slider component trees withblock.views_block.countries-latestandblock.views_block.blog-latest; set the events section to a single 100 column; repoint five/program-pagelinks at the real/programs/<slug>aliases.config/views.view.countries.yml— thelatestdisplay renders throughcomponents_views_styleonvartheme_bs5:country-sliderwithrows_slot: cards, and its rows use thecardview mode.config/canvas.content_template.node.country.card.yml— thatcardview mode renderscard-country, so the slider's own CSS sizes it.config/canvas.component.sdc.vartheme_bs5_horizonaid.card-country.yml— new. Canvas only generates a component's config once a recipe has finished applying, so the content template above had nothing to bind to until this was exported from a live install.recipe.yml— theviews.view.blogaction gains the same treatment for the Latest Updates slider, followed bysetViewsComponentStyleTheme.
Verified as an anonymous visitor at 1440x900 with the cache busted: three views containers on Home (view-id-countries, view-id-events, view-id-blog), country cards measuring 300x420 with a minimum card width of 300px across eleven cards, no broken images, no broken links, no stand-in paths in the markup, and the recipe log reporting Pointed 3 view components in views.view.countries at the vartheme_bs5_horizonaid theme.
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ 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
- The Home page's Where We Work, Events and Latest Updates sections now list real content and follow it as it changes.
- Country cards render at their designed size instead of collapsing.
API changes
- N/A
Data model changes
- A
cardview mode content template for the Country content type.
Release notes snippet
- The Home page's country, event and update sections are now views-driven, so they follow the site's content, and the Our Programs links point at the real program pages.
Issue fork horizonaid-3613864
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 #4
rajab natshah✅ Released horizonaid-1.0.0-alpha1
Comment #5
rajab natshahComment #6
rajab natshah