Problem/Motivation

This recipe already reshapes views.view.events, which is owned by the third-party drupal/events recipe, and contributes a related block display through a config action. What it does not contribute is a small "upcoming events" display, the obvious companion piece for a homepage or sidebar panel.

Without one, a site template has to define that display itself. The Educare site template did exactly that, carrying roughly three hundred lines of events-view configuration in its own recipe.yml — a definition no other consumer of this recipe can reuse, in a file that should not own it.

Proposed resolution

Add a latest block display to the existing views.view.events config action, alongside the related display this recipe already contributes:

  • three upcoming events, no pager;
  • the text_card_medium view mode, already bound to field_when so each card carries its date;
  • a single column, so it fits a narrow column beside other content.

Component ids are the base theme's (vartheme_bs5:), matching the displays this recipe already declares, so a site on vartheme_bs5 works as shipped and a site template with its own theme repoints them through setViewsComponentStyleTheme.

Remaining tasks

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

User interface changes

  • A new "Upcoming events" block becomes available to place.

API changes

  • N/A

Data model changes

  • New latest block display on views.view.events, contributed by this recipe's config action.

Release notes snippet

  • Added an Upcoming events block display, listing the next three events as dated cards.
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 48865197 on 1.0.x
    feat: #3616587 Add an Upcoming events block display to the events view
    
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase_events_base-1.0.0-alpha2
rajab natshah’s picture

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

Assigned: mohammed j. razem » Unassigned
Issue summary: View changes
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.