Skip to content

ISWA: Enhancement to elastic-carousel - #201

Open
jsandland wants to merge 15 commits into
stagefrom
elastic-carousel
Open

ISWA: Enhancement to elastic-carousel#201
jsandland wants to merge 15 commits into
stagefrom
elastic-carousel

Conversation

@jsandland

@jsandland jsandland commented Aug 1, 2026

Copy link
Copy Markdown
  • 3-up view
  • Moves the expand icon next to the headline.
  • When user clicks expand icon, the text reveals under the heading. The image height recrops.

Resolves: MWPW-202491

Test URLs:

Before: https://main--da-bacom--adobecom.aem.live/drafts/jsandlan/elastic?martech=off
After: https://elastic-carousel--da-bacom--adobecom.aem.live/drafts/jsandlan/elastic?martech=off

Removes the hover-driven elastic-grow interaction in favor of simple
prev/next arrow controls (shown only when more than 3 cards) that
page the visible cards out of view via scroll-snap, matching the
updated Figma. Also restores hover-to-play video behavior and fixes
video source resolution to prefer the source URL over a corrupted
data-video-source reference.
@aem-code-sync

aem-code-sync Bot commented Aug 1, 2026

Copy link
Copy Markdown

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

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Aug 1, 2026

Copy link
Copy Markdown
Page Scores Audits Google
📱 /drafts/jsandlan/elastic?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /drafts/jsandlan/elastic?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Adds a chevron button next to the card title that shows/hides the
description text, matching the updated Figma. Also switches the
carousel background to white.
@aem-code-sync
aem-code-sync Bot temporarily deployed to elastic-carousel August 1, 2026 00:56 Inactive
@jsandland jsandland changed the title Replace hover-grow elastic carousel with arrow-based paging ISWA: Enhancement to elastic-carousel Aug 1, 2026
Moves the left inset onto the block's own top-level class with
boosted specificity, since the previous rule on the nested scroll
container wasn't taking effect.
The toggle click handler was only bound to the tiny 24x24px chevron
icon button, so clicking the title text itself did nothing. Moves
the listener to the title row (text + chevron) so the whole row is
clickable, per feedback that the hit box felt too small.
The initial arrow-state check ran synchronously during block
decoration, before Franklin reveals the block (blocks are commonly
hidden via CSS until decoration finishes), so scrollWidth/clientWidth
both read 0 and incorrectly concluded there was nothing left to
scroll to, permanently disabling the next arrow even when more cards
were available. Deferring that initial check to
requestAnimationFrame so it runs after the block is actually visible
and laid out, same fix as the equivalent bug in bento-grid.

Also unifies both arrows to the same black background instead of
the previous dark-prev/light-next scheme, which didn't make sense
visually.
@aem-code-sync
aem-code-sync Bot temporarily deployed to elastic-carousel August 3, 2026 22:07 Inactive
decorateBlockText tags the title h3 as a heading-N element, which
picks up Milo's shared heading treatment and renders as doubled or
ghosted text. The card title is fully custom-styled, so the class
just needs to be removed.
Add a plus/minus toggle in the card header that reveals the
description in place, with the media area flexing to absorb the
height change so the card's bottom edge stays fixed. Restore the
decorative chevron after the footer title link, and hide the
Video Speed Controller extension's badge if present.
@aem-code-sync
aem-code-sync Bot temporarily deployed to elastic-carousel August 5, 2026 21:27 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to elastic-carousel August 5, 2026 21:36 Inactive
Use getBoundingClientRect for sub-pixel precision when locking the
collapsed height, clip overflow on the container as a safety net,
and set the video to display:block to remove the baseline-alignment
gap that was throwing off the collapsed media height by ~7.5px.
The global h3 heading rule was leaking a negative letter-spacing
value onto this 14px title, crowding the glyphs together.
Cap card width (294-394px) and height (485px) on mobile, cap the
media image at 316px tall, split padding-left by breakpoint, and
add a decorative peeking-cards-behind-the-front-card effect on
mobile using pseudo-elements on the block (avoids overflow/margin-
collapse conflicts with the actual scrolling cards). Also hide the
prev/next arrows on mobile, and set the block/card backgrounds to
black/white respectively.
Give the enabled arrow a solid white fill and the disabled arrow a
subtle ring instead of a dimmed dark circle. Cap the card and its
container at 346px max-width, and fix a leftover 1200px breakpoint
that was bleeding desktop-only styles into the tablet range.

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

Typically, variants will modify existing functionality by additive means, usually by adding a class and configuring new styles with increased specificity under those additional class names.

Not sure what went on here, but it seems we've nuked all the animations, and some of the nice to have UI smoothing. We probably need to go back to the drawing board with this one.

Replace the native scroll/sticky-based stacking attempt with a
JS-controlled index: each card is absolutely positioned via an
inline top offset (0/20/40px for the two peeks + front), animated
with a CSS transition, and driven by swipe/drag/wheel gestures that
advance or retreat by exactly one card. Cards not yet reached sit
just below the visible, clipped container and slide up into place.

Only the footer CTA is clickable on mobile now (the rest of the
card no longer intercepts taps), and a scrubber tracks position
through the deck. Tablet/desktop are untouched - the wrap stays
display:contents there, and the isMobile check now uses matchMedia
to stay consistent with the CSS breakpoint instead of relying on
window.innerWidth, which could disagree with the effective CSS
viewport in some testing setups.
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.

3 participants