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

  1. Install the Horizon Aid site template.
  2. Add or unpublish a country, an event or a blog post.
  3. Open the front page: the cards do not follow the content.
  4. 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 with block.views_block.countries-latest and block.views_block.blog-latest; set the events section to a single 100 column; repoint five /program-page links at the real /programs/<slug> aliases.
  • config/views.view.countries.yml — the latest display renders through components_views_style on vartheme_bs5:country-slider with rows_slot: cards, and its rows use the card view mode.
  • config/canvas.content_template.node.country.card.yml — that card view mode renders card-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 — the views.view.blog action gains the same treatment for the Latest Updates slider, followed by setViewsComponentStyleTheme.

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 card view 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

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 committed 9a2640fe on 1.0.x
    feat: #3613864 Feed the Home page sections from views instead of hand-...
rajab natshah’s picture

Assigned: Unassigned » josebc
Status: Active » Needs review
Issue tags: +horizonaid-1.0.0-alpha1
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.