coingaming / moon-design

Moon Design System for React
https://moon.io/
MIT License
273 stars 27 forks source link

Carousel: incorrect switching between slides #2531

Open NatkaDzoll opened 10 months ago

NatkaDzoll commented 10 months ago

Describe the Bug

Carousel with large slide width, step={1} On the first flip, the next slide is set in the center, but the subsequent flip scrolls almost to the end of the slides, skipping a few.

To Reproduce

Steps to reproduce the behavior

  1. Go to '(https://bitcasino.io/bitcoin-breakdown)' - migration page to app router
  2. Click on 'right arrow'
  3. Click again on 'right arrow'
  4. See error

Expected Behavior

A step-by-step transition is expected

Possible Solution

Not obligatory, but suggest a fix/reason for the bug or ideas how to implement the addition or change.

Screenshots

If applicable, add screenshots to help explain your problem.

Your Environment

Additional Context

Add any other context about the problem here.

karl-kallavus commented 10 months ago

@NatkaDzoll To address the scrolling issue with the carousel, our team plans to adjust the scrolling algorithm during the next sprint.

This modification is aimed to make the carousel scroll amount equal to the width of one slide, regardless of the slide's current width, in order to provide a consistent user experience.

Sprint Details:

Enhance the functionality and user experience of the carousel.

Tasks:

1) Fix carousel scrolling issue:

Also during the sprint following things will be fixed:

2) Placeholder does not support JSX.Element:

3) Refactor the carousel component to provide more flexibility in the positioning of indicators.

4) Resolve carousel bug that makes scroll visible:

5) Optimize carousel indicators display when there are many items, especially on mobile: