Skip to content

Commit 11f6078

Browse files
authored
Merge pull request #11 from yutingwu4/ui_final_update
UI Left Panel and Light/Dark Mode Updates
2 parents f3df138 + 841d7f3 commit 11f6078

25 files changed

+507
-395
lines changed

README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,54 @@
55

66
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/team-reactype/ReacType/pulls)
77
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
8-
![Release: 4.0](https://img.shields.io/badge/Release-4.0-white)
8+
// ADD RELEASE ICON HERE
99

10-
**ReacType** is a visual prototyping tool for developers employing **React** component architecture alongside the comprehensive type checking of **TypeScript**.
11-
In other words, **you can draw prototypes and export React / Typescript code!**
10+
**ReacType** is a visual prototyping tool for developers employing **React** component architecture alongside the comprehensive type-checking of **TypeScript**.
11+
In other words, **you can draw prototypes and export React / TypeScript code!**
1212

13-
**ReacType** allows the user to _visualize_ their application architecture dynamically, employing a _drag-and-drop canvas display_ and a _real-time component code preview_. The user can create components and drag _instances_ of these components, as well as HTML elements, onto the canvas. This architecture can then be _exported_ as TypeScript application files to be used as a starter template for any repository.
13+
**ReacType** allows users to _visualize_ their application architecture dynamically, employing a _drag-and-drop canvas display_ and a _real-time component code preview_. Users can create components and drag _instances_ of these components, as well as HTML elements, onto the canvas. This architecture can then be _exported_ as TypeScript application files to be used as a starter template for any repository.
1414

15-
**New with version 4.0:**
1615

17-
- View dynamically created components/HTML elements in the component tree
18-
- View Typescript syntax for React
19-
- Code preview is fully editable (make changes before exporting project)
20-
- Create custom HTML elements
21-
- Improved UI experience
22-
- Implemented a comprehensive tutorial page with images
16+
**New with version 5.0:**
17+
18+
- Elements may be added to components in any location, rather than only at the bottom
19+
- Compatability with Gatsby.js
20+
- Modernized and cleaner UI, including enhanced dark mode
21+
- Tutorial has been updated to reflect other modifications
2322

2423
Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windows](https://github.com/team-reactype/ReacType/releases/), [Linux](https://github.com/team-reactype/ReacType/releases/).
2524

2625
- **Mac users**: After opening the dmg and dragging ReacType into your Applications folder, ctrl+click the icon and select 'Open' from the context menu to run the app. This extra step is necessary since we don't have an Apple developer license yet.
2726

28-
- **Windows users**: Install the application by running ReacType Setup 4.0.0.exe.
27+
- **Windows users**: Install the application by running ReacType Setup 5.0.0.exe.
2928

3029
- **Linux users**: Run the application as a super user in order to read and write files.
3130

3231
![Gif of adding](https://i.imgur.com/Ioqkr00.gif)
3332

3433
### How to use
3534

36-
- **Sign-in page**: Sign up for an account, authenticate via Github/Facebook, or just continue as a guest.
37-
- **Tutorial**: Click ‘Tutorial’ from the help tab’s drop-down menu of the help tab at the top left of the application to view a tutorial page.
38-
- **Start a project (only after authenticating)**: After you authenticate via Github/Facebook, create a new project, and select whether you want your project to be a Next.js or a classic React project. Also, save your project so that you can return to it at a later time.
39-
- **Add Components**: Create components on the left panel. Components can be associated with a route, or they can be used within other components.
40-
- **Delete Components**: Delete components after focusing on them from the right panel. Be careful when deleting components because all instances of the component will be deleted within the application/project.
41-
- **Add Custom Elements**: Create custom elements or add HTML elements that you are more familiar with into the application. Once the project is exported, the HTML tags generated in the code preview will function the way the label is supposed to work. You can create functionality for custom elements in a new file. The tutorial on HTML Elements explains more on how to do this.
42-
- **Delete Elements**: Delete elements by clicking on the ‘X’ button next to the element. Be careful when deleting elements because all elements will be deleted within the application/project.
43-
- **Create instances on the canvas**: Each component has its canvas. Create an example of an element or HTML element by dragging it onto the canvas. Div components are arbitrarily nestable and useful for complex layouts. Next.js projects have Link components to enable client-side navigation to other routes.
44-
- **Component Tree**: Click on the component tree tab next to the code preview tab to view the component tree hierarchy.
45-
- **Update styling**: Click on an element on the canvas to update basic styling using the right functions. As you create new instances and add styling, watch as your code dynamically generates in the bottom panel.
46-
- **User preference features**: Select a theme for the code preview to your liking and change the application’s lighting.
47-
- **Export project**: Click the “Export Project’ button to export the project’s application files into a Typescript file. The exported project is fully functional with Webpack, Express server, routing, etc., and will match what’s mocked on the canvas.
35+
- **Sign-in page**: Sign up for an account, or just continue as a guest. Registered users enjoy additional project-saving functionality.
36+
- **Tutorial**: Click ‘Tutorial’ from the Help tab’s dropdown menu (at the top left of the application) to view a tutorial.
37+
- **Start a project (only after registration)**: Registered users can create a new project and select whether they want their project to be a Next.js, Gatsby.js, or classic React project. Also, registered users can save projects to return to them at a later time.
38+
- **Add Components**: Create components on the right panel. Components can be associated with a route, or they can be used within other components.
39+
- **Delete Components**: Delete components after focusing on them in the right panel. Be careful when deleting components: Upon deletion, all instances of the component will be removed within the application/project.
40+
- **Add Custom Elements**: Create custom elements or add provided HTML elements into the application. Once the project is exported, the HTML tags generated in the code preview will function as expected. You can specify functionality for custom elements in the code preview. The tutorial on HTML Elements explains more on how to do this.
41+
- **Delete Custom HTML Elements**: Delete custom HTML elements by clicking on the ‘X’ button adjacent to the element. Be careful when deleting custom elements: All instances of the element will be deleted within the application/project.
42+
- **Create Instances on the Canvas**: Each component has its own canvas. Add an element to a component by dragging it onto the canvas. Div components are arbitrarily nestable and useful for complex layouts. Next.js and Gatsby.js projects have Link components to enable client-side navigation to other routes.
43+
- **Component Tree**: Click on the Component Tree tab next to the Code Preview tab to view the component tree hierarchy.
44+
- **Update Styling**: Select an element on the canvas to update its basic style attributes on the right panel. As you create new instances and add styling, watch as your code dynamically generates in the code preview in the bottom panel.
45+
- **User Preference Features**: With the click of a button, toggle between light mode and dark mode, depending on your preference.
46+
- **Export project**: Click the “Export Project’ button to export the project’s application files into a TypeScript file. The exported project is fully functional with Webpack, Express server, routing, etc., and will match what is mocked on the canvas.
4847

4948
#### Contributors
5049

5150
[Aaron Bumanglag](https://www.linkedin.com/in/akbuma) [@akbuma](https://github.com/akbuma)
5251

5352
[Adam Singer](https://linkedin.com/in/adsing) [@spincycle01](https://github.com/spincycle01)
5453

54+
[Alex Wolinsky](https://www.linkedin.com/in/alex-wolinsky-80ab591b2/) [@aw2934](https://github.com/aw2934/)
55+
5556
[Andrew Cho](https://www.linkedin.com/in/andrewjcho84/) [@andrewjcho84](https://github.com/andrewjcho84)
5657

5758
[Brian Han](https://www.linkedin.com/in/brianjisoohan/) [@brianjshan](https://github.com/brianjshan)

app/src/components/bottom/BottomTabs.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ const BottomTabs = () => {
8787
const useStyles = makeStyles(theme => ({
8888
root: {
8989
flexGrow: 1,
90-
backgroundColor: '#3ea3d6',
90+
backgroundColor: '#186BB4',
9191
height: '100%',
92-
color: '#091921',
92+
color: '#E8E8E8',
9393
boxShadow: '0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)',
9494

9595
},
@@ -104,7 +104,7 @@ const useStyles = makeStyles(theme => ({
104104
minHeight: '50%'
105105
},
106106
tabsIndicator: {
107-
backgroundColor: '#545E75'
107+
backgroundColor: 'white',
108108
},
109109
tabRoot: {
110110
textTransform: 'initial',
@@ -133,7 +133,7 @@ const useStyles = makeStyles(theme => ({
133133
fontWeight: theme.typography.fontWeightMedium
134134
},
135135
'&:focus': {
136-
color: 'white'
136+
color: 'white',
137137
}
138138
},
139139
tabSelected: {},
@@ -157,7 +157,7 @@ const useStyles = makeStyles(theme => ({
157157
backgroundColor: 'rgba(255,255,255,0.15)',
158158
// width: '300px',
159159
// width: '100%',
160-
color: '#fff'
160+
color: 'white'
161161
}
162162
}));
163163

app/src/components/left/HTMLItem.tsx

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const buttonClasses =
1313

1414
const useStyles = makeStyles({
1515
HTMLPanelItem: {
16-
color: '#77b6ed',
16+
color: '#186BB4',
1717
height: '35px',
1818
width: '90px',
1919
fontSize: '80%',
@@ -23,22 +23,31 @@ const useStyles = makeStyles({
2323
textAlign: 'center',
2424
margin: '7px auto',
2525
marginLeft: '30px',
26-
// border: '2px solid rgba(225, 225, 225, 1.0)',
2726
borderRadius: '25px',
2827
cursor: 'grab',
2928
'& > h3': {
3029
display: 'inline-block',
3130
}
31+
},
32+
lightThemeFontColor: {
33+
color: '#186BB4'
34+
},
35+
darkThemeFontColor: {
36+
color: '#fff'
3237
}
38+
3339
});
3440

35-
const HTMLItem: React.FC<{
41+
const HTMLItem : React.FC<{
3642
name: string;
3743
id: number;
3844
Icon: any;
3945
handleDelete: (id: number) => void;
40-
}> = ({ name, id, Icon, handleDelete }) => {
46+
isThemeLight: boolean;
47+
}> = ({ name, id, Icon, handleDelete, isThemeLight }) => {
48+
4149
const classes = useStyles();
50+
4251
const [modal, setModal] = useState(null);
4352
const [{ isDragging }, drag] = useDrag({
4453
item: {
@@ -113,20 +122,18 @@ const HTMLItem: React.FC<{
113122

114123
return (
115124
<Grid item xs={5} key={`html-g${name}`}>
116-
<div ref={drag} className={classes.HTMLPanelItem} id="HTMLItem">
125+
{ id <= 11 &&
126+
<div ref={drag} className={isThemeLight ? `${classes.HTMLPanelItem} ${classes.lightThemeFontColor}` : `${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`} id="HTMLItem">
127+
<h3>{name}</h3>
128+
</div>}
129+
{id > 11 &&
130+
<span id="customHTMLElement">
131+
<div ref={drag} className={isThemeLight ? `${classes.HTMLPanelItem} ${classes.lightThemeFontColor}` : `${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`} id="HTMLItem">
117132
<h3>{name}</h3>
118-
{/* <span
119-
style={{
120-
verticalAlign: 'middle',
121-
display: 'inline-block',
122-
// marginLeft: '5px'
123-
}}
124-
>
125-
{Icon && <Icon />}
126-
</span> */}
127-
{id > 11 &&
128-
<button className={buttonClasses} id="newElement" onClick={() => deleteAllInstances(id)} > X </button> }
129133
</div>
134+
<button id="newElement" style={{color: isThemeLight ? '#186BB4' : 'white' }} onClick={() => deleteAllInstances(id)} >X</button>
135+
</span>
136+
}
130137
{modal}
131138
</Grid>
132139
);

0 commit comments

Comments
 (0)