Skip to content

Reverse carousel slide direction on prev arrow - #112

Merged
dmnyc merged 1 commit into
masterfrom
fix/carousel-back-direction
Apr 30, 2026
Merged

Reverse carousel slide direction on prev arrow#112
dmnyc merged 1 commit into
masterfrom
fix/carousel-back-direction

Conversation

@dmnyc

@dmnyc dmnyc commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The featured-market carousel always animated content in from the right, so clicking the back arrow advanced the index backward but visually slid the new card the wrong way.
  • Track direction in the store: prev sets "prev", next and auto-advance set "next".
  • Apply a mirrored keyframe (-80% → 0) when direction is "prev" so back navigation slides in from the left.

Test plan

  • Click the back arrow on the trending carousel; new card slides in from the left.
  • Click the next arrow; new card slides in from the right (unchanged).
  • Wait for auto-advance to fire; new card slides in from the right.
  • With prefers-reduced-motion enabled, neither direction animates.

The featured-market carousel always animated content in from the
right. Clicking the back arrow advanced the index backward but
visually slid the new card the wrong way. Track direction in the
store so the prev arrow uses a mirrored keyframe (-80% → 0) while
auto-advance and the next arrow keep the original direction.
@dmnyc
dmnyc merged commit b163565 into master Apr 30, 2026
3 checks passed
@dmnyc
dmnyc deleted the fix/carousel-back-direction branch April 30, 2026 18:59
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.

1 participant