Add the full list of props and slots for the Media component

Created on 15 May 2024, 8 months ago
Updated 17 June 2024, 7 months ago

Problem/Motivation

Having a not complete SDC component for the media entity type
Media has no defined props and no slots

At this time it is the Default Drupal Media Twig file. ( but only as an SDC component )

Proposed resolution

  • Advance the media component
  • Add content slot
  • Add utility_classes prop
  • Better up the attributes prop

Media

The Media component is designed to display a media item with customizable styling and options.

https://github.com/Vardot/varbase_components/tree/2.0.x/components/organ...

  • `media`: The media item, with limited access to object properties and methods.
  • `name`: Name of the media.
  • `view_mode`: The view mode of the media item; for example, `media_01_01` or `media_16_09`.
  • `title_prefix`: Additional output displayed before the main title tag.
  • `title_suffix`: Additional output displayed after the main title tag.
  • `utility_classes`: An array of utility classes for the root element.
  • `attributes`: HTML attributes for the containing element.
  • `title_attributes`: HTML attributes for the main title tag.
  • `content`: Media content.

Example:

{% include 'varbase_components:media' with {
  media: media,
  utility_classes: [],
  content: content,
} only %}

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
  • ✅ Code review from 1 Varbase core team member
  • ➖ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ❌ Release varbae-10.0.0, varbase_components-2.0.0-rc2

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇯🇴Jordan Lubna hmeid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024