-
Notifications
You must be signed in to change notification settings - Fork 164
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
react-carousel 2.0: Introduce carousel plugins #586
react-carousel 2.0: Introduce carousel plugins #586
Conversation
* Rewrite carousel to use hooks * Remove old unit tests * introduce jest * introduce yarn workspaces * remove .npmrc * update node version in .nvmrc * update README.md Update peerDependencies Fix some linting errors * Fix all linting errors * Move simulateEvent function to separate file Fix CI test & publish commands Revert previous .bablerc config Fix publish step Remove not used startMessage.js Remove not used .istanbul.yml Use hook for all event listeners Move onResize logic to separate hook Remove not used interval constant Move function from carousel component to hooks/tools Create POF of carouselSlidesPerPage plugin Add POF for infinite plugin Fix controlled component Add missing propTypes Fix resizing carousel Introduce strategies Add ClickToChange plugin Use Recoil for state management Move plugins to their own directory Move changing slide behavior logic to recoil state Add autoplay plugin Add rtl plugin Add centered plugin Add slidesPerScroll plugin Add arrowsPlugin Add keepDirectionWhenDragging plugin Fix controlled component Remove simple dots from docs Add plugin resolver Allow to pass builtin plugins as strings Rewrite CarouselItem to func component Add arrows plugin to rtl docs example Fix RTL plugin with arrows Add support for responsive carousel Fix: controlled component with clickToChange and arrows plugins Fix: dont enable transition on component mount Fix fast changing slides in infinite plugin * Fix autoplay with infinite race condition when autoplay and animationSpeed values are the same * Refactor infinite plugin Fix RTL with infinite plugin fix typos and linting errors Enable e2e tests Fix swiping left in infinite mode Add custom class support for dots Add resize observer Add support for flex container Add support for resizing carousel Add contributors guide Fix slides flickering when carousel loads [renovate] Update NPM dependencies [189] test skip and unskip scripts fix: only add drag event listeners when dragging is enabled 1.13.12 [renovate] Update dependency html-webpack-plugin to v4 [renovate] Update NPM dependencies [renovate] Update NPM dependencies [renovate] Update gatsby 1.13.16 [renovate] Update NPM dependencies [renovate] Update gatsby 1.13.18 [renovate] Update dependency gatsby to v2.20.7 [renovate] Update NPM dependencies [renovate] Update dependency gatsby to v2.20.8 [renovate] Update NPM dependencies Revert "fix: only add drag event listeners when dragging is enabled" This reverts commit 923fe44. [392] fix click to change [392] improve formatting Revert "Revert "fix: only add drag event listeners when dragging is enabled"" This reverts commit b8f8156. [392] fix selecting text [renovate] Update cypress/included Docker tag to v4.3.0 [renovate] Update dependency gatsby to v2.20.10 [renovate] Update NPM dependencies [renovate] Update dependency chalk to v4 docs-www/reduxcache* in .gitignore add className support for Dots bump version 1.13.22 revert react-carousel version on docs-www change back patch version add more to readME fix className retrieval remove default value 1.13.23 1.13.24 remove unneeded code remove unused files require node>=12 1.13.25 Revert "remove unneeded code" 1.13.26 Add badges Add coverage info Change order of badges Add badges, change color and order Replace links for badges Change link for activity badge fix: pass null instead of boolean to drag event listener if disabled fail for invalid branch name fix CI better workflow update workflow eat error check add origin remove origin ci skip no diff clean up sleep fix CI message allow master 1.13.27 [ci skip] update @brainhubeu/react-carousel in docs-www test/cypress/screenshots/ in .gitignore ci skip when updating itself in docs update pull-request-template update renovate branch 1.13.28 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.29 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.30 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.31 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update circleci/node Docker tag to v12.16.2 1.13.32 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] more error-prone publishing to NPM skip checkout in check_branch_name 1.13.33 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.34 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update NPM dependencies 1.13.36 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update cypress/included Docker tag to v4.4.0 1.13.37 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.38 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Add carousel gif Add link for the demo gif Replace carousel gif with smoother version 1.13.39 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.40 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Increase test coverage (#451) * Migrate to jest and increase test coverage * Remove not used methods from Carousel * Generate lcov report * Add coverage badge * Fix CI config * Update yarn.lock * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * toEqual(true) -> toBeTruthy(); * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-Authored-By: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> * Update test/unit/carousel.test.js Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl> 1.13.41 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Using react-resize-observer to observe carousel width Update yarn lockfile Readme update Fix typos, add default props values Removed unnecessary sign in README.md Fixed image path to display logo.gif properly, fixed gifs link (now they are directing to the demo) 1.13.42 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Erase cursor from carousel logo 1.13.43 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.13.44 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] fix deployment of testing environment fix auto push [renovate] Update circleci/node Docker tag to v12.16.3 1.13.45 [ci skip] 1.13.46 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [FIX] Add itemWidth to list of responsive props 1.13.47 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] fix tests Adds width to the carousel container, adds example in docs [FIX] Add itemWidth to list of responsive props 1.13.47 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Adds width to the carousel container, adds example in docs Addressed PR feedback with flex row update envinfo info 1.13.48 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] add the remaining decisions to decision log fix a typo [renovate] Update cypress/included Docker tag to v4.5.0 1.13.49 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] move labels to contributing renovate monthly 1.14.0 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.15.0 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Changed divs to button tags in dots components for proper HTML validation 1.15.1 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.15.2 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] README - move running local demo to Contributing update contributing add local URL 1.15.3 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] refactoring example simplify container example Revert "simplify container example" This reverts commit 4244942. fix: Adding 'rtl' to breakpoints prop-type shape 1.15.4 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Usage container wrapper example Update docs/examples/container.md 1.15.5 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] severity labels 1.16.0 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] add workflow to readme move contribution guide to docs [renovate] Update cypress/included Docker tag to v4.7.0 1.16.1 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update circleci/node Docker tag to v12.17.0 1.16.2 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update NPM dependencies fix lint 1.16.3 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] branch prefixes 1.17.0 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] update description 1.18.0 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update NPM dependencies 1.18.2 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] allow dependabot/ branch prefix 1.18.3 [ci skip] Bump websocket-extensions from 0.1.3 to 0.1.4 in /docs-www Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](faye/websocket-extensions-node@0.1.3...0.1.4) Signed-off-by: dependabot[bot] <support@github.com> update @brainhubeu/react-carousel in docs-www [ci skip] 1.18.4 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] fix ci message 1.18.5 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] check uploading coverage 1.18.6 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] update table of contents in README missing space 1.18.7 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] fix wording in workflow [FIX] Allow onChange callback when carousel is not controlled fix lint 1.18.8 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.18.9 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] add license-auditor license directory add @angular/forms to check license-auditor blacklist MIT non-empty dangerfile.js add to whitelist Fixes miss justification on iOS Fix: iOS safari doesn't shrunk images Fix: animation when loading initial carousel Observe width when loading webpage from scratch Avoid jumping on iOS safari Update yarn lockfile Fixed blinking for iOS 12 Fixed blinking on iOS 12 Fixed fast scroll issue Remove unnecessary id for carousel item 1.18.10 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] add CC-BY-4.0 to whitelist add CC0-1.0 to whitelist add (MIT OR CC0-1.0) to whitelist add CC-BY-3.0 to whitelist add others to whitelist and sort add MIT,Apache2 to whitelist add AFLv2.1 to whitelist add Apache2 to whitelist add all other licences to blacklist allow Unlicense check no-license-example upgrade no-license-example upgrade no-license-example.. upgrade no-license-example... blacklist UNKNOWN clean up fix click to change tests 1.18.11 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] show version in docs show version for master modify PR title after finished deployment fix API PR URL keep the same place fix choosing page remove bug break last free fix finding free page fix first free fix no place condition fix or exit 1 skipping deploy to a testing environment on master 1.18.12 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.19.0 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] update @brainhubeu/license-auditor 1.19.1 [ci skip] 1.19.1 [ci skip] 1.19.2 [ci skip] 1.19.1 [ci skip] 1.19.3 [ci skip] 1.19.2 [ci skip] 1.19.4 [ci skip] 1.19.3 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.19.5 [ci skip] 1.19.4 [ci skip] 1.19.4 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.19.6 [ci skip] 1.19.5 [ci skip] 1.19.5 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.19.7 [ci skip] 1.19.6 [ci skip] 1.19.6 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.19.8 [ci skip] 1.19.7 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] 1.19.9 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update cypress/included Docker tag to v4.9.0 1.19.10 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update circleci/node Docker tag to v12.18.2 1.19.11 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] [renovate] Update NPM dependencies 1.19.13 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Fix error: Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element' (#584) 1.19.14 [ci skip] update @brainhubeu/react-carousel in docs-www [ci skip] Fixes after merging changes from carousel 1.0
# Conflicts: # .circleci/config.yml # README.md # cypress/integration/ClickToChange.test.js # docs-www/package.json # docs-www/yarn.lock # package.json # src/components/Carousel.js # src/components/CarouselDots.js # src/components/CarouselItem.js # src/components/CarouselWrapper.js # test/unit/carousel.test.js # yarn.lock
|
f5d46fb
to
12d99a6
Compare
5513fbd
to
184173a
Compare
0966a6a
to
ec3da32
Compare
in the following example, rtl infinite autoplay works:
so now everything, besides the issues already existent on v1, works on desktop.
Video: https://drive.google.com/file/d/1dOx29cxFRZvMjcrw5wUoGSxZK9AzjRmx/view |
The first issue isn't a mobile issue but Safari browser issue. It seems swiping left in infinite mode doesn't work. I can also reproduce it on v1. Fixing it is important but shouldn't be a blocker especially it also occurs in v1 now Custom arrows page is just an example that shows you can create any item for navigation you want. Changing these icons to be more reachable for mobile users would be a nice addition but in beta release, we should focus on urgent issues only |
Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl>
Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl>
Co-authored-by: piotr-s-brainhub <piotr.sroczkowski@brainhub.pl>
besides the issues already occurring on v1, I cannot find now any other issues (desktop & mobile) |
Deployed to https://beghp.github.io/gh-pages-rc-15
This breaking change introduces carousel plugins a new way to modify and extend react-carousel behavior.
You can find more details about this feature in the new section in docs
Proposed v1 -> v2 migration guide