Skip to content

Centralize per-viewport content decoration for C2#5827

Open
overmyheadandbody wants to merge 1 commit intosite-redesign-foundationfrom
vp-content-decoration
Open

Centralize per-viewport content decoration for C2#5827
overmyheadandbody wants to merge 1 commit intosite-redesign-foundationfrom
vp-content-decoration

Conversation

@overmyheadandbody
Copy link
Copy Markdown
Contributor

@overmyheadandbody overmyheadandbody commented Apr 17, 2026

This aims to centralize a method to decorate cross-viewport content, now that we're introducing standard authoring pattern. Blocks where this has already been applied: base-card, rich-content, explore-card. Blocks that might not currently align with the authoring pattern or more investigation is needed from responsible engineers: router-marquee (where each viewport has multiple slides), news (where we're not aware of a need to have per-viewport content; additionally, in the future its content might come from an external source), elastic-carousel (which also has a different authoring pattern at the moment).

The logic currently support both mobile and mobile-viewport keywords (same for tablet/desktop), until engineers and GWP align on using the latter, which is needed for the localization process.

Test URLs:

@aem-code-sync
Copy link
Copy Markdown
Contributor

aem-code-sync bot commented Apr 17, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@rgclayton
Copy link
Copy Markdown
Contributor

Looking good!

Here's sample page where the first 2 explore-cards have a video on desktop and image on mobile.

Comment thread libs/utils/decorate.js
};

setContent();
mq.addEventListener('change', setContent);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any concerns about this listener never being cleared?

@aem-code-sync aem-code-sync bot temporarily deployed to pdp-hero-autogenerated April 20, 2026 14:25 Inactive
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.

4 participants