Skip to content

Submission carousel ux improvements#1756

Merged
ragnep merged 3 commits intomainfrom
ui-fixes-homepage
Jan 19, 2026
Merged

Submission carousel ux improvements#1756
ragnep merged 3 commits intomainfrom
ui-fixes-homepage

Conversation

@ragnep
Copy link
Copy Markdown
Contributor

@ragnep ragnep commented Jan 19, 2026

Summary by CodeRabbit

  • New Features

    • Added a dedicated carousel section with autoplay controls and voting modal integration.
  • Improvements

    • Responsive image scaling and render modes for artwork previews.
    • Dynamic mint price display with loading states.
    • Links no longer prefetch automatically to reduce background loading.
  • Bug Fixes

    • Reset expanded item state when switching carousel items.
  • Content Updates

    • Carousel header updated to "Community favorites from artists in the network".
  • UI/Style

    • Replaced inline SVGs with icon components, adjusted carousel arrow disabled styling, spacing, and text-wrapping.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: ragnep <ragneinfo@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Extracts carousel behavior into a new SubmissionCarouselSection that manages autoplay, pointer interactions, and voting modal state; updates carousel/item components with render modes, image scaling, vote callbacks, and small UI/icon/styling adjustments across home and boosted card components.

Changes

Cohort / File(s) Change Summary
Carousel extraction & coordinator
components/home/HomePageContent.tsx, components/home/SubmissionCarouselSection.tsx
Moved carousel state/handlers from HomePageContent into a new SubmissionCarouselSection that manages activeDrop, carousel ref, pointer-based autoplay toggling, and voting modal pause/resume. HomePageContent no longer contains carousel state.
Carousel core & rendering
components/home/carousel/SubmissionCarousel.tsx, components/home/carousel/SubmissionArtworkCard.tsx, components/home/carousel/CarouselArrow.tsx
SubmissionCarousel: responsive image-scale selection, computed autoplay config, touch autoplay guards, renderMode per slide, exported via memo; SubmissionArtworkCard: added imageScale and renderMode props with placeholder/preview logic; CarouselArrow: adjusted disabled-state styling.
Carousel item details & voting
components/home/carousel/CarouselActiveItemDetails.tsx, components/home/carousel/CarouselActiveItemVote.tsx
CarouselActiveItemDetails: reset expansion when active drop changes and disabled Next.js prefetch on two Links; CarouselActiveItemVote: added onVoteOpen/onVoteClose props, lockedDrop/modalDrop handling, memoized open/close handlers, and conditional modal rendering.
Home page & sections
components/home/hero/HeroHeader.tsx, components/home/hero/CarouselHeader.tsx, components/home/HomePageContent.tsx, components/home/now-minting/NowMintingDetails.tsx, components/home/now-minting/NowMintingStatsGrid.tsx, components/home/now-minting/NowMintingSection.tsx
Layout/text spacing tweaks in HeroHeader and CarouselHeader; HomePageContent now uses SubmissionCarouselSection; NowMintingDetails: formatEth returns "N/A" for non-positive values; NowMintingStatsGrid: use dynamic mintPrice via formatClaimCost; minor padding adjustments.
Boosted card icons & small UI
components/drops/view/BoostedDropCard.tsx, components/home/boosted/BoostedDropCardHome.tsx
Replaced inline SVG arrow with ChevronRightIcon; added decorative Square2StackIcon overlay when media exists in BoostedDropCardHome.
Content display styling
components/waves/drops/ContentDisplay.tsx
Removed tw-break-all from container classes affecting text wrapping behavior.

Sequence Diagram

sequenceDiagram
    actor User
    participant SubmissionCarouselSection as SubmissionCarouselSection
    participant SubmissionCarousel as SubmissionCarousel
    participant CarouselActiveItemVote as CarouselActiveItemVote
    participant Autoplay as CarouselAutoplay

    User->>SubmissionCarouselSection: Pointer enters / moves inside
    SubmissionCarouselSection->>SubmissionCarouselSection: set isPointerInside = true
    SubmissionCarouselSection->>Autoplay: pause() (via carousel ref)

    User->>CarouselActiveItemVote: Click vote
    CarouselActiveItemVote->>CarouselActiveItemVote: handleOpenVote()
    CarouselActiveItemVote->>SubmissionCarouselSection: onVoteOpen()
    SubmissionCarouselSection->>Autoplay: pause()

    User->>CarouselActiveItemVote: Close vote modal
    CarouselActiveItemVote->>SubmissionCarouselSection: onVoteClose()
    SubmissionCarouselSection->>Autoplay: resume()

    User->>SubmissionCarouselSection: Pointer leaves
    SubmissionCarouselSection->>SubmissionCarouselSection: set isPointerInside = false
    SubmissionCarouselSection->>Autoplay: resume()
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • PR #1719: Large changes to the same carousel/home components (SubmissionCarouselSection, SubmissionCarousel, SubmissionArtworkCard, carousel item components) — strong overlap.
  • PR #1706: Direct edits to BoostedDropCard replacing inline SVG with ChevronRightIcon — same icon change.

Suggested reviewers

  • simo6529
  • prxt6529

"🐰
The slides now hum with gentle grace,
I pause when paws enter the space,
Votes unfold, the autoplay rests,
Images scale in tidy nests,
A small hop for code — a joyful race!"

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Submission carousel ux improvements' accurately describes the main focus of the changeset, which refactors the carousel component structure and adds UI enhancements like responsive rendering, autoplay control, voting modal integration, and visual improvements.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@components/home/boosted/BoostedDropCardHome.tsx`:
- Around line 71-77: The Square2StackIcon is rendered whenever any media exists,
but it should only indicate multiple media items; update the render condition to
check the full array length (use part?.media?.length > 1) instead of the
single-item `media` value (currently derived from part?.media[0]); locate the
JSX that renders Square2StackIcon in BoostedDropCardHome (references:
Square2StackIcon, part?.media, media/part?.media[0]) and gate the icon behind
that length check so it only appears when there are multiple media entries.
🧹 Nitpick comments (2)
components/home/SubmissionCarouselSection.tsx (1)

75-77: Consider extracting complex responsive classes.

The inline media query strings on lines 75 and 77 are quite verbose and reduce readability. Consider extracting these to named CSS classes or Tailwind @apply directives if this pattern is reused.

components/home/carousel/SubmissionArtworkCard.tsx (1)

14-15: Consider removing redundant type union.

The | undefined is redundant since the optional property marker ? already implies the type can be undefined.

✨ Suggested simplification
 interface SubmissionArtworkCardProps {
   readonly drop: ExtendedDrop;
   readonly isActive?: boolean;
-  readonly imageScale?: ImageScale | undefined;
+  readonly imageScale?: ImageScale;
   readonly renderMode?: "full" | "preview" | "placeholder";
 }

Comment thread components/home/boosted/BoostedDropCardHome.tsx
Signed-off-by: ragnep <ragneinfo@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/home/now-minting/NowMintingSection.tsx (1)

31-36: Pre-existing bug: Skeleton items won't render.

This code has an issue (not introduced by this PR): new Array(4) creates an array with empty slots, and .map() skips empty slots. Additionally, the spread syntax {...} inside JSX attempts to spread as props rather than render children.

🐛 Suggested fix
-                  {...new Array(4).map((_, i) => (
+                  {Array.from({ length: 4 }).map((_, i) => (
🧹 Nitpick comments (2)
components/home/carousel/SubmissionCarousel.tsx (2)

14-15: Memo wrap is sensible; ensure prop stability to benefit.

Memo only helps when props are referentially stable—consider memoizing onActiveDropChange in the parent if it’s recreated each render.

Also applies to: 38-41, 275-275


4-7: Confirm breakpoint alignment for imageScale.

The 1023px media query drives imageScale; make sure it matches the Tailwind/container breakpoints used in layout to avoid scale flicker at boundaries.

Also applies to: 45-45, 112-114

@ragnep ragnep merged commit a996362 into main Jan 19, 2026
7 checks passed
@ragnep ragnep deleted the ui-fixes-homepage branch January 19, 2026 10:41
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