Skip to content

feat: add carousel component#23

Merged
sebastian-noel merged 6 commits into
mainfrom
feature/add-carousel-component
Jul 21, 2026
Merged

feat: add carousel component#23
sebastian-noel merged 6 commits into
mainfrom
feature/add-carousel-component

Conversation

@cunkin375

Copy link
Copy Markdown
Collaborator

Pull Request

Description

Adds ImageCarousel component and uses it in AboutSection.tsx.

Type of Change

  • feat: New feature
  • fix: Bug fix
  • chore: Maintenance (dependencies, config, etc.)
  • docs: Documentation only
  • style: Code style (formatting, no logic change)
  • refactor: Code refactor (no new feature or fix)

Changes Made

  • Add ImageCarousel.tsx
  • Implement ImageCarousel component in AboutSection.tsx with static cards

Screenshots (if applicable)

feature_add-carousel-component.mp4

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have tested my changes locally
  • npm run lint passes without errors
  • npm run build completes successfully

Related Issues

Removed unused setCardSource function from ImageCarousel.
@cunkin375

Copy link
Copy Markdown
Collaborator Author

Currently in ImageCarousel.tsx:150, the use of Image expects CarouselCard objects to hold valid sources to images. If this is not the case, the current code does not fallback to any default images/DOM elements. I will fix this when I have the time, but if anyone is able handle this prior to merging, that would be great.

@sebastian-noel sebastian-noel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed the error handling issue, otherwise... LGTM!

@sebastian-noel
sebastian-noel merged commit 921a2e6 into main Jul 21, 2026
2 checks passed
@sebastian-noel
sebastian-noel deleted the feature/add-carousel-component branch July 21, 2026 23:42
@dvcalex
dvcalex requested a review from Copilot July 21, 2026 23:46

Copilot AI left a comment

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.

Pull request overview

Adds a new client-side ImageCarousel component and wires it into AboutSection to display a set of static “About” cards with optional autoplay and animated transitions.

Changes:

  • Added components/ImageCarousel.tsx (animated carousel with arrows + dots, optional autoplay, multi-card viewport).
  • Updated components/AboutSection.tsx to define static carousel card data and render the carousel.

Reviewed changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated 3 comments.

File Description
components/ImageCarousel.tsx New animated carousel component with autoplay, navigation controls, and image fallback handling.
components/AboutSection.tsx Adds static card data and renders ImageCarousel in the About section.

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

Comment on lines +185 to +191
<div className="flex gap-2" role="tablist" aria-label="Carousel navigation">
{cards.map((_, i) => (
<button
key={i}
role="tab"
aria-selected={i === currentIndex}
aria-label={`Go to card ${i + 1}`}
Comment on lines +3 to +6
/**
* Static card data
* TODO: replace placeholderClass with a real images
*/
Comment on lines +99 to +109
const startAutoPlay = useCallback(() => {
if (!autoPlay) return;
intervalRef.current = setInterval(() => {
setDirection(1);
setCurrentIndex((prev) => (prev + 1) % cards.length);
}, intervalMs);
}, [autoPlay, cards.length, intervalMs]);

const stopAutoPlay = useCallback(() => {
if (intervalRef.current) clearInterval(intervalRef.current);
}, []);
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