feat: Add Projects component#109
Conversation
…ption with caption
refactor hero and materials sections padding
WalkthroughThis PR adds a new Projects section to the home page with a responsive carousel component. The carousel UI component provides Embla-based slide navigation with keyboard support and dot pagination. CardCaption is extended to accept rich content. The Projects section uses both components to display featured projects with responsive layouts. The home page is updated to integrate the new section with adjusted spacing. ChangesProjects Section with Carousel UI
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/ui/carousel.tsx (1)
150-161: ⚡ Quick winConsider using a more appropriate element than
<fieldset>for carousel items.The
<fieldset>element is semantically intended for grouping form controls with a<legend>. For carousel slides, a<div>is more semantically appropriate. If the carousel structure uses a list pattern, consider<li>within a<ul>parent.♻️ Proposed refactor to use div
- <fieldset + <div aria-roledescription="slide" data-slot="carousel-item" className={cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className)} {...props} />🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/ui/carousel.tsx` around lines 150 - 161, The CarouselItem component currently renders a <fieldset>, which is semantically incorrect for slides; change the element returned by the CarouselItem function to a semantically appropriate container (e.g., <div> or <li> if used inside a list) while preserving attributes: keep aria-roledescription="slide", data-slot="carousel-item", className computed via cn(...) and spread {...props}; update any TypeScript props typing from React.ComponentProps<"fieldset"> to React.ComponentProps<"div"> (or "li") and ensure useCarousel() usage and class composition remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/ui/carousel.tsx`:
- Around line 150-161: The CarouselItem component currently renders a
<fieldset>, which is semantically incorrect for slides; change the element
returned by the CarouselItem function to a semantically appropriate container
(e.g., <div> or <li> if used inside a list) while preserving attributes: keep
aria-roledescription="slide", data-slot="carousel-item", className computed via
cn(...) and spread {...props}; update any TypeScript props typing from
React.ComponentProps<"fieldset"> to React.ComponentProps<"div"> (or "li") and
ensure useCarousel() usage and class composition remain unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c4cca3b5-082e-48eb-bcf2-c16637b7f563
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
package.jsonsrc/app/page.tsxsrc/components/card-caption.tsxsrc/components/home/hero.tsxsrc/components/home/materials.tsxsrc/components/home/projects.tsxsrc/components/ui/carousel.tsx
Introduce a new Projects component to showcase featured projects.
Refactor existing components for improved structure and styling.