From 40d824ac6d0e1fe7dcd45da8eca78a2b4d1b60d7 Mon Sep 17 00:00:00 2001 From: Liad Yosef Date: Thu, 9 May 2024 17:00:47 +0300 Subject: [PATCH 1/2] import placeholder from 'utopia-api' --- utopia/components.utopia.js | 39 ++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/utopia/components.utopia.js b/utopia/components.utopia.js index f77ec46..8aada0b 100644 --- a/utopia/components.utopia.js +++ b/utopia/components.utopia.js @@ -4,7 +4,6 @@ import { DuplicatedImageWithBackground, Grid, HalfAndHalf, - Placeholder, QuoteWithRating, Row, Section, @@ -37,14 +36,15 @@ import { TestimonialCard } from '../app/routes/_index' const PlaceholderContent = { component: 'Placeholder', - moduleName: '/app/components/Components', + moduleName: 'utopia-api', variants: [], } const RowWithPlaceholdersVariant = { label: 'Row with Placeholders', imports: - 'import { Row, Placeholder } from "/app/components/Components"', + `import { Row } from "/app/components/Components" + import { Placeholder } from "utopia-api"`, code: ` @@ -65,7 +65,8 @@ const SectionVariants = [ { label: 'Section with Placeholder', imports: - 'import { Section, Placeholder } from "/app/components/Components"', + `import { Section } from "/app/components/Components" + import { Placeholder } from "utopia-api"`, code: `
`, @@ -79,7 +80,8 @@ const SectionVariants = [ { label: 'Section with Row', imports: - 'import { Section, Row, Placeholder } from "/app/components/Components"', + `import { Section, Row } from "/app/components/Components" + import { Placeholder } from "utopia-api"`, code: `
@@ -90,7 +92,8 @@ const SectionVariants = [ { label: 'Section with Column', imports: - 'import { Section, Placeholder, Column } from "/app/components/Components"', + `import { Section, Column } from "/app/components/Components" + import { Placeholder } from "utopia-api"`, code: `
`, @@ -99,7 +102,8 @@ const SectionVariants = [ label: 'Hero Section', imports: ` import { Money } from "@shopify/hydrogen" - import { Section, DecorativeClouds, ColorOptionsColumn, Placeholder, Column, Row, HalfAndHalf, TypographyTitle, TrippyButton, Spacer } from "/app/components/Components" + import { Section, DecorativeClouds, ColorOptionsColumn, Column, Row, HalfAndHalf, TypographyTitle, TrippyButton, Spacer } from "/app/components/Components" + import { Placeholder } from "utopia-api" import { Illustration } from "/app/routes/_index" `, code: `
@@ -423,7 +429,8 @@ const SectionVariants = [ const ColumnWithPlaceholdersVariant = { label: 'Column with Placeholders', imports: - "import { Column, Placeholder } from '/app/components/Components'", + `import { Column } from '/app/components/Components' + import { Placeholder } from 'utopia-api'`, code: ` @@ -638,7 +645,7 @@ const Components = { children: 'not-supported', variants: { label: 'QuoteWithRating', - imports: `import { QuoteWithRating, Placeholder } from "/app/components/Components"`, + imports: `import { QuoteWithRating } from "/app/components/Components"`, code: `} @@ -821,7 +830,9 @@ const Components = { children: 'not-supported', variants: { label: 'HalfAndHalf', - imports: `import { HalfAndHalf, Placeholder } from "/app/components/Components"`, + imports: ` + import { HalfAndHalf } from "/app/components/Components" + import { Placeholder } from "utopia-api"`, code: `} @@ -874,7 +885,7 @@ const Components = { ], }, Placeholder: { - component: Placeholder, + component: Utopia.Placeholder, icon: 'dashedframe', properties: { margin: Utopia.numberControl(), From c7845bc186f5b166c3ececbe4695bc05f014f2d3 Mon Sep 17 00:00:00 2001 From: Liad Yosef Date: Thu, 9 May 2024 17:05:22 +0300 Subject: [PATCH 2/2] remove placeholder import --- app/routes/_index.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/routes/_index.jsx b/app/routes/_index.jsx index efce34e..fcf1b4d 100644 --- a/app/routes/_index.jsx +++ b/app/routes/_index.jsx @@ -20,7 +20,6 @@ import { RecommendedProducts } from '../components/RecommendedProducts' import { loader as loaderTemplate } from './trippy-trails-template' import { connectToMetaObjects as connectToMetaObjectsTemplate } from '../helpers/connect-metaobject' import { Image, Money } from '@shopify/hydrogen' -import { Placeholder } from 'utopia-api' export const loader = loaderTemplate