From 87209946590d28f5236a097255cf10c08a30048e Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Thu, 23 Jan 2025 08:50:44 +0200 Subject: [PATCH] WooCommerce Installer: Further cleanup (#98740) --- client/components/cta-section/index.tsx | 82 ----------------------- client/components/masonry-wave/index.jsx | 66 ------------------ client/components/masonry-wave/style.scss | 23 ------- config/development.json | 1 - config/horizon.json | 1 - config/production.json | 1 - config/stage.json | 1 - config/wpcalypso.json | 1 - 8 files changed, 176 deletions(-) delete mode 100644 client/components/cta-section/index.tsx delete mode 100644 client/components/masonry-wave/index.jsx delete mode 100644 client/components/masonry-wave/style.scss diff --git a/client/components/cta-section/index.tsx b/client/components/cta-section/index.tsx deleted file mode 100644 index ee6c8b71c2447..0000000000000 --- a/client/components/cta-section/index.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { Button } from '@automattic/components'; -import styled from '@emotion/styled'; -import { TranslateResult } from 'i18n-calypso'; -import { ReactElement } from 'react'; - -const Container = styled.div` - display: grid; - grid-template-columns: 1fr 1fr; - align-items: center; - min-height: 500px; - column-gap: 2em; - row-gap: 2em; - - @media ( max-width: 660px ) { - grid-template-columns: 1fr; - } -`; - -const CtaContainer = styled.div` - justify-self: start; - - @media ( max-width: 660px ) { - margin-bottom: 4em; - text-align: center; - } -`; - -const ContentContainer = styled.div` - justify-self: end; -`; - -const Headline = styled.h3` - font-size: 16px; - padding-bottom: 10px; -`; - -const Title = styled.h4` - font-family: Recoleta; - color: var( --studio-gray-90 ); - font-size: 2.81rem; - line-height: 1.19; - padding-bottom: 1em; -`; - -interface Props { - title?: TranslateResult; - headline?: TranslateResult; - buttonText: TranslateResult; - buttonDisabled: boolean; - buttonAction: () => void; - notice: ReactElement | null; - ctaRef?: React.RefObject< HTMLButtonElement >; - children?: React.ReactNode; -} - -const CtaSection: React.FunctionComponent< Props > = ( props ) => { - const { - children, - title, - headline, - buttonText, - buttonDisabled = false, - buttonAction, - notice = null, - ctaRef, - } = props; - return ( - - - { title } - { headline } - { notice } - - - { children } - - ); -}; - -export default CtaSection; diff --git a/client/components/masonry-wave/index.jsx b/client/components/masonry-wave/index.jsx deleted file mode 100644 index bca0ff019b230..0000000000000 --- a/client/components/masonry-wave/index.jsx +++ /dev/null @@ -1,66 +0,0 @@ -import './style.scss'; -import { useDesktopBreakpoint } from '@automattic/viewport-react'; - -// fills the columns with images LTR to imitate the CSS grid behavior -const fillColumnsWithImages = ( amountOfColumns, images ) => { - const columns = Array( amountOfColumns ); - let columnIndex = 0; - - images.forEach( ( image ) => { - if ( columnIndex === amountOfColumns ) { - columnIndex = 0; - } - - if ( ! columns[ columnIndex ] ) { - columns[ columnIndex ] = []; - } - - columns[ columnIndex ].push( image ); - - columnIndex++; - } ); - - return columns; -}; - -const MasonryWaveElement = ( props ) => { - const { image } = props; - - return ( - { - ); -}; - -const MasonryWaveColumn = ( props ) => { - const { images } = props; - - return ( -
- { images.map( ( image, index ) => ( - - ) ) } -
- ); -}; - -const MasonryWave = ( props ) => { - const isDesktop = useDesktopBreakpoint(); - - const { numberOfColumns, images } = props; - const numberOfDesktopColumns = numberOfColumns?.desktop ?? 2; - const numberOfMobileColumns = numberOfColumns?.mobile ?? numberOfDesktopColumns; - const amountOfColumns = isDesktop ? numberOfDesktopColumns : numberOfMobileColumns; - const columns = fillColumnsWithImages( amountOfColumns, images ); - - const styles = { '--masonry-wave--amountOfColumns': amountOfColumns }; - - return ( -
- { columns.map( ( col, index ) => ( - - ) ) } -
- ); -}; - -export default MasonryWave; diff --git a/client/components/masonry-wave/style.scss b/client/components/masonry-wave/style.scss deleted file mode 100644 index 38e8d5f4decf5..0000000000000 --- a/client/components/masonry-wave/style.scss +++ /dev/null @@ -1,23 +0,0 @@ -@import "@wordpress/base-styles/breakpoints"; -@import "@wordpress/base-styles/mixins"; - -.masonry-wave__container { - display: grid; - grid-template-columns: repeat(var(--masonry-wave--amountOfColumns), 1fr); - grid-auto-rows: minmax(min-content, max-content); - column-gap: 0.75rem; - .masonry-wave__column { - &:nth-child(even) { - padding-top: 1.5rem; - } - - .masonry-wave__element { - box-shadow: 2px 2px 10px #aaa; - margin-bottom: 0.75rem; - - &:last-child { - margin-bottom: 0; - } - } - } -} diff --git a/config/development.json b/config/development.json index 818fc9503d931..88ff50caea172 100644 --- a/config/development.json +++ b/config/development.json @@ -211,7 +211,6 @@ "untangling/hosting-menu": false, "user-management-revamp": true, "videomaker-trial": true, - "woop": false, "woo/passwordless": true, "wpcom-user-bootstrap": false, "yolo/command-palette": true, diff --git a/config/horizon.json b/config/horizon.json index 9492fbb019c50..882d164cd43e3 100644 --- a/config/horizon.json +++ b/config/horizon.json @@ -143,7 +143,6 @@ "use-translation-chunks": true, "user-management-revamp": true, "videomaker-trial": true, - "woop": false, "woo/passwordless": true, "wpcom-user-bootstrap": true, "yolo/command-palette": true, diff --git a/config/production.json b/config/production.json index ce5d57efc4128..68d7ab0bbf4e8 100644 --- a/config/production.json +++ b/config/production.json @@ -178,7 +178,6 @@ "use-translation-chunks": true, "user-management-revamp": true, "videomaker-trial": true, - "woop": false, "woo/passwordless": true, "wpcom-user-bootstrap": true, "yolo/command-palette": true, diff --git a/config/stage.json b/config/stage.json index 7fed340eb759d..0cbbc79ab2cf6 100644 --- a/config/stage.json +++ b/config/stage.json @@ -174,7 +174,6 @@ "use-translation-chunks": true, "user-management-revamp": true, "videomaker-trial": true, - "woop": false, "woo/passwordless": true, "wpcom-user-bootstrap": true, "yolo/command-palette": true, diff --git a/config/wpcalypso.json b/config/wpcalypso.json index 826fe18d91cd5..1836d62312e86 100644 --- a/config/wpcalypso.json +++ b/config/wpcalypso.json @@ -182,7 +182,6 @@ "use-translation-chunks": true, "user-management-revamp": true, "videomaker-trial": true, - "woop": false, "wpcom-user-bootstrap": true, "yolo/command-palette": true, "woocommerce/rebrand-2-0": true