Change the default Drimage implementation to display a dynamic responsive image to use the varbase_components:dynamic-responsive-image SDC component

Created on 26 September 2023, 9 months ago
Updated 5 October 2023, 9 months ago

Problem/Motivation

The Dynamic Responsive Image (or drimage) β†’ default template is not using SDC
Needed to integrate with:

Proposed resolution

Switch the default template to drimage-formatter.html.twig to use varbase_components:dynamic-responsive-image

{#
/**
 * @file
 * Vartheme BS5 theme implementation to display a dynamic responsive image
 *
 * Available variables:
 * - url: An optional URL the image can be linked to.
 * - width: The original width of the image.
 * - height: The original height of the image.
 * - alt: The alt text for the image.
 * - item_attributes: attributes for the wrapper
 * - data: json encoded drimage data object
 *
 * @see template_preprocess_drimage_formatter()
 *
 * @ingroup themeable
 */
#}
{% include 'varbase_components:dynamic-responsive-image' with {
    url: url|default(''),
    width: width,
    height: height,
    item_attributes: item_attributes|default([]),
    data: data|default([])
  } 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
  • βœ… 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 varbase-10.0.0-beta2 β†’ , vartheme_bs5-3.0.0-beta3 β†’

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

  • Issue #3389767 β†’ : Changed the default Drimage implementation to display a dynamic responsive image to use the varbase_components:dynamic-responsive-image SDC component
πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

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

Comments & Activities

Production build 0.69.0 2024