Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: add new Carousel component #1667

Closed
wants to merge 3 commits into from

Conversation

MartinCupela
Copy link
Contributor

@MartinCupela MartinCupela commented Jul 11, 2022

🎯 Goal

Provide own stream-chat-react carousel that would meet the following:

  1. Enable image swiping on mobile device
  2. Enable image swiping and snapping on desktop resolutions by mouse-dragging the images
  3. Simplify the markup compared to that of react-image-gallery which creates multiple layers of position: relative elements

Depends on:
GetStream/stream-chat-css#147

Todo:

[ ] Tests
....

🛠 Implementation details

Drag-scrolling logic is separated (useDragScrolling) from the basic carousel navigation (useCarouselController). The drag-scrolling logic can be disabled and navigation can be performed with arrow buttons on the sides of the carousel aperture.

🎨 UI Changes

Desktop

carousel_desktop.webm

Mobile

carousel_mobile.webm

# Conflicts:
#	src/components/Message/MessageSimple.tsx
#	src/components/Message/__tests__/MessageText.test.js
Base automatically changed from theming-v2 to develop September 9, 2022 08:41
@arnautov-anton arnautov-anton changed the base branch from develop to master October 13, 2023 13:27
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