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

Created on 15 May 2024, 6 months ago
Updated 17 June 2024, 5 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