Skip to content

Commit 4b74b7e

Browse files
authored
Merge pull request #16 from lukemadden/tutorial
Tutorial Pull Request
2 parents 2da8cfc + 6cc9a53 commit 4b74b7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+48
-36
lines changed

app/src/context/themeContext 2.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
3+
const ThemeContext = React.createContext({
4+
theme: "light",
5+
setTheme: () => {},
6+
})
7+
8+
export default ThemeContext;

app/src/helperFunctions/generateCode.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,11 @@ const formatCode = (code: string) => {
282282
jsxBracketSameLine: true,
283283
parser: 'babel'
284284
});
285-
286285
} else if (process.env.NODE_ENV === 'production') {
287286
return window.api.formatCode(code);
288287
} else {
289288
return code;
290289
}
291-
292290
};
293291

294292
// generate code based on component hierarchy and then return the rendered code

app/src/tutorial/Canvas.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Canvas: React.FC<{
1919
<hr/>
2020
<h1 className={classes.title}>Drag-n-Drop</h1>
2121
<p className={classes.text}>The drag-n-drop functionality is implemented for the canvas to be populated.<br/>
22-
This functionality can be located on the entire left container of the application.<br/>
22+
This functionality can be located in the left container of the application for elements, and the right container for components.<br/>
2323
Select a given <span className={classes.notLink} onClick={() => setPage('HTML_Elements')} >HTML Element</span>, custom <span className={classes.notLink} onClick={() => setPage('HTML_Elements')} >HTML Element</span>, or <span className={classes.notLink} onClick={() => setPage('Reusable_Components')} >reusable component</span>, click and hold to drag on to a reusable components or page.
2424
</p>
2525
<div className={classes.imgWrapper}>

app/src/tutorial/CodePreview.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import codePreview from '../../../resources/code_preview_images/CodePreview.png';
23

34
const CodePreview: React.FC<{
45
classes: any;
@@ -9,10 +10,13 @@ const CodePreview: React.FC<{
910
<h1 className={classes.title}>Code Preview</h1>
1011
<div className={classes.wrapper}>
1112
<p className={classes.text}>The code preview is located at the bottom center of the page on the first tab.<br/>
12-
In the preview, the code will load functional components.<br/>
13+
In the preview, the code will generate for functional components.<br/>
1314
This preview will populate and generate in real-time as you use the drag-n-drop functionality with the <span className={classes.notLink} onClick={() => setPage('Canvas')} >Canvas</span>.<br/>
1415
To learn more about the canvas, click <span className={classes.notLink} onClick={() => setPage('Canvas')} >"here"</span></p>
1516
</div>
17+
<div className={classes.imgWrapper} >
18+
<img className={classes.smallImg} src={codePreview} />
19+
</div>
1620
</div>
1721
);
1822
};

app/src/tutorial/Customization.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ const Customization: React.FC<{
4444
element
4545
</span>{' '}
4646
into the canvas, select the one that needs customizing simply by
47-
clicking on it. Then, to give it a display feature of either a block,
48-
inline-block, or flex styling, select from the drop down box.
47+
clicking on it. Then, to give it block,
48+
inline-block, or flex styling, select from the drop down box in the right container.
4949
</p>
5050
<div className={classes.imgWrapper}>
5151
<img src={flex} />
5252
</div>
5353
<p className={classes.text}>
54-
If the display option 'flex' is chosen, few more sub-options are
54+
If the display option 'flex' is chosen, a few more sub-options are
5555
displayed under the display option.
5656
</p>
5757
<hr />
@@ -119,7 +119,7 @@ const Customization: React.FC<{
119119
</div>
120120
<p className={classes.text}>
121121
Select an element, type in the color you wish to change the background
122-
color to, and click save!
122+
color to, and click save. The code preview will be updated to include your custom styling!
123123
</p>
124124
<hr />
125125
</div>

app/src/tutorial/HtmlElements.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ const HtmlElements: React.FC<{
2323
<p className={classes.text}>You can create new custom elements to better suit your needs.<br/>
2424
Click <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element" target="_blank">here</a> for a link to more HTML tags that you can add.<br/>
2525
"Tag" should be the HTML tag you are creating and "Tag Name" should be something that makes it easy to remember what this tag is/does.<br/>
26-
You can also create your own custom elements besides the standard HTML Elements in the document above. For example you can create an element &lt;hello&gt;&lt;hello&gt; and it will work! You can add functionality to these elements once you export your project. Just be sure to import them into the files that you are using them! For more information on how to create custom tags check out these resources from <a href="https://www.html5rocks.com/en/tutorials/webcomponents/customelements/" target="_blank">HTML5Rocks</a> and <a href="https://www.smashingmagazine.com/2014/03/introduction-to-custom-elements/" target="_blank">smashing magazine</a>.
26+
You can also create your own custom elements besides the standard HTML Elements. For example you can create an element &lt;hello&gt;&lt;hello&gt; and it will work! You can add functionality to these elements once you export your project. Just be sure to import them into the files where you are using them! For more information on how to create custom tags check out these resources from <a href="https://www.html5rocks.com/en/tutorials/webcomponents/customelements/" target="_blank">HTML5Rocks</a> and <a href="https://www.smashingmagazine.com/2014/03/introduction-to-custom-elements/" target="_blank">smashing magazine</a>.
2727
</p>
2828
<div className={classes.imgWrapper} >
2929
<img className={classes.smallImg} src={createNew} />
3030
</div>
3131
<hr/>
32-
<h2>Delete Buttons</h2>
32+
{/* <h2>Delete Buttons</h2>
3333
<p className={classes.text}>Delete buttons that you don't need.</p>
3434
<div className={classes.imgWrapper} >
3535
<img className={classes.smallImg} src={newTag} />
3636
</div>
37-
<hr/>
37+
<hr/> */}
3838
<h2>Persisting Elements</h2>
3939
<p className={classes.text}>Saving the project (available only to users) will allow you to save custom elements that you created. However, when opening a new project, only the tags saved for each specific project will show up again.<br/>
4040
In order to save custom tags across multiple projects, we recommend creating custom tags first, then saving multiple projects with the custom tags. This will allow access to custom tags across multiple projects.</p>

app/src/tutorial/Pages.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,39 @@ const Pages: React.FC<{
1212
<div className={classes.wrapper}>
1313
<h1 className={classes.title}>Pages</h1>
1414
<hr />
15-
<div className={classes.imgWrapper}>
16-
<img src={pages} />
17-
</div>
1815
<p className={classes.text}>
1916
Start off by giving your page a name. Make sure to check the page box
20-
next to the textbox. Then, simply click the add button and it'll show in
17+
next to the Name input. Then, simply click the add button and it will show in
2118
the pages section below.
2219
</p>
2320
<div className={classes.imgWrapper}>
24-
<img src={toggle} />
21+
<img src={pages} />
2522
</div>
26-
<hr />
23+
2724
<div className={classes.imgWrapper}>
28-
<img src={addElements} className={classes.img} />
25+
<img src={toggle} />
2926
</div>
27+
<hr />
3028
<p className={classes.text}>
3129
Switch between pages by selecting the page and customize it by dragging
3230
the elements you want into the{' '}
3331
<span className={classes.notLink} onClick={() => setPage('Canvas')}>
3432
canvas
3533
</span>{' '}
36-
of the page you're on. (Note the green dot next to the page name shows
37-
you which page you are currently on).
34+
of the page you're on. (Note the gray dot next to the page name signals
35+
which page you are currently on).
3836
</p>
39-
<hr />
4037
<div className={classes.imgWrapper}>
41-
<img src={deletePage} />
38+
<img src={addElements} className={classes.img} />
4239
</div>
40+
41+
<hr />
4342
<p className={classes.text}>
44-
Delete the page by simply clicking the button.
43+
Delete the page by simply clicking the delete button below the style attribute dropdowns.
4544
</p>
45+
<div className={classes.imgWrapper}>
46+
<img src={deletePage} />
47+
</div>
4648
<hr />
4749
</div>
4850
);

app/src/tutorial/ReusableComponents.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ const ReusableComponents: React.FC<{
1212
<div className={classes.wrapper}>
1313
<h1 className={classes.title}>Reusable Components</h1>
1414
<hr/>
15-
<p className={classes.text}>To add a Reusable Component, use the top left input form to name a Component. Then select add to create a new Component.</p>
15+
<p className={classes.text}>To add a Reusable Component, use the top right input form to name a Component. Leave the Root/Page checkbox unchecked. Then select add to create a new Reusable Component.</p>
1616
<div className={classes.imgWrapper}>
1717
<img className={classes.img} src={reusableComponents1} />
1818
</div>
1919
<hr/>
20-
<p className={classes.text}>The Components you create will populate the left container under the section called 'Reusable Components'.</p>
20+
<p className={classes.text}>The Components you create will populate the right container under the section 'Reusable Components'.</p>
2121
<div className={classes.imgWrapper}>
2222
<img className={classes.img} src={reusableComponents2} />
2323
</div>
2424
<hr/>
25-
<p className={classes.text}>After creating the desired Component, you can now use the components with the drag-n-drop functionality.
25+
<p className={classes.text}>After creating the desired Component, you can now drag-n-drop to the Canvas.
2626
If you'd like to know about about the drag-n-drop functionality, please locate the <span className={classes.notLink} onClick={() => setPage('Canvas')} >Canvas Tutorial</span> for more information on how it works.
2727
</p>
2828
<div className={classes.imgWrapper}>
2929
<img className={classes.img} src={reusableComponents3} />
3030
</div>
31-
<p className={classes.text}>You can place a reusable component inside <span className={classes.notLink} onClick={() => setPage('Pages')} >Pages</span> and populate the component itself with the <span className={classes.notLink} onClick={() => setPage('HTML_Elements')} >HTML Element</span>.</p>
31+
<p className={classes.text}>You can place a reusable component inside <span className={classes.notLink} onClick={() => setPage('Pages')} >Pages</span> and populate the component itself with the <span className={classes.notLink} onClick={() => setPage('HTML_Elements')} >HTML Elements</span>.</p>
3232
<hr/>
3333
</div>
3434
);

app/src/tutorial/RouteLinks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const RouteLinks: React.FC<{
1414
<div className={classes.wrapper}>
1515
<h1 className={classes.title}>Next.js Route Links</h1>
1616
<hr/>
17-
<h2>Route Links are only available for Next.js projects.</h2>
17+
<h2>Route Links are only available for Next.js and Gatsby.js projects.</h2>
1818
<p className={classes.text}>Users are able to drag-and-drop 'Link' components onto the canvas which allow navigation to different <span className={classes.notLink} onClick={() => setPage('Pages')} >pages</span>.</p>
1919
<div className={classes.imgWrapper}>
2020
<img className={classes.img} src={linksCanvas}></img>
@@ -36,7 +36,7 @@ const RouteLinks: React.FC<{
3636
<img className={classes.smallImg} src={links6}></img>
3737
</div>
3838
<hr/>
39-
<p className={classes.text}>For more information on 'Link' for Next.js, please <a href="https://nextjs.org/docs/api-reference/next/link" target="_blank">visit the official documentation on nextjs.org.</a></p>
39+
<p className={classes.text}>For more information on 'Link' for Next.js, please <a href="https://nextjs.org/docs/api-reference/next/link" target="_blank">visit the official documentation section at nextjs.org.</a> For more information on 'Link' for Gatsby.js, please <a href="https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-link/" target="_blank">visit the official documentation section at www.gatsbyjs.com.</a></p>
4040
<hr/>
4141
</div>
4242
);

app/src/tutorial/Styling.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ const Styling: React.FC<{
1313
<div className={classes.wrapper}>
1414
<h1 className={classes.title}>Styling Features</h1>
1515
<hr />
16-
<h2>Code Preview Theme Changer</h2>
16+
{/* <h2>Code Preview Theme Changer</h2>
1717
<div className={classes.imgWrapper}>
1818
<img src={theme} />
1919
</div>
2020
<p className={classes.text}>
2121
Select your favorite theme from the drop down menu to personalize your
2222
view of the <span className={classes.notLink} onClick={() => setPage('Code_Preview')} >code preview</span>!
2323
</p>
24-
<hr />
25-
<h2>Lighting Mode</h2>
24+
<hr /> */}
25+
<h2>Dark Mode</h2>
2626
<div className={classes.imgWrapper}>
2727
<img src={lighting} />
2828
</div>
2929
<p className={classes.text}>
30-
Spice up the app by toggling between different lighting modes! The
31-
lighting mode will change the background color of the app as well as the
32-
background color of the <span className={classes.notLink} onClick={() => setPage('Component_Tree')} >component tree</span>.
30+
Spice up the app by switching to DARK MODE! DARK
31+
MODE will change the background and text colors of the app.
32+
{/* background color of the <span className={classes.notLink} onClick={() => setPage('Component_Tree')} >component tree</span>. */}
3333
</p>
3434
<hr />
3535
<h2>Resize Code Preview & Component Tree</h2>
@@ -46,7 +46,7 @@ const Styling: React.FC<{
4646
<img className={classes.img} src={codeChange} />
4747
</div>
4848
<p className={classes.text}>
49-
Change your code before exporting and see the changes in your exported
49+
Manually change your code before exporting and see the changes in your exported
5050
file!
5151
</p>
5252
<hr />
230 KB
-15.1 KB
73.7 KB
-9.98 KB
20.1 KB
641 Bytes
20.1 KB
624 KB

resources/pages_images/DeletePage.png

26.3 KB

resources/pages_images/Pages.png

20.8 KB

resources/pages_images/Toggle.png

-4.15 KB
15.7 KB
16.7 KB
68.3 KB
87.7 KB
98.7 KB
115 KB
98.7 KB
75.9 KB

0 commit comments

Comments
 (0)