Skip to content

Commit 0701c10

Browse files
authored
Merge pull request #11 from Anthonytorrero/commentsMerge
Complete comment feature, styling for dashboard
2 parents 0ca1b0c + 6178476 commit 0701c10

File tree

28 files changed

+474
-199
lines changed

28 files changed

+474
-199
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:10.1
2+
WORKDIR /usr/src/app
3+
COPY . /usr/src/app
4+
RUN npm install
5+
RUN npm run prod-build
6+
EXPOSE 5000
7+
CMD npm run server

README.md

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,18 @@
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-
![Version 5.0](https://img.shields.io/badge/Release-5.0-lightgrey.svg)
8+
![Version 6.0](https://img.shields.io/badge/Release-6.0-lightgrey.svg)
99

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

1313
**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-
16-
**New with version 5.0:**
17-
18-
- Elements may be added to components in any location, rather than only at the bottom
19-
- Compatibility with Gatsby.js
20-
- Modernized and cleaner UI, including enhanced dark mode
21-
- Tutorial has been updated to reflect other modifications
22-
2315
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/).
2416

2517
- **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.
2618

27-
- **Windows users**: Install the application by running ReacType Setup 5.0.0.exe.
19+
- **Windows users**: Install the application by running ReacType Setup 6.0.0.exe.
2820

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

@@ -45,6 +37,46 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
4537
- **User Preference Features**: With the click of a button, toggle between light mode and dark mode, depending on your preference.
4638
- **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.
4739

40+
- Elements may be added to components in any location, rather than only at the bottom
41+
- Compatibility with Gatsby.js
42+
- Modernized and cleaner UI, including enhanced dark mode
43+
- Tutorial has been updated to reflect other modifications
44+
45+
**New with version 6.0:**
46+
47+
### Features
48+
49+
- **Dashboard**: Click the 'Dashboard' button to view the Public Dashboard and User Dashboard.
50+
- **Like**: Like other people's templates by clicking on the star icon.
51+
- **Comment**: Comment on other templates by typing in the input field and clicking the comment icon.
52+
- **Download**: Save any public template by clicking the download icon to save a copy as your own.
53+
- **Publish**: Publish any template to the Public Dashboard for other users to download, like, or comment on. Click again to unpublish projects.
54+
- **Sort By**: Click the 'Sort By' button to choose different metrics to sort the Public Dashboard by.
55+
- **Form Nesting**: Nesting within form tags is now fully functional
56+
- **Added Undo and Redo functionality**
57+
58+
### Keyboard Shortcuts
59+
60+
**Mac**:
61+
- Export Project: Command + e
62+
- Undo: Command + z
63+
- Redo: Command + Shift + z
64+
- Save Project As: Command + s
65+
- Save Project: Command + shift + s
66+
- Delete HTML Tag on Canvas: Backspace
67+
- Delete Project: Command + Backspace
68+
- Open Project: Command + o
69+
70+
**Windows**:
71+
- Export Project: Control + e
72+
- Undo: Control + z
73+
- Redo: Control + Shift + z
74+
- Save Project As: Control + s
75+
- Save Project: Control + shift + s
76+
- Delete HTML Tag on Canvas: Backspace
77+
- Delete Project: Control + Backspace
78+
- Open Project: Control + o
79+
4880
#### Contributors
4981

5082
[Aaron Bumanglag](https://www.linkedin.com/in/akbuma) [@akbuma](https://github.com/akbuma)
@@ -55,6 +87,8 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
5587

5688
[Andrew Cho](https://www.linkedin.com/in/andrewjcho84/) [@andrewjcho84](https://github.com/andrewjcho84)
5789

90+
[Anthony Torrero](https://www.linkedin.com/in/anthony-torrero-4b8798159/) [@Anthonytorrero](https://github.com/Anthonytorrero)
91+
5892
[Brian Han](https://www.linkedin.com/in/brianjisoohan/) [@brianjshan](https://github.com/brianjshan)
5993

6094
[Charles Finocchiaro](https://www.linkedin.com/in/charles-finocchiaro-62440040/) [@null267](https://github.com/null267)
@@ -65,6 +99,10 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
6599

66100
[Diego Vazquez](https://www.linkedin.com/in/diegovazquezny/) [@diegovazquezny](https://github.com/diegovazquezny)
67101

102+
[Edward Park](https://www.linkedin.com/in/edwardparkwork/) [@eddypjr](https://github.com/eddypjr)
103+
104+
[Elena Conn](https://www.linkedin.com/in/elena-conn-366346123/) [@elenaconn](https://github.com/elenaconn)
105+
68106
[Eliot Nguyen](https://linkedin.com/in/ibeeliot) [@ibeeliot](https://github.com/ibeeliot)
69107

70108
[Fredo Chen](https://www.linkedin.com/in/fredochen/) [@fredosauce](https://github.com/fredosauce)
@@ -75,6 +113,8 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
75113

76114
[Julie Wu](https://www.linkedin.com/in/jwuarchitect/) [@yutingwu4](https://github.com/yutingwu4)
77115

116+
[Khuong Nguyen](https://www.linkedin.com/in/khuong-nguyen/) [@khuongdn16](https://github.com/khuongdn16)
117+
78118
[Linh Tran](https://www.linkedin.com/in/linhtran51/) [@Linhatran](https://github.com/Linhatran)
79119

80120
[Luke Madden](https://www.linkedin.com/in/lukemadden/) [@lukemadden](https://github.com/lukemadden)
@@ -87,6 +127,8 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
87127

88128
[Sean Sadykoff](https://www.linkedin.com/in/sean-sadykoff/) [@sean1292](https://github.com/sean1292)
89129

130+
[Shana Hoehn](https://www.linkedin.com/in/shana-hoehn-70297b169/) [@slhoehn](https://github.com/slhoehn)
131+
90132
[Shlomo Porges](https://linkedin.com/shlomoporges) [@shlomoporges](https://github.com/ShlomoPorges)
91133

92134
[Sophia Huttner](https://www.linkedin.com/in/sophia-huttner-68315975/) [@sophjean](https://github.com/sophjean)

__tests__/projects.test.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
const { Mongoose } = require('mongoose');
22
const request = require('supertest');
3-
4-
53
// initializes the project to be sent to server/DB
64
const { projectToSave, state } = require('../mockData');
7-
85
const app = require('../server/server.js');
96
const http = require('http');
107
let server;
11-
128
// save and get projects endpoint testing
139
describe('Project endpoints tests', () => {
1410
beforeAll((done) => {
1511
server = http.createServer(app);
1612
server.listen(done);
1713
});
18-
1914
afterAll((done) => {
2015
Mongoose.disconnect();
2116
server.close(done);
2217
});
23-
2418
// test saveProject endpoint
2519
describe('/saveProject', () => {
2620
describe('/POST', () => {
@@ -35,7 +29,6 @@ describe('Project endpoints tests', () => {
3529
});
3630
});
3731
});
38-
3932
// test getProjects endpoint
4033
describe('/getProjects', () => {
4134
describe('POST', () => {
@@ -53,7 +46,6 @@ describe('Project endpoints tests', () => {
5346
});
5447
});
5548
});
56-
5749
// test deleteProject endpoint
5850
describe('/deleteProject', () => {
5951
describe('DELETE', () => {

app/src/Dashboard/NavbarDash.tsx

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ import {
55
makeStyles,
66
Theme,
77
} from '@material-ui/core/styles';
8-
import Button from '@material-ui/core/Button';
98
import AppBar from '@material-ui/core/AppBar';
109
import Avatar from '@material-ui/core/Avatar';
10+
import Brightness3Icon from '@material-ui/icons/Brightness3';
11+
import Brightness5Icon from '@material-ui/icons/Brightness5';
12+
import Button from '@material-ui/core/Button';
13+
import EventNoteIcon from '@material-ui/icons/EventNote';
14+
import HomeIcon from '@material-ui/icons/Home';
1115
import Toolbar from '@material-ui/core/Toolbar';
1216
import Typography from '@material-ui/core/Typography';
1317
import { Link } from 'react-router-dom';
1418
import { styleContext } from '../containers/AppContainer';
15-
1619
import Menu from '@material-ui/core/Menu';
1720
import MenuItem from '@material-ui/core/MenuItem';
18-
19-
// import logo from '../../../resources/icon.png';
21+
import SortIcon from '@material-ui/icons/Sort';
22+
import StarBorderIcon from '@material-ui/icons/StarBorder';
23+
import PersonIcon from '@material-ui/icons/Person';
2024
import greenLogo from '../public/icons/png/512x512.png';
2125

22-
2326
// NavBar text and button styling
2427
const useStyles = makeStyles((theme: Theme) => createStyles({
2528
root: {
26-
flexGrow: 1,
29+
flexGrow: 1,
2730
width: '100%',
2831
},
2932
menuButton: {
@@ -41,7 +44,7 @@ const useStyles = makeStyles((theme: Theme) => createStyles({
4144
}));
4245

4346
// sorting options
44-
const sortMethods = ['Rating', 'Date', 'User'];
47+
const sortMethods = ['RATING', 'DATE', 'USER'];
4548

4649
// Drop down menu button for SORT PROJECTS
4750
const StyledMenu = withStyles({
@@ -75,7 +78,6 @@ const StyledMenuItem = withStyles(theme => ({
7578
}))(MenuItem);
7679

7780
// TO DO: set types of props validation
78-
7981
export default function NavBar(props) {
8082
// TO DO: import setStyle
8183
const classes = useStyles();
@@ -100,7 +102,7 @@ export default function NavBar(props) {
100102

101103
return (
102104
<div className={classes.root} style={style}>
103-
<AppBar position="static">
105+
<AppBar position='static'>
104106
<Toolbar>
105107
<Avatar src={greenLogo}></Avatar>
106108
<Typography variant="h6" style={{ marginLeft: '1rem' }} className={classes.title}>
@@ -111,16 +113,17 @@ export default function NavBar(props) {
111113

112114
<div style ={ { textDecoration: 'none' } }>
113115
<Button
114-
variant="contained"
115-
color="primary"
116+
variant='contained'
117+
color='primary'
116118
onClick={handleClick}
117-
className="navbarButton"
118-
id="navbarButton"
119+
className='navbarButton'
120+
id='navbarButton'
121+
endIcon={<SortIcon/>}
119122
>
120123
SORT PROJECT
121124
</Button>
122125
<StyledMenu // Dropdown menu connected to Manage Project Button
123-
id="customized-menus"
126+
id='customized-menus'
124127
anchorEl={anchorEl}
125128
keepMounted
126129
open={Boolean(anchorEl)}
@@ -132,23 +135,29 @@ export default function NavBar(props) {
132135
toggling();
133136
handleClose();
134137
}}
135-
variant="contained"
136-
color="primary"
138+
variant='contained'
139+
color='primary'
137140
style={{ minWidth: '137.69px' }}
138-
className="navbarButton"
141+
className={classes.manageProject}
139142
key={index}
140143
>
141-
{option}
144+
<Button
145+
color='primary'
146+
endIcon={(option === 'RATING') ? <StarBorderIcon/> : (option === 'DATE') ? <EventNoteIcon/> : (option === 'USER') ? <PersonIcon/> : ''}
147+
>
148+
{option}
149+
</Button>
142150
</StyledMenuItem>
143151
))}
144152
</StyledMenu>
145153
</div>
146154
<Button
147-
className="navbarButton"
148-
id="navbarDashButton"
149-
color="primary"
150-
variant="contained"
155+
className='navbarButton'
156+
id='navbarDashButton'
157+
color='primary'
158+
variant='contained'
151159
style={{minWidth: '113.97px'}}
160+
endIcon={props.isThemeLight ? <Brightness3Icon/> : <Brightness5Icon/>}
152161
onClick={() => {
153162
!props.styles[0].backgroundColor
154163
? props.styles[1]({ backgroundColor: '#21262D' }) //dark mode color
@@ -160,15 +169,17 @@ export default function NavBar(props) {
160169
</Button>
161170
{/* ====================================Home Button============================================== */}
162171

163-
<div style ={ { textDecoration: 'none' } }>
164-
<Link to="/">
172+
<div>
173+
<Link to='/' style={{textDecoration: 'none'}}>
165174
<Button
166-
variant="contained"
167-
color="primary"
168-
style={{ minWidth: '137.69px' }}
175+
variant='contained'
176+
color='primary'
177+
style={{ minWidth: '137.69px'}}
169178
className="navbarButton"
170179
id="ratingButton"
171-
> Home
180+
endIcon={<HomeIcon/>}
181+
>
182+
HOME
172183
</Button>
173184
</Link>
174185
</div>

0 commit comments

Comments
 (0)