Skip to content

Image carousel frontend#15609

Open
mmmavis wants to merge 16 commits intofeature/speaker-component-integrationfrom
TP1-3603-image-carousel
Open

Image carousel frontend#15609
mmmavis wants to merge 16 commits intofeature/speaker-component-integrationfrom
TP1-3603-image-carousel

Conversation

@mmmavis
Copy link
Copy Markdown
Collaborator

@mmmavis mmmavis commented Mar 19, 2026

Related PRs/issues: Jira TP1-3603

Description

  • Image Carousel frontend: Implements full frontend styling, layout, and JS for the ImageCarouselBlock.
  • SlidingCarousel base class (JS): Extracts the shared infinite-loop sliding logic (tripled DOM track, touch/mouse swipe, keyboard nav, pagination, debounced resize) from portrait_card_carousel.js into a new util/sliding_carousel.js. Both ImageCarousel and PortraitCardSetCarousels now extend it.
  • Pagination controls fix (SCSS): Extracts $triangle-width as a shared variable and adds margin-left so the left triangle offset is correctly accounted for in the block's layout.

Note that the pagination controls and opacity of the peekaboo item in the image carousel follow the existing pattern (like portrait card carousel) until further design decision is made.


Link to sample test page: https://foundation-s-tp1-3603-i-efw1ml.mofostaging.net/en/carousel-test/

I've included Portrait Card Set examples in the test page for comparison.

@mmmavis mmmavis force-pushed the TP1-3603-image-carousel branch from 749b994 to 050f01e Compare March 20, 2026 01:15
@@ -0,0 +1,229 @@
/**
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

code in this file pretty much was all extracted from the original portrait-card-carousel.js

)
description = CustomRichTextBlock(
required=False,
label="Description",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

setting label so the field doesn't appear as Rich text in CMS

@mmmavis mmmavis temporarily deployed to foundation-s-tp1-3603-i-6qn0yt March 20, 2026 21:36 Inactive
@mmmavis mmmavis temporarily deployed to foundation-s-tp1-3603-i-6qn0yt March 20, 2026 21:38 Inactive
@mmmavis mmmavis temporarily deployed to foundation-s-tp1-3603-i-6qn0yt March 20, 2026 22:23 Inactive
@mmmavis mmmavis temporarily deployed to foundation-s-tp1-3603-i-6qn0yt March 20, 2026 22:35 Inactive
@mmmavis mmmavis changed the title [WIP] Speaker carousel frontend [WIP] Image carousel frontend Mar 23, 2026
@mmmavis mmmavis temporarily deployed to foundation-s-tp1-3603-i-uycljz March 23, 2026 18:18 Inactive
@@ -1,229 +1,35 @@
const SELECTORS = {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

code extracted into foundation_cms/static/js/blocks/util/sliding_carousel.js

@mmmavis mmmavis marked this pull request as ready for review March 23, 2026 19:20
@mmmavis mmmavis requested review from beccaklam and ramram-mf March 23, 2026 19:20
@mmmavis mmmavis changed the title [WIP] Image carousel frontend Image carousel frontend Mar 23, 2026
@ramram-mf
Copy link
Copy Markdown
Collaborator

Looking great so far @mmmavis I do have some questions regarding desktop viewport layout:

image

Is this bottom margin zeroed intentionally?

image

This bottom margin looks a bit narrow too. It seems in the spec we have a bit of space in between these elements.

@mmmavis mmmavis temporarily deployed to foundation-s-tp1-3603-i-3gc3pz April 1, 2026 23:43 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.

2 participants