Skip to content

Final Merge from CaretDevelopment ReacType Caret Edition #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 145 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
ef34850
Completed Framework for Sandbox Render & State
MadinventorZero Apr 21, 2021
203948e
Added Caret Comments
MadinventorZero Apr 21, 2021
2d667fd
Merge pull request #1 from MadinventorZero/sandbox
buddhajjigae Apr 21, 2021
6f943a1
linked mock state interface to root component; wip
williamdyoon Apr 22, 2021
0534ab4
Fixed break on delete issue & Cleaned console.logs
MadinventorZero Apr 22, 2021
4551f61
Added protoype annotation button to DirectChildHTMLNestable, button a…
buddhajjigae Apr 22, 2021
610c682
Dynamically Rendering Nested Children Components
MadinventorZero Apr 22, 2021
bc31935
Created Form Selector component
jonocr Apr 22, 2021
37ffeb3
Refactor Selector in Right Container
jonocr Apr 22, 2021
07036c6
Css Class Component Customization Complete
MadinventorZero Apr 23, 2021
23a3009
Refactor Render and Delete Shortcuts
MadinventorZero Apr 23, 2021
5a37351
Merge pull request #2 from jonocr/styles
MadinventorZero Apr 23, 2021
8528499
Merge branch 'CaretDevelopment' into sandbox
MadinventorZero Apr 23, 2021
0d74350
Merge pull request #3 from MadinventorZero/sandbox
MadinventorZero Apr 23, 2021
76a7a9f
Added Input/Label elements, Fixed Broken Img
MadinventorZero Apr 23, 2021
da53d41
Merge pull request #4 from MadinventorZero/codepreview
MadinventorZero Apr 23, 2021
2a8ae0c
improved visualization of mock state interface; wip
williamdyoon Apr 23, 2021
2849508
merged with PRs #1,2,3,4
williamdyoon Apr 23, 2021
a7af8b3
tabularized right panel; wip
williamdyoon Apr 24, 2021
c09d586
implemented submission of new state props as new object
williamdyoon Apr 24, 2021
5551060
Rough working prototype of annotation. Created separate Annotation co…
buddhajjigae Apr 24, 2021
69beabf
Delete .eslintrc.json
xkevinpark Apr 24, 2021
a8f47d0
Removed unncessary console.logs and commented code
buddhajjigae Apr 24, 2021
0ed7190
reverting uncommnented eslint file
Apr 24, 2021
5887fb6
Merge branch 'CaretDevelopment' into annotation-feature
jonocr Apr 24, 2021
a499bbc
Merge pull request #7 from buddhajjigae/annotation-feature
jonocr Apr 24, 2021
06c3a8e
fixed conflicts.
Apr 24, 2021
22c66be
Merge pull request #8 from xkevinpark/feat/mock-state
buddhajjigae Apr 24, 2021
2c13b67
Updated Sandbox
jonocr Apr 24, 2021
e9cbe2f
Fixed several bugs. Details in PR.
MadinventorZero Apr 25, 2021
c620213
Initial blush on Codepreview updates
MadinventorZero Apr 26, 2021
7bbdd47
Merge pull request #9 from MadinventorZero/bugbusting
jonocr Apr 26, 2021
244ff12
Merge
jonocr Apr 26, 2021
48dffbc
Merge
jonocr Apr 26, 2021
f607362
Progress on CodePreview
MadinventorZero Apr 26, 2021
569907a
Merge branch 'main' into codepreview
MadinventorZero Apr 26, 2021
9fdd4a6
converted user input values to correct type.
Apr 26, 2021
dbb545a
Created annotation textarea header that display current element and i…
buddhajjigae Apr 26, 2021
5ca085e
Cleaned up comments. Added prop drilling of name for DirectChildHTML.…
buddhajjigae Apr 26, 2021
ded1cb4
Dynamically creating codepreview in generatecode
MadinventorZero Apr 27, 2021
6180401
added code snippets for useState codes, added table display
williamdyoon Apr 27, 2021
39ee7be
Massive fix to codepreview. Added ul/ol/menu.
MadinventorZero Apr 27, 2021
6ef086e
Fixed bug in nested spacing.
MadinventorZero Apr 27, 2021
1513705
Added controller for sandbos css managment
jonocr Apr 27, 2021
0faacf5
Created router for sandbox css managment
jonocr Apr 27, 2021
88cc96b
Added router for sandabox
jonocr Apr 27, 2021
9e3ea82
Added proxy for sandbox styles managment
jonocr Apr 27, 2021
0a13034
Styles CSS Editor Created
jonocr Apr 27, 2021
de48cb0
Validate shorcut for enter key
jonocr Apr 27, 2021
cfb848d
Began working on saving annotations to state to keep them persistent …
buddhajjigae Apr 27, 2021
84fdaff
Added styles for save btn on style editor
jonocr Apr 27, 2021
ba2ec38
updated table display; refactored codes; wip
williamdyoon Apr 27, 2021
0f30842
Merge fix
jonocr Apr 27, 2021
0b9a217
Rounded annotation textarea and header to rounded corners along with …
buddhajjigae Apr 27, 2021
2c74a26
Made codepreview actually look nice. Group effort.
MadinventorZero Apr 27, 2021
dd89856
Merge pull request #13 from williamdyoon/feat/table-state-props
xkevinpark Apr 27, 2021
1e94c14
Merge pull request #12 from jonocr/styles
MadinventorZero Apr 27, 2021
c91e5b5
Merge branch 'CaretDevelopment' into annotation-feature
MadinventorZero Apr 27, 2021
3cd21dc
Merge pull request #14 from buddhajjigae/annotation-feature
MadinventorZero Apr 27, 2021
8bf7711
Merge branch 'CaretDevelopment' into codepreview
MadinventorZero Apr 27, 2021
2b3dd68
Merge pull request #10 from MadinventorZero/codepreview
MadinventorZero Apr 27, 2021
d745caf
Missing import from merges
MadinventorZero Apr 27, 2021
63a609e
Refactored local state management
jonocr Apr 28, 2021
5e40db5
Added the ability to insert links, renders & generates code. Removed …
MadinventorZero Apr 28, 2021
30375e6
Created a useEffect to allow annotations to remain persistent between…
buddhajjigae Apr 28, 2021
a94de91
State creation now reflects in the codepreview
MadinventorZero Apr 28, 2021
894f21c
Working on the DataGrid state
jonocr Apr 29, 2021
9e5d274
Refactoring Dash
MadinventorZero Apr 29, 2021
2137b17
Refactored Dash to Utilize Tabs.
MadinventorZero Apr 29, 2021
e1e2471
Added some comments to dash updates
MadinventorZero Apr 29, 2021
b95fe69
Values are store now on the local state, deletes states on demand
jonocr Apr 29, 2021
d24f479
Merge pull request #19 from buddhajjigae/annotation-feature
MadinventorZero Apr 29, 2021
c6be746
Merge pull request #16 from MadinventorZero/styleandlink
jonocr Apr 29, 2021
76fd125
Merge pull request #17 from MadinventorZero/statecodepreview
MadinventorZero Apr 29, 2021
57535a5
Merge pull request #20 from jonocr/state
MadinventorZero Apr 29, 2021
d1038f8
Merge branch 'CaretDevelopment' into dash
jonocr Apr 29, 2021
cd13e96
Merge pull request #18 from MadinventorZero/dash
jonocr Apr 29, 2021
0dcd8a7
Created a line from canvas to render canvas when clicking on canvas e…
buddhajjigae Apr 29, 2021
45dbd82
Fix for annotations
MadinventorZero Apr 29, 2021
d3dcd27
Merge pull request #21 from MadinventorZero/annofix
MadinventorZero Apr 29, 2021
af432f2
Fixed bug that triggers re-rendering. Refactored and modularized re-u…
May 2, 2021
c5d5d6d
Resolved missing type errors. Fixed bug that triggered re-rendering. …
May 5, 2021
88841e1
Removed unnecessary imports and useEffect.
May 5, 2021
da08b52
Merge pull request #22 from xkevinpark/bug/fix-state
buddhajjigae May 5, 2021
fc80e63
Fixed the persistance of annotations. Still need to address color cha…
MadinventorZero May 6, 2021
360666a
Merge branch 'fixforanno' of https://github.com/MadinventorZero/ReacType
MadinventorZero May 6, 2021
5334a14
Fixed issue of annotations not persisting when changing root level co…
buddhajjigae May 8, 2021
385dfec
Commented useEffect in login/SignIn.tsx because it is currently not w…
buddhajjigae May 8, 2021
2657dd2
Merge branch 'CaretDevelopment' into annotation-feature
MadinventorZero May 8, 2021
44644c8
Merged with annotation-feature
buddhajjigae May 8, 2021
0b62141
Merge pull request #23 from buddhajjigae/annotation-feature
jonocr May 8, 2021
2c4658e
Merged with Main
MadinventorZero May 8, 2021
27b853b
Fixed Css State Rerender and Hot Reload
MadinventorZero May 9, 2021
d974f99
Fixed issues with keys and improper attribute names causing errors af…
MadinventorZero May 9, 2021
fe3c094
Fixed error on saving. Projects got so big they hit the 100kb default…
MadinventorZero May 9, 2021
6192274
Fixed save frequency, projects now save on an interval of 15 seconds …
MadinventorZero May 9, 2021
b3781e1
Undoing some merge issues from anno fix
MadinventorZero May 9, 2021
e856b8a
Added a blue circle with border to the tip of the line pointing at th…
buddhajjigae May 10, 2021
dce5e65
Redesigned the Save Project useEffect. Mixture of throttle and global…
MadinventorZero May 10, 2021
7b0b96f
Merge pull request #25 from MadinventorZero/projectsave
MadinventorZero May 10, 2021
8250068
Merge pull request #24 from MadinventorZero/stylehotloading
jonocr May 10, 2021
ac8e843
Progress on Modularization & Style Change
MadinventorZero May 11, 2021
abdc21c
Working on bug in annotations
MadinventorZero May 11, 2021
709ee99
Big fix. Annotations needed some of the keys without random numbers, …
MadinventorZero May 11, 2021
e1ecfea
Complete Overhaul of Styles and UI
MadinventorZero May 11, 2021
2bdb1aa
Merge pull request #27 from MadinventorZero/annobug2
jonocr May 11, 2021
5460a98
Merge branch 'main' into organization
MadinventorZero May 11, 2021
9eca0ed
Merge branch 'CaretDevelopment' into dashboard-feature
jonocr May 11, 2021
fe3d282
Merge pull request #26 from buddhajjigae/dashboard-feature
jonocr May 11, 2021
0c9612e
Merge branch 'main' into organization
MadinventorZero May 11, 2021
bb78c77
Merge pull request #28 from MadinventorZero/organization
xkevinpark May 11, 2021
f99e87f
Fixed Arrow's not displaying when in Customization Panel. Fixed arrow…
buddhajjigae May 12, 2021
262b8f1
Merge pull request #29 from buddhajjigae/style-feature
MadinventorZero May 12, 2021
fef6bc1
Moved electron dependecies back
jonocr May 12, 2021
a0fcc65
Activated devTools for prod/testing
jonocr May 12, 2021
9e190fd
Added Comment to unminify code
jonocr May 12, 2021
4417621
Added open/close Quotes to attrs
jonocr May 12, 2021
256c047
Added default route to check server
jonocr May 12, 2021
9b12f5c
Readded delete to LeftContainer so that it's always mounted. Also add…
MadinventorZero May 12, 2021
30892c1
Added production server url
jonocr May 12, 2021
13af3de
using git for heroku deployment
jonocr May 12, 2021
e21e5de
using git for heroku deployment
jonocr May 12, 2021
bc503ef
using git for heroku deployment
jonocr May 12, 2021
2c7843e
Updated Prod Server References
jonocr May 13, 2021
b3c8520
Heroku change for css
jonocr May 13, 2021
cfd5ce4
Merge pull request #30 from MadinventorZero/deleteupdate
williamdyoon May 13, 2021
939af16
Fixed merge conflicts
jonocr May 13, 2021
09be224
Uncommented formatCode call
jonocr May 13, 2021
56089a2
Merge pull request #31 from jonocr/prod
MadinventorZero May 13, 2021
2768a91
Updated authors list
jonocr May 13, 2021
9cae32a
Disable devTools for Prodution
jonocr May 13, 2021
72e17a7
Clean conslogs and Caret comments
jonocr May 13, 2021
e4e10e9
Portion of the Tutorial Updates. Added comments. Fixed side scroll of…
MadinventorZero May 13, 2021
7f4ce2c
HTML element tutorial page complete
MadinventorZero May 13, 2021
ee444f7
Drastic changes to Tutorial such as adding new Tutorial pages and cha…
buddhajjigae May 13, 2021
b3395a9
Merge pull request #32 from jonocr/prod
xkevinpark May 13, 2021
4c98ac6
Updated ReadMe
MadinventorZero May 13, 2021
f4b96dd
Merge branch 'CaretDevelopment' into tutorialupdate
jonocr May 13, 2021
7e1a800
Merge pull request #33 from MadinventorZero/tutorialupdate
jonocr May 13, 2021
9a1263c
resolved merge conflict
williamdyoon May 13, 2021
11c6e6d
Merge branch 'buddhajjigae-style-feature' into CaretDevelopment
williamdyoon May 13, 2021
8b72108
fixed merge conflict
williamdyoon May 13, 2021
c6c279a
fixed merge conflict
williamdyoon May 13, 2021
3c0b948
fixed merge conflict
williamdyoon May 13, 2021
b736e6d
Merge pull request #35 from CaretCS/CaretDevelopment
MadinventorZero May 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:react/recommended", "airbnb-base"],
"extends": ["plugin:react/recommended", "plugin:@typescript-eslint/recommended", "airbnb-base"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/team-reactype/ReacType/pulls)
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
![Version 6.0](https://img.shields.io/badge/Release-6.0-lightgrey.svg)
![Version 7.0.0](https://img.shields.io/badge/Release-7.0.0-lightgrey.svg)

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

**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.
**ReacType** allows users to _visualize_ their application architecture dynamically, employing a _drag-and-drop canvas display_ , a _real-time demo render_ , 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.

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/).

Expand Down Expand Up @@ -48,6 +48,13 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo

### Features


- **Live Render Demo**: Live render demo in React using Electron's sandbox environment. Updates in realtime to reflect canvas structure and customization options.
- **Annotations**: Provide design notes directly on the canvas and have these persist while sharing designs with other engineers.
- **CSS Editor**: Copy and paste custom css styles and classes into the editor and save to use personal or company designs in an instant.
- **State & Props Creator**: Create custom state hooks with real-time updates in the code preview.
- **Application Style Update**: Complete redesign of the entire application for enhanced user experience to maintain a single view application

- **Dashboard**: Click the 'Dashboard' button to view the Public Dashboard and User Dashboard.
- **Like**: Like other people's templates by clicking on the thumbs up icon.
- **Comment**: Comment on other templates by typing in the input field and clicking the comment icon.
Expand Down
9 changes: 6 additions & 3 deletions app/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function createWindow() {
// icon: path.join(__dirname, '../src/public/icons/png/256x256.png'),
webPreferences: {
zoomFactor: 0.7,
// enable devtools when in development mode
// enable devtools when in development mode
devTools: isDev,
// crucial security feature - blocks rendering process from having access to node modules
nodeIntegration: false,
Expand Down Expand Up @@ -131,7 +131,7 @@ async function createWindow() {
});
}

// Emitted when the window is closed.
// Emitted when the window is closed.
win.on('closed', () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
Expand Down Expand Up @@ -223,6 +223,7 @@ app.on('web-contents-created', (event, contents) => {
const parsedUrl = new URL(navigationUrl);
const validOrigins = [
selfHost,
'https://reactype-caret.herokuapp.com',
'http://localhost:5000',
'https://reactype.herokuapp.com',
'https://github.com',
Expand All @@ -246,6 +247,7 @@ app.on('web-contents-created', (event, contents) => {
const parsedUrl = new URL(navigationUrl);
const validOrigins = [
selfHost,
'https://reactype-caret.herokuapp.com',
'http://localhost:5000',
'https://reactype.herokuapp.com',
'https://github.com',
Expand Down Expand Up @@ -288,6 +290,7 @@ app.on('web-contents-created', (event, contents) => {
const parsedUrl = new URL(navigationUrl);
const validOrigins = [
selfHost,
'https://reactype-caret.herokuapp.com',
'http://localhost:5000',
'https://reactype.herokuapp.com',
'https://nextjs.org',
Expand Down Expand Up @@ -351,7 +354,7 @@ ipcMain.on('choose_app_dir', (event) => {
});

// define serverURL for cookie and auth purposes based on environment
let serverUrl = 'https://reactype.herokuapp.com';
let serverUrl = 'https://reactype-caret.herokuapp.com';
if (isDev) {
serverUrl = 'http://localhost:5000';
}
Expand Down
151 changes: 118 additions & 33 deletions app/src/Dashboard/ProjectContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
import React, { useState, useContext, useEffect, createContext } from 'react';
import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
import React, {
useState, useContext, useEffect, createContext,
} from 'react';
import {
createMuiTheme, MuiThemeProvider, makeStyles, Theme, useTheme,
} from '@material-ui/core/styles';
import { useQuery } from '@apollo/client';

import AppBar from '@material-ui/core/AppBar';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';

import Box from '@material-ui/core/Box';
import { GET_PROJECTS } from './gqlStrings';
import Project from './Project';
import NavBarDash from './NavbarDash';
import AppContainer from '../containers/AppContainer';

import { theme1, theme2 } from '../public/styles/theme';
// Implement Apollo Client useQuery hook to retrieve data from the server through graphQL. This includes 2 steps:
// 1) Impliment Apollo Provider in the top component in ./src/index.js, this allows children components access to the queried data
// 2) useQuery hook will update the data stored in Apollo Client's cache and automatically trigger child components rendering

export const styleContext = createContext({
style: null,
setStyle: null
setStyle: null,
});

// setting light and dark themes (navbar and background); linked to theme.ts
const lightTheme = theme1;
const darkTheme = theme2; // dark mode color in theme.ts not reached


const arrToComponent = (arr) => {
return arr.map((proj, index) => <Project
const arrToComponent = arr => arr.map((proj, index) => <Project
key= {index}
name = {proj.name}
likes = {proj.likes}
Expand All @@ -32,22 +41,81 @@ const arrToComponent = (arr) => {
id = {proj.id}
comments = {proj.comments}
/>);

// Start Pulled from materialUI to create a tab panel
const a11yProps = (index: any) => ({
id: `vertical-tab-${index}`,
'aria-controls': `vertical-tabpanel-${index}`,
});

interface LinkTabProps {
label?: string;
href?: string;
}

const LinkTab = (props: LinkTabProps) => (
<Tab
onClick={(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
event.preventDefault();
}}
{...props}
/>
);

const TabPanelItem = (props: TabPanelProps): JSX.Element => {
const theme = useTheme();
const {
children, index, value, ...other
} = props;
return (
<div
role="tabpanel"
hidden={value !== index}
id={`vertical-tabpanel-${index}`}
aria-labelledby={`vertical-tab-${index}`}
{...other}
>
{value === index && (
<Box p={3}>
{children}
</Box>
)}
</div>
);
};

const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
backgroundColor: theme.palette.background.paper,
display: 'flex',
// height: 224,
},
tabs: {
borderRight: `1px solid ${theme.palette.divider}`,
},
}));
// End of prefab code to generate a tab panel

const ProjectContainer = (): JSX.Element => {
const classes = useStyles();
const [value, setValue] = useState(0);

const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {
setValue(newValue);
};

const ProjectContainer = () => {
// old code from project container
const myVar = {};
// Need this for the individual user dasboard, for now, dashboard shows all projects from all users
const userSSID = window.localStorage.getItem('ssid') || 'unavailable';
const username = window.localStorage.getItem('username') || 'unavailable';

const [isThemeLight, setTheme] = useState(true);

const initialStyle = useContext(styleContext);
const [style, setStyle] = useState(initialStyle);

// --------------------------Sorting Buttons------------------------------------//

// hook for sorting menu
const [selectedOption, setSelectedOption] = useState('RATING');

Expand All @@ -68,55 +136,72 @@ const ProjectContainer = () => {
const sortedRatings = projects.sort((a, b) => b.username - a.username);
return sortedRatings;
};
// ===================================================================================== //

// function for selecting drop down sorting menu
const optionClicked = (value) => {
setSelectedOption(value);
};
// ===================================================================================== //


// useQuery hook abstracts fetch request
const { loading, error, data } = useQuery(GET_PROJECTS, { pollInterval: 2000, variables: myVar });
if (loading) return <p>Loading...</p>;
if (error) return <p>Error :{error}</p>;

// based on resolver(getAllProject) for this query, the data is stored in the data object with the key 'getAllProjects'
const projects = data.getAllProjects;

// create array to hold the data recieved in the public dashboard the will be conditionally rendered
let sortedProjects = projects.filter(proj => proj.published);
const userProjects = projects.filter(proj => proj.username === username);
let sortedProjects = projects.filter(proj => {
return proj.published;
});
const userProjects = projects.filter((proj) => {
return proj.username === username;
});

// checking which sorting method was selected from drop down menu and invoking correct sorting function
if (selectedOption === 'DATE') sortedProjects = sortByDate(sortedProjects);
else if (selectedOption === 'USER') sortedProjects = sortByUser(sortedProjects);
else if (selectedOption === 'RATING') sortedProjects = sortByRating(sortedProjects);


// create array to hold the components Project of loggin-in users
// generate an array of Project components based on queried data
const userDisplay = arrToComponent(userProjects);

// create an array of components Project that will be conditionally rendered
const sortedDisplay = arrToComponent(sortedProjects);
// old code from Project Container

return (
<MuiThemeProvider theme={isThemeLight ? lightTheme : darkTheme}>
<div className = "dashboardContainer">
<NavBarDash setTheme={setTheme} styles={[style, setStyle]} isThemeLight={isThemeLight} optionClicked={optionClicked}/>
<h1> Public Dashboard </h1>
<div className = "projectContainer">
{sortedDisplay}
</div>
<hr></hr>
<h1> User Dashboard </h1>
<div className = "projectContainer">
{userDisplay}
<div className={classes.root}>
<MuiThemeProvider theme={isThemeLight ? lightTheme : darkTheme}>
<div className= {'dashboardContainer'}>
<NavBarDash setTheme={setTheme} styles={[style, setStyle]} isThemeLight={isThemeLight} optionClicked={optionClicked}/>
<div className={'userDashboard'}>
{/* <AppBar position="static"> */}
<Tabs
variant="scrollable"
orientation="vertical"
value={value}
onChange={handleChange}
aria-label="Vertical tabs example"
className={classes.tabs}
>
<LinkTab label="Shared Dashboard" {...a11yProps(0)} />
<LinkTab label="Private Dashboard" {...a11yProps(1)} />
</Tabs>
{/* </AppBar> */}
<TabPanelItem className= {'projectPanel'} value={value} index={0}>
<h1> Shared Dashboard </h1>
<div className="projectContainer">
{sortedDisplay}
</div>
</TabPanelItem>
<TabPanelItem className= {'projectPanel'} value={value} index={1}>
<h1> Private Dashboard </h1>
<div className="projectContainer">
{userDisplay}
</div>
</TabPanelItem>
</div>
</div>
</MuiThemeProvider>
</div>
</MuiThemeProvider>
);
};

Expand Down
14 changes: 12 additions & 2 deletions app/src/Dashboard/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,23 @@

.dashboardContainer {
height: 100%;
width: 100%
}

.userDashboard {
display: flex;
flex-direction: row;
}

.projectPanel {
width: 100%;
}

.projectContainer{
display: flex;
flex-direction: column-reverse;
flex-flow: row wrap;
height: 600px;
flex-grow: 1;
overflow-y: scroll;
}

Expand Down Expand Up @@ -66,7 +76,7 @@
}

.header {
background-color: #186BB4;
background-color: #0099E6;
color: rgba(255, 255, 255, 0.897);
width: 100%;
position: relative;
Expand Down
Loading