Skip to content

A free and open-source block-based email template builder.

Adjustments to sample templates and adding links to learn more and GitHub project (#44)

Jordan Isip9749644c1d98
diff --git a/packages/editor-sample/index.html b/packages/editor-sample/index.html
index d8c1abf..9204496 100644
--- a/packages/editor-sample/index.html
+++ b/packages/editor-sample/index.html
@@ -5,7 +5,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="/src/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/src/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/src/favicon/favicon-16x16.png" />
- <meta name="viewport" content="width=900, initial-scale=1.0" />
+ <meta name="viewport" content="width=900" />
<meta name="description" content="EmailBuilder.js interactive playground. Brought to you by Waypoint." />
<title>EmailBuilder.js &mdash; Free and Open Source Template Builder</title>
<style>
diff --git a/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/AvatarSidebarPanel.tsx b/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/AvatarSidebarPanel.tsx
index 0d97b7d..ae5e32f 100644
--- a/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/AvatarSidebarPanel.tsx
+++ b/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/AvatarSidebarPanel.tsx
@@ -58,15 +58,13 @@ export default function AvatarSidebarPanel({ data, setData }: AvatarSidebarPanel
</RadioGroupInput>
<TextInput
label="Image URL"
- helperText="Leave blank to use fallback text."
defaultValue={imageUrl}
onChange={(imageUrl) => {
updateData({ ...data, props: { ...data.props, imageUrl } });
}}
/>
<TextInput
- label="Fallback text"
- helperText="Automatically truncates to 2 characters max."
+ label="Alt text"
defaultValue={alt}
onChange={(alt) => {
updateData({ ...data, props: { ...data.props, alt } });
diff --git a/packages/editor-sample/src/App/SamplesDrawer/index.tsx b/packages/editor-sample/src/App/SamplesDrawer/index.tsx
index bd566f1..18782ef 100644
--- a/packages/editor-sample/src/App/SamplesDrawer/index.tsx
+++ b/packages/editor-sample/src/App/SamplesDrawer/index.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import { Box, Button, Drawer, Link, Stack, Typography } from '@mui/material';
+import { Box, Button, Divider, Drawer, Link, Stack, Typography } from '@mui/material';
import { useSamplesDrawerOpen } from '../../documents/editor/EditorContext';
@@ -23,14 +23,10 @@ export default function SamplesDrawer() {
>
<Stack spacing={3} py={1} px={2} width={SAMPLES_DRAWER_WIDTH} justifyContent="space-between" height="100%">
<Stack spacing={2} sx={{ '& .MuiButtonBase-root': { width: '100%', justifyContent: 'flex-start' } }}>
- <Button
- size="small"
- href="https://www.usewaypoint.com/open-source/emailbuilderjs"
- target="_blank"
- sx={{ fontSize: 16 }}
- >
+ <Typography variant="h6" component="h1" sx={{ p: 0.75 }}>
EmailBuilder.js
- </Button>
+ </Typography>
+
<Stack alignItems="flex-start">
<SidebarButton href="#">Empty</SidebarButton>
<SidebarButton href="#sample/one-time-password">One-time passcode (OTP)</SidebarButton>
@@ -39,7 +35,18 @@ export default function SamplesDrawer() {
<SidebarButton href="#sample/subscription-receipt">Subscription receipt</SidebarButton>
<SidebarButton href="#sample/reservation-reminder">Reservation reminder</SidebarButton>
<SidebarButton href="#sample/post-metrics-report">Post metrics</SidebarButton>
- <SidebarButton href="#sample/respond-to-message">Respond to message</SidebarButton>
+ <SidebarButton href="#sample/respond-to-message">Respond to inquiry</SidebarButton>
+ </Stack>
+
+ <Divider />
+
+ <Stack>
+ <Button size="small" href="https://www.usewaypoint.com/open-source/emailbuilderjs" target="_blank">
+ Learn more
+ </Button>
+ <Button size="small" href="https://github.com/usewaypoint/email-builder-js" target="_blank">
+ View on GitHub
+ </Button>
</Stack>
</Stack>
<Stack spacing={2} px={0.75} py={3}>
diff --git a/packages/editor-sample/src/getConfiguration/sample/empty-email-message.ts b/packages/editor-sample/src/getConfiguration/sample/empty-email-message.ts
index d98e7a0..78bd217 100644
--- a/packages/editor-sample/src/getConfiguration/sample/empty-email-message.ts
+++ b/packages/editor-sample/src/getConfiguration/sample/empty-email-message.ts
@@ -4,7 +4,7 @@ const EMPTY_EMAIL_MESSAGE: TEditorConfiguration = {
root: {
type: 'EmailLayout',
data: {
- backdropColor: '#e5e7e5',
+ backdropColor: '#F5F5F5',
canvasColor: '#FFFFFF',
textColor: '#242424',
fontFamily: 'MODERN_SANS',
diff --git a/packages/editor-sample/src/getConfiguration/sample/order-ecommerce.ts b/packages/editor-sample/src/getConfiguration/sample/order-ecommerce.ts
index c860fbf..7f2ce0f 100644
--- a/packages/editor-sample/src/getConfiguration/sample/order-ecommerce.ts
+++ b/packages/editor-sample/src/getConfiguration/sample/order-ecommerce.ts
@@ -321,7 +321,7 @@ const ORDER_ECOMMERCE: TEditorConfiguration = {
textAlign: 'left',
padding: {
top: 0,
- bottom: 8,
+ bottom: 0,
left: 0,
right: 0,
},
@@ -410,28 +410,6 @@ const ORDER_ECOMMERCE: TEditorConfiguration = {
},
},
},
- block_RJU6wqWp4io29SK1kEESC7: {
- type: 'Text',
- data: {
- style: {
- color: '#808080',
- backgroundColor: null,
- fontSize: 14,
- fontFamily: null,
- fontWeight: 'normal',
- textAlign: 'right',
- padding: {
- top: 0,
- bottom: 0,
- left: 0,
- right: 0,
- },
- },
- props: {
- text: 'Original: $30.00',
- },
- },
- },
block_6VvTYskm3BULZZEfYCkjwN: {
type: 'Text',
data: {
@@ -469,7 +447,7 @@ const ORDER_ECOMMERCE: TEditorConfiguration = {
},
},
props: {
- childrenIds: ['block_RJU6wqWp4io29SK1kEESC7', 'block_6VvTYskm3BULZZEfYCkjwN'],
+ childrenIds: ['block_6VvTYskm3BULZZEfYCkjwN'],
},
},
},
@@ -479,13 +457,14 @@ const ORDER_ECOMMERCE: TEditorConfiguration = {
style: {
backgroundColor: null,
padding: {
- top: 16,
- bottom: 16,
+ top: 0,
+ bottom: 0,
right: 0,
left: 0,
},
},
props: {
+ fixedWidths: [64, null, 80],
columnsCount: 3,
columnsGap: 16,
columns: [
@@ -1186,6 +1165,7 @@ const ORDER_ECOMMERCE: TEditorConfiguration = {
},
props: {
columnsCount: 2,
+ columnsGap: 16,
columns: [
{
childrenIds: ['block_Wnt477QxYNynetWGwkLg89'],
diff --git a/packages/editor-sample/src/getConfiguration/sample/post-metrics-report.ts b/packages/editor-sample/src/getConfiguration/sample/post-metrics-report.ts
index 9e49e1b..7094db9 100644
--- a/packages/editor-sample/src/getConfiguration/sample/post-metrics-report.ts
+++ b/packages/editor-sample/src/getConfiguration/sample/post-metrics-report.ts
@@ -236,7 +236,7 @@ const POST_METRICS_REPORT: TEditorConfiguration = {
fullWidth: false,
size: 'medium',
text: 'View your analytics →',
- url: 'https://example.usewaypoint.com/jordanisip/analytics',
+ url: 'https://example.usewaypoint.com/post/1234/analytics',
},
},
},
@@ -339,7 +339,7 @@ const POST_METRICS_REPORT: TEditorConfiguration = {
},
},
props: {
- buttonBackgroundColor: '#FAFAFA',
+ buttonBackgroundColor: '#EEEEEE',
buttonStyle: 'rounded',
buttonTextColor: '#474849',
fullWidth: false,
diff --git a/packages/editor-sample/src/getConfiguration/sample/reservation-reminder.ts b/packages/editor-sample/src/getConfiguration/sample/reservation-reminder.ts
index d09b8be..28a3d99 100644
--- a/packages/editor-sample/src/getConfiguration/sample/reservation-reminder.ts
+++ b/packages/editor-sample/src/getConfiguration/sample/reservation-reminder.ts
@@ -226,7 +226,9 @@ const RESERVATION_REMINDER: TEditorConfiguration = {
},
},
props: {
+ fixedWidths: [64, null, null],
columnsCount: 2,
+ columnsGap: 16,
columns: [
{
childrenIds: ['block_7MDe4niz9sWkSR7Un5BvRo'],
@@ -270,7 +272,7 @@ const RESERVATION_REMINDER: TEditorConfiguration = {
fontWeight: 'bold',
textAlign: 'left',
padding: {
- top: 24,
+ top: 16,
bottom: 16,
left: 24,
right: 24,