slice-machine-ui 1.19.2-dev-in-app-guide.3 → 1.19.2-dev-in-app-guide.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/_next/static/chunks/pages/{_app-8a946d248c87dd25.js → _app-9ffa8e445771129a.js} +2 -2
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +4 -4
- package/src/features/inAppGuide/InAppGuideDialog.tsx +31 -17
- package/src/features/inAppGuide/inAppGuideContent.tsx +66 -59
- /package/out/_next/static/{iKwyM9kme9G-Y_a_L-e6V → XQc09AlJRBbdJ0W94EWuw}/_buildManifest.js +0 -0
- /package/out/_next/static/{iKwyM9kme9G-Y_a_L-e6V → XQc09AlJRBbdJ0W94EWuw}/_ssgManifest.js +0 -0
|
@@ -15,17 +15,27 @@ import { Counter } from "@src/components/Counter";
|
|
|
15
15
|
import { FlowerBackgroundIcon } from "@src/icons/FlowerBackgroundIcon";
|
|
16
16
|
import { HelpIcon } from "@src/icons/HelpIcon";
|
|
17
17
|
import { useIsEmptyProject } from "@src/hooks/useIsEmptyProject";
|
|
18
|
-
import { useRepositoryInformation } from "@src/hooks/useRepositoryInformation";
|
|
19
18
|
|
|
20
|
-
import {
|
|
19
|
+
import { useInAppGuideContent } from "./inAppGuideContent";
|
|
21
20
|
import { useInAppGuide } from "./InAppGuideContext";
|
|
22
21
|
|
|
23
22
|
export const InAppGuideDialog: FC = () => {
|
|
24
23
|
const isEmptyProject = useIsEmptyProject();
|
|
25
24
|
const { isInAppGuideOpen, setIsInAppGuideOpen } = useInAppGuide();
|
|
26
|
-
const
|
|
25
|
+
const inAppGuideContent = useInAppGuideContent();
|
|
27
26
|
|
|
28
27
|
// TODO: Use new IconButton component from editor-ui
|
|
28
|
+
//
|
|
29
|
+
// It should be used like that:
|
|
30
|
+
// <IconButton
|
|
31
|
+
// color="purple"
|
|
32
|
+
// radius="full"
|
|
33
|
+
// renderIcon={() => <HelpIcon />}
|
|
34
|
+
// onClick={() => {
|
|
35
|
+
// setIsInAppGuideOpen(!isInAppGuideOpen);
|
|
36
|
+
// }}
|
|
37
|
+
// />
|
|
38
|
+
|
|
29
39
|
const trigger =
|
|
30
40
|
isEmptyProject === false ? (
|
|
31
41
|
<Box position="fixed" right={16} bottom={16}>
|
|
@@ -62,13 +72,25 @@ export const InAppGuideDialog: FC = () => {
|
|
|
62
72
|
position="bottomRight"
|
|
63
73
|
size={{
|
|
64
74
|
width: 360,
|
|
65
|
-
height:
|
|
75
|
+
height: 456,
|
|
66
76
|
}}
|
|
67
77
|
>
|
|
68
|
-
<DialogHeader title={
|
|
78
|
+
<DialogHeader title={inAppGuideContent.title} />
|
|
69
79
|
<DialogContent>
|
|
70
80
|
<ScrollArea>
|
|
71
|
-
|
|
81
|
+
<Box
|
|
82
|
+
flexDirection="column"
|
|
83
|
+
padding={{ inline: 16, block: 8 }}
|
|
84
|
+
gap={8}
|
|
85
|
+
>
|
|
86
|
+
<Text>{inAppGuideContent.description}</Text>
|
|
87
|
+
</Box>
|
|
88
|
+
|
|
89
|
+
<Box>
|
|
90
|
+
<Separator />
|
|
91
|
+
</Box>
|
|
92
|
+
|
|
93
|
+
{inAppGuideContent.steps.map((content, index) => (
|
|
72
94
|
<Box key={index} flexDirection="column">
|
|
73
95
|
<Box flexDirection="column" padding={16} gap={8}>
|
|
74
96
|
<Box alignItems="center" gap={8}>
|
|
@@ -86,11 +108,7 @@ export const InAppGuideDialog: FC = () => {
|
|
|
86
108
|
controls
|
|
87
109
|
loop
|
|
88
110
|
/>
|
|
89
|
-
<Text>
|
|
90
|
-
{typeof content.description === "function"
|
|
91
|
-
? content.description(repositoryUrl)
|
|
92
|
-
: content.description}
|
|
93
|
-
</Text>
|
|
111
|
+
<Text>{content.description}</Text>
|
|
94
112
|
</Box>
|
|
95
113
|
|
|
96
114
|
<Separator />
|
|
@@ -98,12 +116,8 @@ export const InAppGuideDialog: FC = () => {
|
|
|
98
116
|
))}
|
|
99
117
|
|
|
100
118
|
<Box flexDirection="column" padding={16} gap={4}>
|
|
101
|
-
<Text variant="bold">{
|
|
102
|
-
<
|
|
103
|
-
{IN_APP_GUIDE_CONTENT.successSteps.map((content, index) => (
|
|
104
|
-
<Text key={index}>• {content}</Text>
|
|
105
|
-
))}
|
|
106
|
-
</Box>
|
|
119
|
+
<Text variant="bold">{inAppGuideContent.successTitle}</Text>
|
|
120
|
+
<Text>{inAppGuideContent.successDescription}</Text>
|
|
107
121
|
</Box>
|
|
108
122
|
</ScrollArea>
|
|
109
123
|
</DialogContent>
|
|
@@ -1,60 +1,67 @@
|
|
|
1
|
-
import { TextLink } from "@prismicio/editor-ui";
|
|
1
|
+
import { TextLink, Text } from "@prismicio/editor-ui";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
3
|
+
import { useRepositoryInformation } from "@src/hooks/useRepositoryInformation";
|
|
4
|
+
|
|
5
|
+
export function useInAppGuideContent() {
|
|
6
|
+
const { repositoryUrl } = useRepositoryInformation();
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
title: "Build a page in 5 minutes",
|
|
10
|
+
description:
|
|
11
|
+
"Great, now that you have a page type, let's make it a live page!",
|
|
12
|
+
steps: [
|
|
13
|
+
{
|
|
14
|
+
title: "Add slices to your page type",
|
|
15
|
+
videoUrl:
|
|
16
|
+
"https://res.cloudinary.com/dmtf1daqp/video/upload/v1700213517/IN-APP-GUIDE-SM/ADD_SLICE.mp4",
|
|
17
|
+
description: "Use slice templates and add them to your page type.",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: "Code your page",
|
|
21
|
+
videoUrl:
|
|
22
|
+
"https://res.cloudinary.com/dmtf1daqp/video/upload/v1700213517/IN-APP-GUIDE-SM/CODE_SNIP.mp4",
|
|
23
|
+
description:
|
|
24
|
+
"If you don't already have a page component, copy-paste the page snippets provided in your page type to create one.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: "Push to your Page Builder",
|
|
28
|
+
videoUrl:
|
|
29
|
+
"https://res.cloudinary.com/dmtf1daqp/video/upload/v1700213517/IN-APP-GUIDE-SM/PUSH.mp4",
|
|
30
|
+
description:
|
|
31
|
+
"You have just created some models, but you can't use them yet. First, you must push them to the Page Builder. The Page Builder is where you create content. Go head — push your models.",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: "Create content",
|
|
35
|
+
videoUrl:
|
|
36
|
+
"https://res.cloudinary.com/dmtf1daqp/video/upload/v1700213517/IN-APP-GUIDE-SM/WRITE.mp4",
|
|
37
|
+
description: (
|
|
38
|
+
<>
|
|
39
|
+
Open your{" "}
|
|
40
|
+
<TextLink href={repositoryUrl} underline>
|
|
41
|
+
Page Builder
|
|
42
|
+
</TextLink>
|
|
43
|
+
, create a page, add slices, save and publish. Then, come back here.
|
|
44
|
+
</>
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: "Render your page",
|
|
49
|
+
videoUrl:
|
|
50
|
+
"https://res.cloudinary.com/dmtf1daqp/video/upload/v1700213517/IN-APP-GUIDE-SM/PREVIEW.mp4",
|
|
51
|
+
description: (
|
|
52
|
+
<>
|
|
53
|
+
To render the page, run your project in your terminal and open
|
|
54
|
+
localhost to the page UID.{" "}
|
|
55
|
+
<Text variant="italic" component="span" sx={{}}>
|
|
56
|
+
Example:
|
|
57
|
+
</Text>{" "}
|
|
58
|
+
localhost:3000/my_page_uid
|
|
59
|
+
</>
|
|
60
|
+
),
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
successTitle: "Next",
|
|
64
|
+
successDescription:
|
|
65
|
+
"Create more slices and then go back to the Page Builder to build out your website.",
|
|
66
|
+
};
|
|
67
|
+
}
|
|
File without changes
|
|
File without changes
|