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...

Properties
  • `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
  • `attributes`: HTML attributes for the containing element.
  • `title_attributes`: HTML attributes for the main title tag.
Slots
  • `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

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

Lubna hmeid created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
lubna hmeid’s picture

lubna hmeid’s picture

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Version: 2.0.0-alpha2 » 2.0.x-dev
Category: Bug report » Task

Ammar_Jeetawi made their first commit to this issue’s fork.

ammar_ar’s picture

Assigned: lubna hmeid » Unassigned
Status: Active » Needs review
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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