Skip to content

Commit c0468e2

Browse files
committed
changed version number of package.json to 6.0.0
2 parents 4375c56 + 0701c10 commit c0468e2

File tree

7 files changed

+97
-132
lines changed

7 files changed

+97
-132
lines changed

README.md

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@
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.
@@ -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)

app/src/Dashboard/Project.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import {
1010
import { withStyles, createStyles, makeStyles, Theme } from '@material-ui/core/styles';
1111
import CloseIcon from '@material-ui/icons/Close';
1212
import AddCommentIcon from '@material-ui/icons/AddComment';
13-
1413
import Button from '@material-ui/core/Button';
15-
14+
import ThumbUpAltIcon from '@material-ui/icons/ThumbUpAlt';
1615
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
1716
import FavoriteIcon from '@material-ui/icons/Favorite';
1817
import StarIcon from '@material-ui/icons/Star';
@@ -60,22 +59,14 @@ const Project = ({
6059
//Likes the project when the star icon is clicked
6160
function handleLike(e) {
6261
e.preventDefault();
63-
let myVar = {
62+
const myVar = {
6463
variables:
6564
{
6665
projId: id,
67-
likes: likes,
66+
likes: likes + 1,
6867
},
6968
};
70-
if(clicked === false) {
71-
setClicked(true);
72-
myVar.variables.likes = likes + 1
73-
addLike(myVar);
74-
} else {
75-
setClicked(false);
76-
myVar.variables.likes = likes - 1
77-
addLike(myVar);
78-
}
69+
addLike(myVar);
7970
}
8071

8172
//Makes a copy of the public project and saves as a user project
@@ -214,7 +205,7 @@ const Project = ({
214205

215206
<div className = "icons">
216207
<IconButton tooltip="Like Template" style={noPointer} onClick = { handleLike }>
217-
{clicked ? <StarIcon fontSize='Large' style={{color:'#FFD700'}}/> : <StarBorderIcon fontSize='Large' style={{color:'#FFD700'}}/>}
208+
<ThumbUpAltIcon fontSize='Large'/>
218209
</IconButton>
219210
{ currUsername !== username ?
220211
<IconButton tooltip ="Download Template" style={noPointer} onClick={ handleDownload }>

app/src/Dashboard/ProjectContainer.tsx

Lines changed: 39 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React, { useState, useContext, useEffect, createContext } from 'react';
22
import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
3-
import { makeStyles } from '@material-ui/core/styles';
4-
import Grid from '@material-ui/core/Grid';
53
import { useQuery } from '@apollo/client';
64
import { GET_PROJECTS } from './gqlStrings';
75
import Project from './Project';
@@ -22,15 +20,27 @@ const lightTheme = theme1;
2220
const darkTheme = theme2; // dark mode color in theme.ts not reached
2321

2422

23+
const arrToComponent = (arr) => {
24+
return arr.map((proj, index) => <Project
25+
key= {index}
26+
name = {proj.name}
27+
likes = {proj.likes}
28+
published = {proj.published}
29+
userId = {proj.userId}
30+
username = {proj.username}
31+
createdAt = {proj.createdAt}
32+
id = {proj.id}
33+
comments = {proj.comments}
34+
/>);
35+
};
36+
37+
2538
const ProjectContainer = () => {
2639
const myVar = {};
2740
// Need this for the individual user dasboard, for now, dashboard shows all projects from all users
2841
const userSSID = window.localStorage.getItem('ssid') || 'unavailable';
2942
const username = window.localStorage.getItem('username') || 'unavailable';
30-
// if (userSSID !== 'guest') {
31-
// myVar = { userId: userSSID };
32-
// }
33-
43+
3444
const [isThemeLight, setTheme] = useState(true);
3545

3646
const initialStyle = useContext(styleContext);
@@ -39,11 +49,11 @@ const ProjectContainer = () => {
3949
// --------------------------Sorting Buttons------------------------------------//
4050

4151
// hook for sorting menu
42-
const [selectedOption, setSelectedOption] = useState(null);
52+
const [selectedOption, setSelectedOption] = useState('RATING');
4353

4454
const sortByRating = (projects) => {
4555
// generate a sorted array of public projects based on likes
46-
const sortedRatings = projects.sort((a, b) => b.likes - a.likes);
56+
const sortedRatings = projects.sort((a, b) => b.likes - a.likes);
4757
return sortedRatings;
4858
};
4959

@@ -55,81 +65,56 @@ const ProjectContainer = () => {
5565

5666
const sortByUser = (projects) => {
5767
// generate a sorted array of public projects based on username
58-
const sortedRatings = projects.sort((a, b) => b.user - a.user);
68+
const sortedRatings = projects.sort((a, b) => b.username - a.username);
5969
return sortedRatings;
6070
};
6171
// ===================================================================================== //
6272

73+
// function for selecting drop down sorting menu
74+
const optionClicked = (value) => {
75+
setSelectedOption(value);
76+
};
77+
// ===================================================================================== //
78+
79+
6380
// useQuery hook abstracts fetch request
6481
const { loading, error, data } = useQuery(GET_PROJECTS, { pollInterval: 2000, variables: myVar });
6582
if (loading) return <p>Loading...</p>;
6683
if (error) return <p>Error :{error}</p>;
6784

6885
// based on resolver(getAllProject) for this query, the data is stored in the data object with the key 'getAllProjects'
6986
const projects = data.getAllProjects;
87+
7088
// create array to hold the data recieved in the public dashboard the will be conditionally rendered
71-
let sortedProjects = [];
72-
// create array to hold the components Project of loggin-in users
73-
const userDisplay = [];
74-
// generate an array of Project components based on queried data
75-
projects.forEach((proj, index) => {
76-
const component = <Project
77-
key= {index}
78-
name = {proj.name}
79-
likes = {proj.likes}
80-
published = {proj.published}
81-
userId = {proj.userId}
82-
username = {proj.username}
83-
createdAt = {proj.createdAt}
84-
id = {proj.id}
85-
comments = {proj.comments}
86-
/>;
87-
// sorting the public and private dashboards based on the user's username
88-
if (username === proj.username) userDisplay.push(component);
89-
if (proj.published) {
90-
91-
sortedProjects.push(proj);
92-
}
93-
});
89+
let sortedProjects = projects.filter(proj => proj.published);
90+
const userProjects = projects.filter(proj => proj.username === username);
9491

95-
// function for selecting drop down sorting menu
96-
const optionClicked = (value) => {
97-
setSelectedOption(value);
98-
};
9992
// checking which sorting method was selected from drop down menu and invoking correct sorting function
10093
if (selectedOption === 'DATE') sortedProjects = sortByDate(sortedProjects);
10194
else if (selectedOption === 'USER') sortedProjects = sortByUser(sortedProjects);
10295
else if (selectedOption === 'RATING') sortedProjects = sortByRating(sortedProjects);
10396

97+
98+
// create array to hold the components Project of loggin-in users
99+
// generate an array of Project components based on queried data
100+
const userDisplay = arrToComponent(userProjects);
101+
104102
// create an array of components Project that will be conditionally rendered
105-
const sortedDisplay = [];
106-
sortedProjects.forEach((proj, index) => {
107-
sortedDisplay.push(<Project
108-
key= { index }
109-
name = {proj.name}
110-
likes = {proj.likes}
111-
published = { proj.published }
112-
userId = {proj.userId}
113-
username = {proj.username}
114-
createdAt = {proj.createdAt}
115-
id = {proj.id}
116-
comments = {proj.comments}
117-
/>);
118-
});
103+
const sortedDisplay = arrToComponent(sortedProjects);
119104

120105
return (
121106
<MuiThemeProvider theme={isThemeLight ? lightTheme : darkTheme}>
122107
<div className = "dashboardContainer">
123108
<NavBarDash setTheme={setTheme} styles={[style, setStyle]} isThemeLight={isThemeLight} optionClicked={optionClicked}/>
124109
<h1> Public Dashboard </h1>
125-
<Grid className = "projectContainer" container justify='flex-start' wrap='wrap' spacing={3}>
110+
<div className = "projectContainer">
126111
{sortedDisplay}
127-
</Grid>
112+
</div>
128113
<hr></hr>
129114
<h1> User Dashboard </h1>
130-
<Grid className = "projectContainer" container justify='flex-start' wrap='wrap'>
115+
<div className = "projectContainer">
131116
{userDisplay}
132-
</Grid>
117+
</div>
133118
</div>
134119
</MuiThemeProvider>
135120
);

app/src/Dashboard/styles.css

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,3 @@
1-
/* @import url('https://fonts.googleapis.com/css2?family=Cabin&family=Oswald&display=swap');
2-
3-
4-
5-
$primary-black: #22292f;
6-
$secondary-black: #606f7b;
7-
$teriary-grey: #f0f0f0;
8-
$light-grey: #bfcbd4;
9-
$light-blue: #759cc9;
10-
$button-blue: #24BCFF; */
11-
12-
13-
/* .project{
14-
display: flex;
15-
flex-direction: column;
16-
background-color: white;
17-
color: #606f7b;
18-
align-items: center;
19-
height: 300px;
20-
justify-content: min;
21-
width: 250px;
22-
} */
231

242
.project {
253
display: flex;
@@ -34,25 +12,7 @@ $button-blue: #24BCFF; */
3412
justify-content: space-between;
3513
}
3614

37-
38-
/* .form , .project{
39-
display: flex;
40-
flex-direction: column;
41-
background-color: white;
42-
border: 1px solid #f0f0f0;
43-
box-shadow: 0 0 5px rgba(0,0,0,0.3);
44-
margin: 5px;
45-
border-radius: 5px;
46-
color: #606f7b;
47-
align-items: center;
48-
height: 300px;
49-
justify-content: min;
50-
width: 250px;
51-
} */
52-
53-
5415
.dashboardContainer {
55-
/* overflow: scroll; */
5616
height: 100%;
5717
}
5818

@@ -120,10 +80,3 @@ $button-blue: #24BCFF; */
12080
h1 {
12181
text-align: center;
12282
}
123-
/* .projectContainer {
124-
display: flex;
125-
flex-direction: row;
126-
align-items: center;
127-
justify-content: center;
128-
width: 100%;
129-
} */

app/src/helperFunctions/renderChildren.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const renderChildren = (children: ChildElement[]) => {
5757
/>
5858
);
5959
}
60-
else if (type === 'HTML Element' && typeId === 1000 /* || typeId === 2 */) {
60+
else if (type === 'HTML Element' && typeId === 1000 ) {
6161
return (
6262
<SeparatorChild
6363
childId={childId}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reactype",
3-
"version": "5.0.0",
3+
"version": "6.0.0",
44
"description": "Prototyping tool for React/Typescript Applications.",
55
"private": true,
66
"main": "app/electron/main.js",

0 commit comments

Comments
 (0)