Skip to content

Commit ee444f7

Browse files
buddhajjigaejonocrxkevinparkwilliamdyoonMadinventorZero
committed
Drastic changes to Tutorial such as adding new Tutorial pages and changing existing pictures/gifs/text to reflect updated application. Fixed circle not appearing next to page name in the Pages panel by making it appear as a red dot.
Co-authored-by: jonocr <[email protected]> Co-authored-by: xkevinpark <[email protected]> Co-authored-by: williamdyoon <[email protected]> Co-authored-by: MadinventorZero <[email protected]>
1 parent f99e87f commit ee444f7

Some content is hidden

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

48 files changed

+270
-109
lines changed

app/electron/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async function createWindow() {
7373
webPreferences: {
7474
zoomFactor: 0.7,
7575
// enable devtools when in development mode
76-
devTools: true,
76+
devTools: isDev,
7777
// crucial security feature - blocks rendering process from having access to node modules
7878
nodeIntegration: false,
7979
// web workers will not have access to node
@@ -91,7 +91,6 @@ async function createWindow() {
9191
nativeWindowOpen: true,
9292
},
9393
});
94-
win.webContents.openDevTools();
9594

9695
// Splash screen that appears while loading
9796
const hideSplashscreen = initSplashScreen({

app/src/components/main/renderDemo.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.tst-btn {
55
height: 20px;
66
width: 100px;
7-
background-color: #ffffff;
7+
background-color: #000000;
88
}
99

1010

@@ -18,7 +18,7 @@
1818
.tst-form {
1919
position: relative;
2020
z-index: 1;
21-
background: #000000;
21+
background: #0099E6;
2222
max-width: 360px;
2323
margin: 0 auto 100px;
2424
padding: 45px;

app/src/components/right/ComponentPanelItem.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const ComponentPanelItem: React.FC<{
7272
xs={8}
7373
style={{
7474
color: '#262626',
75+
display: 'grid',
7576
backgroundColor: 'transparent',
7677
border: root
7778
? '2px dotted #186BB4'
@@ -80,8 +81,8 @@ const ComponentPanelItem: React.FC<{
8081
borderColor: '#000000',
8182
}}
8283
>
84+
{isFocus && <div className={classes.focusMark}></div>}
8385
<div className="compPanelItem" onClick={handleClick}>
84-
{isFocus && <div className={classes.focusMark}></div>}
8586
<h3 >{name}</h3>
8687
</div>
8788
</Grid>
@@ -93,13 +94,11 @@ const useStyles = makeStyles({
9394
backgroundColor: 'rgba(1,212,109,0.3)'
9495
},
9596
focusMark: {
96-
backgroundColor: '#808080',
97-
position: 'absolute',
97+
backgroundColor: 'red',
98+
justifySelf: 'left',
9899
width: '12px',
99100
height: '12px',
100-
borderRadius: '12px',
101-
left: '-35px',
102-
top: '30px'
101+
borderRadius: '25px',
103102
}
104103
});
105104

app/src/components/right/StatePropsPanel.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
179179
debug
180180
</MyButton> */}
181181
<br></br>
182-
<MyButton type="submit" onClick={submitNewState}>
182+
<MyButton
183+
type="submit"
184+
onClick={submitNewState}
185+
className={isThemeLight ? `${classes.addComponentButton} ${classes.lightThemeFontColor}` : `${classes.addComponentButton} ${classes.darkThemeFontColor}`}
186+
>
183187
Save
184188
</MyButton>
185189
<br></br>
@@ -289,7 +293,7 @@ const useStyles = makeStyles((theme: Theme) =>
289293
fontSize: "0.85rem",
290294
},
291295
lightThemeFontColor: {
292-
color: "#186BB4",
296+
color: "#155084",
293297
},
294298
darkThemeFontColor: {
295299
color: "#fff",

app/src/tutorial/Annotations.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react';
2+
import noteButton from '../../../resources/annotations_tutorial_images/NoteButton.gif';
3+
import annotation from '../../../resources/annotations_tutorial_images/Annotation.gif';
4+
5+
const Annotations: React.FC<{
6+
classes: any;
7+
setPage: Function;
8+
}> = ({ classes, setPage }) => {
9+
return (
10+
<div className={classes.wrapper}>
11+
<h1 className={classes.title}>Annotations</h1>
12+
<hr />
13+
<p className={classes.text}>
14+
Write any notes you want for each element or component on the canvas by clicking the Notes button.<br/><br/>
15+
<div className={classes.imgWrapper}>
16+
<img className={classes.img} src={noteButton}/>
17+
</div>
18+
<br/>
19+
Once clicked, the annotation window will appear where you are able to write text in. To close the annotation window,
20+
simply click anywhere outside the window and the notes will be saved. <br></br>
21+
Any notes written will persist throughout the project, even when swapping between Root level components.<br/><br/>
22+
<div className={classes.imgWrapper}>
23+
<img className={classes.img} src={annotation}/>
24+
</div>
25+
</p>
26+
<hr />
27+
</div>
28+
);
29+
};
30+
31+
export default Annotations;

app/src/tutorial/CSSEditor.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from 'react';
2+
import cssEditorTab from '../../../resources/csseditor_tutorial_images/CSSEditorTab.png';
3+
import cssEdit from '../../../resources/csseditor_tutorial_images/DirectCSSEdit.gif';
4+
import copyPaste from '../../../resources/csseditor_tutorial_images/CopyPasteCSS.gif';
5+
6+
const CSSEditor: React.FC<{
7+
classes: any;
8+
setPage: Function;
9+
}> = ({ classes, setPage }) => {
10+
return (
11+
<div className={classes.wrapper}>
12+
<h1 className={classes.title}>CSS Editor</h1>
13+
<hr />
14+
<p className={classes.text}>The CSS editor tab is located in the bottom panel of the application and is where the CSS file's
15+
code is located.<br/><br/>
16+
You are able to freely edit the CSS code directly and have the changes reflected immediately in the demo render panel.
17+
You can also copy and paste your own CSS code into the editor to take full control of custom CSS classes.<br/>
18+
</p>
19+
<div className={classes.imgWrapper}>
20+
<img className={classes.img} src={cssEditorTab}/>
21+
</div>
22+
<hr/>
23+
<h1 className={classes.title}>Edit CSS code</h1>
24+
<p className={classes.text}>To edit the CSS code in the CSS editor, make the desired changes directly within the editor.<br/>
25+
</p>
26+
<div className={classes.imgWrapper}>
27+
<img className={classes.medImg} src={cssEdit}/>
28+
</div><br/>
29+
<p className={classes.text}>Or copy and paste your own CSS code directly into the editor.
30+
</p><br/>
31+
<div className={classes.imgWrapper}>
32+
<img className={classes.medImg} src={copyPaste}/>
33+
</div>
34+
<hr/>
35+
</div>
36+
);
37+
};
38+
39+
export default CSSEditor;

app/src/tutorial/Canvas.tsx

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
2-
3-
//images
42
import canvas1 from '../../../resources/canvas_tutorial_images/canvas1.png';
5-
import drag1 from '../../../resources/canvas_tutorial_images/drag1.png';
3+
import drag1 from '../../../resources/canvas_tutorial_images/drag1.gif';
64
import undoRedo from '../../../resources/canvas_tutorial_images/undoRedo.gif';
75

86
const Canvas: React.FC<{
@@ -22,9 +20,9 @@ const Canvas: React.FC<{
2220
<h1 className={classes.title}>Drag-n-Drop</h1>
2321
<p className={classes.text}>The drag and drop functionality is used to populate the canvas with HTML elements and
2422
reusable components from the left panel.<br/><br/>
25-
To use the drag and drop functionality, select the desired <span className={classes.notLink} onClick={() => setPage('HTML_Elements')}>
26-
HTML Element</span>, custom <span className={classes.notLink} onClick={() => setPage('HTML_Elements')}>HTML Element</span>, or
27-
<span className={classes.notLink} onClick={() => setPage('Reusable_Components')}> reusable component</span> then click and hold it
23+
To use the drag and drop functionality, select the desired <span className={classes.notLink} onClick={() => setPage('HTML Elements')}>
24+
HTML element</span>, custom <span className={classes.notLink} onClick={() => setPage('HTML Elements')}>HTML element</span>, or
25+
<span className={classes.notLink} onClick={() => setPage('Reusable Components')}> reusable component</span> then click and hold it
2826
to drag it onto the canvas. <br/><br/>
2927
HTML elements and reusable components can be placed within each other on the canvas to nest them.<br/>
3028
</p>
@@ -38,30 +36,7 @@ const Canvas: React.FC<{
3836
<div className={classes.imgWrapper}>
3937
<img src={undoRedo}/>
4038
</div>
41-
<h1 className={classes.title}>Keyboard Shortcuts</h1>
42-
<h2 className={classes.text}>Mac</h2>
43-
<ul className={classes.text}>
44-
<li>Export Project: Command + e</li>
45-
<li>Undo: Command + z</li>
46-
<li>Redo: Command + Shift + z</li>
47-
<li>Save Project As: Command + s</li>
48-
<li>Save Project: Command + shift + s</li>
49-
<li>Delete HTML Tag on Canvas: Backspace</li>
50-
<li>Delete Project: Command + Backspace</li>
51-
<li>Open Project: Command + o</li>
52-
</ul>
53-
<h2 className={classes.text}>Windows</h2>
54-
<ul className={classes.text}>
55-
<li>Export Project: Control + e</li>
56-
<li>Undo: Control + z</li>
57-
<li>Redo: Control + Shift + z</li>
58-
<li>Save Project As: Control + s</li>
59-
<li>Save Project: Control + shift + s</li>
60-
<li>Delete HTML Tag on Canvas: Backspace</li>
61-
<li>Delete Project: Control + Backspace</li>
62-
<li>Open Project: Control + o</li>
63-
</ul>
64-
<hr/>
39+
<hr/>
6540
</div>
6641
);
6742
};

app/src/tutorial/CodePreview.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ const CodePreview: React.FC<{
88
return (
99
<div className={classes.wrapper}>
1010
<h1 className={classes.title}>Code Preview</h1>
11-
<div className={classes.wrapper}>
12-
<p className={classes.text}>The code preview is located at the bottom center of the page on the first tab.<br/>
13-
In the preview, the code will generate for functional components.<br/>
14-
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/>
15-
To learn more about the canvas, click <span className={classes.notLink} onClick={() => setPage('Canvas')} >"here"</span></p>
16-
</div>
11+
<hr/>
12+
<p className={classes.text}>The code preview is located at the bottom center panel of the page on the fourth tab.<br/><br/>
13+
The code preview will generate the lines of code for functional components. As you drag and drop elements or components onto the <span className={classes.notLink} onClick={() => setPage('Canvas')} >canvas</span>
14+
, the code preview will populate and generate the corresponding lines of code in real-time.<br/><br/>
15+
Adding a <span className={classes.notLink} onClick={() => setPage('States')} >state</span> will also generate the corresponding line of code for the state in the code preview.<br/><br/>
16+
Code preview will also change depending on whether Classic React / Gatsby.js / Next.js is chosen.<br/><br/>
17+
To learn more about the <span className={classes.notLink} onClick={() => setPage('Canvas')} >canvas</span>, click <span className={classes.notLink} onClick={() => setPage('Canvas')} >"here"</span></p>
1718
<div className={classes.imgWrapper} >
1819
<img className={classes.smallImg} src={codePreview} />
1920
</div>

app/src/tutorial/ComponentTree.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
32
import tree1 from '../../../resources/tree_tutorial_images/tree1.png';
43
import tree2 from '../../../resources/tree_tutorial_images/tree2.png';
54
import tree3 from '../../../resources/tree_tutorial_images/tree3.png';
@@ -24,17 +23,17 @@ const ComponentTree: React.FC<{
2423
<img className={classes.img} src={tree2}></img>
2524
</div>
2625
<hr/>
27-
<p className={classes.text}><span className={classes.notLink} onClick={() => setPage('Reusable_Components')} >Reusable Components</span> are shown attached to the current page along with their subtrees of components and <span className={classes.notLink} onClick={() => setPage('HTML_Elements')} >HTML Elements</span>.</p>
26+
<p className={classes.text}><span className={classes.notLink} onClick={() => setPage('Reusable Components')} >Reusable components</span> are shown attached to the current page along with their subtrees of components and <span className={classes.notLink} onClick={() => setPage('HTML Elements')} >HTML elements</span>.</p>
2827
<div className={classes.imgWrapper}>
2928
<img className={classes.img} src={tree3}></img>
3029
</div>
3130
<hr/>
32-
<p className={classes.text}><span className={classes.notLink} onClick={() => setPage('HTML_Elements')} >HTML Elements</span> are shown by their tag name.</p>
31+
<p className={classes.text}><span className={classes.notLink} onClick={() => setPage('HTML Elements')} >HTML elements</span> are shown by their tag name.</p>
3332
<div className={classes.imgWrapper}>
3433
<img className={classes.img} src={tree4}></img>
3534
</div>
3635
<hr/>
37-
<p className={classes.text}>You can also view the tree for each <span className={classes.notLink} onClick={() => setPage('Reusable_Components')} >reusable component</span>.</p>
36+
<p className={classes.text}>You can also view the tree for each <span className={classes.notLink} onClick={() => setPage('Reusable Components')} >reusable component</span>.</p>
3837
<div className={classes.imgWrapper}>
3938
<img className={classes.img} src={tree5}></img>
4039
</div>

0 commit comments

Comments
 (0)