From 5c38dd3160f938d15608910a0539f4ec2995a6c4 Mon Sep 17 00:00:00 2001 From: SG-Noxoreos Date: Mon, 1 Apr 2019 10:42:42 +0200 Subject: [PATCH 1/3] PWA-1781: Updated changelog file to reflect changes from PWA version 6.4.0 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f3b8b42a5..d49e117cc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## [v6.4.0](https://github.com/shopgate/theme-gmd/compare/v6.3.1...v6.4.0) (2019-04-05) #### :rocket: Enhancement +* [#589](https://github.com/shopgate/pwa/pull/589) The cart now display correct and consistent data in the totals. ([@devbucket](https://github.com/devbucket)) +* [#588](https://github.com/shopgate/pwa/pull/588) Add portals wrapping the view content ([@alexbridge](https://github.com/alexbridge)) * [#577](https://github.com/shopgate/pwa/pull/577) Implementation of the Barcode Scanner UI ([@fkloes](https://github.com/fkloes)) * [#573](https://github.com/shopgate/pwa/pull/573) Show QR Code Scan results ([@alexbridge](https://github.com/alexbridge)) * [#574](https://github.com/shopgate/pwa/pull/574) Unused selectors for UI and toast messages have been removed. ([@devbucket](https://github.com/devbucket)) @@ -12,6 +14,7 @@ * [#564](https://github.com/shopgate/pwa/pull/564) Restructured PaymentBar and added Portals around cart totals ([@fkloes](https://github.com/fkloes)) #### :bug: Bug Fix +* [#590](https://github.com/shopgate/pwa/pull/590) Patch for e2e tests for new slider implementation ([@alexbridge](https://github.com/alexbridge)) * [#571](https://github.com/shopgate/pwa/pull/571) Refactored the Sliders to use the new react-id-swiper version ([@devbucket](https://github.com/devbucket)) * [#576](https://github.com/shopgate/pwa/pull/576) Sentry.io level / severity is not send correctly ([@alexbridge](https://github.com/alexbridge)) * [#575](https://github.com/shopgate/pwa/pull/575) The routeDidChange$ stream is now an alias of routeDidEnter$ since it is already deprecated. ([@devbucket](https://github.com/devbucket)) @@ -19,6 +22,9 @@ * [#567](https://github.com/shopgate/pwa/pull/567) Add shop number back to localstorage key of redux store ([@alexbridge](https://github.com/alexbridge)) * [#562](https://github.com/shopgate/pwa/pull/562) Liveshopping widget localization to german ([@alexbridge](https://github.com/alexbridge)) +#### :nail_care: Polish +* [#586](https://github.com/shopgate/pwa/pull/586) Added changelog starting from PWA version 6.0.0 ([@SG-Noxoreos](https://github.com/SG-Noxoreos)) + ## [v6.3.1](https://github.com/shopgate/theme-gmd/compare/v6.3.0...v6.3.1) (2019-03-20) From 317466fd8d7ed5a6bca3497ae73038169d4ab79b Mon Sep 17 00:00:00 2001 From: SG-Noxoreos Date: Mon, 1 Apr 2019 17:38:51 +0200 Subject: [PATCH 2/3] PWA-1745: Fixed swiper, so that loops function properly by manually switching to the correct react slide, when a duplicated is about to be shown. --- libraries/common/components/Swiper/index.jsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libraries/common/components/Swiper/index.jsx b/libraries/common/components/Swiper/index.jsx index cd17b3d796..41d70a5764 100644 --- a/libraries/common/components/Swiper/index.jsx +++ b/libraries/common/components/Swiper/index.jsx @@ -32,12 +32,29 @@ function Swiper(props) { disabled, } = props; + /** @type {Swiper} swiper An instance of the Swiper. */ const [swiper, setSwiper] = useState(null); useEffect(() => { if (swiper !== null) { swiper.update(); swiper.on('slideChange', () => onSlideChange(swiper.realIndex)); + swiper.on('transitionEnd', () => { + // In loop mode the Swiper duplicates elements, which are not in the virtual DOM + if (loop) { + // Skip duplicated elements + if (swiper.activeIndex < 1) { + swiper.slideToLoop(children.length - 1, 0); + } else if (swiper.activeIndex > children.length) { + swiper.slideToLoop(0, 0); + } + } + }); + swiper.on('beforeDestroy', () => { + swiper.off('slideChange'); + swiper.off('transitionEnd'); + swiper.off('beforeDestroy'); + }); } }, [swiper]); From 6f8128bdd41532ce8c07c9826682f80cd6493267 Mon Sep 17 00:00:00 2001 From: SG-Noxoreos Date: Mon, 1 Apr 2019 18:21:21 +0200 Subject: [PATCH 3/3] PWA-1781: Updated changelog for PWA 6.4.0 release and removed a wrong JSDoc type comment in the swiper react component. --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CHANGELOG.md | 3 ++- libraries/common/components/Swiper/index.jsx | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b8133a0228..4282b923d8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,4 +15,4 @@ Please add an "x" into the option that is relevant: ## How to test it -Please describe here any specialty that the tester should be aware of. \ No newline at end of file +Please describe here any specialty that the tester should be aware of. diff --git a/CHANGELOG.md b/CHANGELOG.md index d49e117cc3..b179e56e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ #### :rocket: Enhancement * [#589](https://github.com/shopgate/pwa/pull/589) The cart now display correct and consistent data in the totals. ([@devbucket](https://github.com/devbucket)) -* [#588](https://github.com/shopgate/pwa/pull/588) Add portals wrapping the view content ([@alexbridge](https://github.com/alexbridge)) +* [#588](https://github.com/shopgate/pwa/pull/588) Add portals wrapping the View Content ([@alexbridge](https://github.com/alexbridge)) * [#577](https://github.com/shopgate/pwa/pull/577) Implementation of the Barcode Scanner UI ([@fkloes](https://github.com/fkloes)) * [#573](https://github.com/shopgate/pwa/pull/573) Show QR Code Scan results ([@alexbridge](https://github.com/alexbridge)) * [#574](https://github.com/shopgate/pwa/pull/574) Unused selectors for UI and toast messages have been removed. ([@devbucket](https://github.com/devbucket)) @@ -14,6 +14,7 @@ * [#564](https://github.com/shopgate/pwa/pull/564) Restructured PaymentBar and added Portals around cart totals ([@fkloes](https://github.com/fkloes)) #### :bug: Bug Fix +* [#593](https://github.com/shopgate/pwa/pull/593) Fixed swiper open link actions ([@SG-Noxoreos](https://github.com/SG-Noxoreos)) * [#590](https://github.com/shopgate/pwa/pull/590) Patch for e2e tests for new slider implementation ([@alexbridge](https://github.com/alexbridge)) * [#571](https://github.com/shopgate/pwa/pull/571) Refactored the Sliders to use the new react-id-swiper version ([@devbucket](https://github.com/devbucket)) * [#576](https://github.com/shopgate/pwa/pull/576) Sentry.io level / severity is not send correctly ([@alexbridge](https://github.com/alexbridge)) diff --git a/libraries/common/components/Swiper/index.jsx b/libraries/common/components/Swiper/index.jsx index 41d70a5764..38f019041b 100644 --- a/libraries/common/components/Swiper/index.jsx +++ b/libraries/common/components/Swiper/index.jsx @@ -32,7 +32,6 @@ function Swiper(props) { disabled, } = props; - /** @type {Swiper} swiper An instance of the Swiper. */ const [swiper, setSwiper] = useState(null); useEffect(() => {