From 1acf8fb30e9f8f9ca0131e4cd07515528aca8d64 Mon Sep 17 00:00:00 2001 From: TomasGottvald Date: Sat, 21 Dec 2024 00:24:01 +0100 Subject: [PATCH 1/4] [SSP-2867] - fix unwanted skeleton switch on banner click --- storefront/components/Blocks/Banners/BannersSlider.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/storefront/components/Blocks/Banners/BannersSlider.tsx b/storefront/components/Blocks/Banners/BannersSlider.tsx index 0cf65e57f1..f48998d8b1 100644 --- a/storefront/components/Blocks/Banners/BannersSlider.tsx +++ b/storefront/components/Blocks/Banners/BannersSlider.tsx @@ -91,6 +91,7 @@ export const BannersSlider: FC = ({ sliderItems }) => { href={sliderItems[bannerSliderState.sliderPosition].link} title={sliderItems[bannerSliderState.sliderPosition].name} onClick={handleClick} + onClickExtended={handleClick} onMouseEnter={checkAndClearInterval} onMouseUp={handleClick} onMouseLeave={() => { From 8ee81fc2dd1b6371e7b20cbf68f445b9df681f42 Mon Sep 17 00:00:00 2001 From: Tomas Chlebek Date: Fri, 27 Dec 2024 12:07:26 +0100 Subject: [PATCH 2/4] fixed graphic glitches on mobile phone --- storefront/components/Blocks/Product/ProductsSlider.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/storefront/components/Blocks/Product/ProductsSlider.tsx b/storefront/components/Blocks/Product/ProductsSlider.tsx index 531230babb..1873ef7afb 100644 --- a/storefront/components/Blocks/Product/ProductsSlider.tsx +++ b/storefront/components/Blocks/Product/ProductsSlider.tsx @@ -59,7 +59,9 @@ export const ProductsSlider: FC = ({ }, [products.length]); useEffect(() => { - handleScroll(activeIndex); + if (!isMobile) { + handleScroll(activeIndex); + } }, [activeIndex]); const handleScroll = async (selectedActiveIndex: number) => { @@ -85,7 +87,7 @@ export const ProductsSlider: FC = ({ return; } - const newActiveIndex = isFirstSlide ? productElementRefs!.length - 4 : prevIndex; + const newActiveIndex = isFirstSlide ? productElementRefs!.length - visibleSliderItems : prevIndex; if (!isTextSelected()) { setActiveIndex(newActiveIndex); @@ -94,7 +96,7 @@ export const ProductsSlider: FC = ({ const handleNext = () => { const nextIndex = activeIndex + 1; - const isEndSlide = nextIndex + visibleSliderItems > productElementRefs!.length; + const isEndSlide = nextIndex > productElementRefs!.length - visibleSliderItems; if (isMobile && isEndSlide) { return; From f748f1c1d0d7c4e830f920d9c0b2d48ba6fb0233 Mon Sep 17 00:00:00 2001 From: Tomas Chlebek Date: Fri, 27 Dec 2024 13:15:59 +0100 Subject: [PATCH 3/4] updated blog layout for article list and detail --- .../components/Blocks/BlogSignpost/BlogSignpost.tsx | 12 ++++++------ storefront/components/Layout/BlogLayout.tsx | 6 +++--- storefront/components/Pages/Article/ArticleTitle.tsx | 2 +- .../Pages/BlogCategory/BlogArticlesList.tsx | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/storefront/components/Blocks/BlogSignpost/BlogSignpost.tsx b/storefront/components/Blocks/BlogSignpost/BlogSignpost.tsx index dba2e7d0f1..6db4b4e356 100644 --- a/storefront/components/Blocks/BlogSignpost/BlogSignpost.tsx +++ b/storefront/components/Blocks/BlogSignpost/BlogSignpost.tsx @@ -26,19 +26,19 @@ export const BlogSignpost: FC = ({ blogCategoryItems, activeI return ( <>
-
+
@@ -48,8 +48,8 @@ export const BlogSignpost: FC = ({ blogCategoryItems, activeI className={twJoin( 'flex w-full flex-col gap-y-2.5', isBlogSignpostOpen - ? 'max-vl:absolute max-vl:top-full max-vl:z-aboveOverlay max-vl:mt-1 max-vl:rounded-2xl max-vl:bg-background max-vl:p-5' - : 'max-vl:hidden', + ? 'max-xl:absolute max-xl:top-full max-xl:z-aboveOverlay max-xl:mt-1 max-xl:rounded-2xl max-xl:bg-background max-xl:p-5' + : 'max-xl:hidden', )} > {blogCategoryItems.map((blogCategory) => { diff --git a/storefront/components/Layout/BlogLayout.tsx b/storefront/components/Layout/BlogLayout.tsx index 4f7c83e6ca..1646a584c9 100644 --- a/storefront/components/Layout/BlogLayout.tsx +++ b/storefront/components/Layout/BlogLayout.tsx @@ -12,9 +12,9 @@ export const BlogLayout: FC = ({ children, activeCategoryUuid } return (
-
-
{children}
-
+
+
{children}
+

{children}

; +export const ArticleTitle: FC = ({ children }) =>

{children}

; diff --git a/storefront/components/Pages/BlogCategory/BlogArticlesList.tsx b/storefront/components/Pages/BlogCategory/BlogArticlesList.tsx index ef4724e6e2..7a992b59f7 100644 --- a/storefront/components/Pages/BlogCategory/BlogArticlesList.tsx +++ b/storefront/components/Pages/BlogCategory/BlogArticlesList.tsx @@ -21,7 +21,7 @@ export const BlogArticlesList: FC = ({ blogArticles, isLo return (