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_mediumview mode, already bound tofield_whenso 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
latestblock display onviews.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.
Issue fork varbase_events_base-3616587
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 natshahComment #5
rajab natshahComment #6
rajab natshah✅ Released varbase_events_base-1.0.0-alpha2