Skip to content

Media 1202 - #50

Merged
protitude merged 2 commits into
2.0.xfrom
media-1202
Mar 25, 2026
Merged

Media 1202#50
protitude merged 2 commits into
2.0.xfrom
media-1202

Conversation

@protitude

Copy link
Copy Markdown
Collaborator

Describe context / purpose for this PR

News Images - Rework

Issue link

#1202

Any other related PRs?

Link to MultiDev instance

http://md-1202-ucbsub-oit.pantheonsite.io

Checklist for PR author

  • I have checked that the PR is ready to be merged
  • I have reviewed the DIFF and checked that the changes are as expected
  • I have assigned myself or someone else to review the PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reworks the News “hero image” field block template to align with the theme’s Emulsify/BEM-based block markup patterns, likely as part of the broader “News Images - Rework” effort.

Changes:

  • Wraps output in a content|render|trim emptiness check to avoid rendering an empty block container.
  • Switches the wrapper markup to use bem() instead of attributes.addClass('pull-left').
  • Updates the label heading to add the h2 class via title_attributes.
Comments suppressed due to low confidence (1)

templates/block/block--field-block--node--news--field-media-hero-image.html.twig:30

  • bem() is being called with a first argument of 'block pull-left'. Elsewhere in the theme, additional classes are passed either as an array (e.g., bem(['no-list-style'])) or via the 4th extra argument. Passing a space-delimited string here can cause BEM class generation to treat pull-left as part of the base class and produce incorrect modifier classes (e.g., pull-left--<modifier>). Consider keeping the base class as 'block' and passing 'pull-left' as an extra class (or pass ['block', 'pull-left'] as the base).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@protitude
protitude merged commit 300987a into 2.0.x Mar 25, 2026
5 checks passed
@protitude
protitude deleted the media-1202 branch March 25, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants