Skip to content

Commit cbbe445

Browse files
committed
finished Annotation cleanup including imports, styling, variable names, types and tutorial - now DeleteButton
1 parent b84c850 commit cbbe445

File tree

5 files changed

+159
-115
lines changed

5 files changed

+159
-115
lines changed

app/src/components/main/DeleteButton.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import StateContext from '../../context/context';
66
function DeleteButton({ id, name }: DeleteButtons) {
77
const [state, dispatch] = useContext(StateContext);
88

9-
// -------------------------------- NEW CODE for DELETE BUTTONS, REPLACING ANNOTATIONS ---------------------------------------
10-
119
const deleteHTMLtype = (id: number) => {
1210
dispatch({
1311
type: 'DELETE CHILD',
@@ -18,7 +16,7 @@ function DeleteButton({ id, name }: DeleteButtons) {
1816
return (
1917
<div style={{ padding: '1px', float: 'right' }}>
2018
<button
21-
className="annotate-button-empty" // NOTE: This className no longer accurate --> to update to delete button, same w/ Annotation export throughout
19+
className="delete-button-empty"
2220
id={'btn' + id}
2321
onClick={(event) => {
2422
event.stopPropagation();

app/src/public/styles/style.css

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ html {
1717
body {
1818
margin: 0;
1919
padding: 0;
20-
font-family: 'Roboto','Raleway', sans-serif;
20+
font-family: 'Roboto', 'Raleway', sans-serif;
2121
font-size: 0.9 em;
2222
font-weight: 400;
2323
overflow: hidden;
@@ -29,14 +29,14 @@ h4 {
2929
text-align: center;
3030
}
3131
.creation-panel {
32-
color:black;
32+
color: black;
3333
display: flex;
3434
flex-direction: row;
3535
/* height: 100%; */
3636
background-color: #fff;
3737
}
3838
.customization-section {
39-
color:black;
39+
color: black;
4040
display: flex;
4141
flex-direction: row;
4242
height: 100%;
@@ -47,7 +47,6 @@ h4 {
4747
display: flex;
4848
flex-direction: row;
4949
justify-content: space-evenly;
50-
5150
}
5251
.state-prop-grid {
5352
height: 300px;
@@ -85,7 +84,7 @@ header {
8584
flex-grow: 1;
8685
}
8786
.column {
88-
background-color: #F9F9F9;
87+
background-color: #f9f9f9;
8988
}
9089

9190
/*
@@ -150,7 +149,7 @@ LEFT COLUMN
150149
height: 52vh;
151150
overflow-y: auto;
152151
}
153-
#CompBottomHalf{
152+
#CompBottomHalf {
154153
flex-grow: 1;
155154
overflow-y: auto;
156155
margin-bottom: 50%;
@@ -441,7 +440,7 @@ BOTTOM PANEL
441440
text-align: center;
442441
line-height: 0px;
443442
user-select: none;
444-
color:rgb(32, 32, 32);
443+
color: rgb(32, 32, 32);
445444
font-size: x-large;
446445
}
447446

@@ -514,34 +513,32 @@ NAVBAR
514513
width: 16%;
515514
}
516515

517-
518516
/*
519517
/////////////////////////////////////////////////
520-
ANNOTATIONS
518+
ANNOTATIONS --> now DELETE BUTTON
521519
/////////////////////////////////////////////////
522520
*/
523-
.annotate-button-empty {
521+
.delete-button-empty {
524522
float: right;
525523
background-color: #3ec1ac;
526524
border-radius: 15px;
527525
font-size: 14px;
528-
color: rgb(32, 32, 32)
526+
color: rgb(32, 32, 32);
529527
}
530-
.annotate-button-filled {
528+
.delete-button-filled {
531529
float: right;
532530
border-radius: 15px;
533531
font-size: 13px;
534532
}
535-
.annotate-position {
533+
.delete-position {
536534
display: flex;
537535
flex-direction: column;
538536
position: fixed;
539-
align-items:flex-start;
537+
align-items: flex-start;
540538
top: 30%;
541539
left: 30%;
542-
543540
}
544-
.annotate-textarea {
541+
.delete-textarea {
545542
width: 600px;
546543
height: 300px;
547544
resize: none;
@@ -553,7 +550,7 @@ ANNOTATIONS
553550
border-radius: 0px 0px 15px 15px;
554551
font-family: Arial, Helvetica, sans-serif;
555552
}
556-
.annotate-textarea-header {
553+
.delete-textarea-header {
557554
font-size: 35px;
558555
background-color: #003366;
559556
color: rgb(241, 240, 240);
@@ -564,15 +561,15 @@ ANNOTATIONS
564561
font-family: 'Open Sans', sans-serif;
565562
border-radius: 15px 15px 0px 0px;
566563
}
567-
.annotate-textarea-footer {
564+
.delete-textarea-footer {
568565
background-color: #4772c7;
569566
color: rgb(107, 93, 93);
570567
width: 600px;
571568
border: 2px;
572569
border-style: solid;
573570
border-color: black;
574571
}
575-
.annotate-textarea-savebutton {
572+
.delete-textarea-savebutton {
576573
float: right;
577574
width: 150px;
578575
height: 30px;
@@ -636,23 +633,23 @@ a.nav_link:hover {
636633
.oauth-bttn:hover {
637634
background-color: #4e76c7;
638635
}
639-
.text-editor .bttn{
636+
.text-editor .bttn {
640637
position: absolute;
641638
bottom: 90px;
642-
right: 30px ;
639+
right: 30px;
643640
z-index: 999;
644641
}
645642
.useState-btn {
646643
color: rgb(241, 240, 240);
647-
background-color: #0099E6;
644+
background-color: #0099e6;
648645
font-family: Arial, Helvetica, sans-serif;
649646
}
650647
.useState-btn {
651648
color: rgb(241, 240, 240);
652-
background-color: #0099E6;
653-
border: 1px solid #186BB4;
649+
background-color: #0099e6;
650+
border: 1px solid #186bb4;
654651
border-radius: 3;
655-
box-shadow: "0 0px 0px 2px #1a1a1a";
652+
box-shadow: '0 0px 0px 2px #1a1a1a';
656653
padding: 2px 2px 2px 2px;
657654
}
658655
.useState-position {

app/src/tutorial/Annotations.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

app/src/tutorial/Tutorial.tsx

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import CodeIcon from '@material-ui/icons/Code';
1313
import AddToPhotosIcon from '@material-ui/icons/AddToPhotos';
1414
import TvIcon from '@material-ui/icons/Tv';
1515
import AccountTreeIcon from '@material-ui/icons/AccountTree';
16-
import CommentIcon from '@material-ui/icons/Comment';
1716
import AddPhotoAlternateIcon from '@material-ui/icons/AddPhotoAlternate';
1817
import StyleIcon from '@material-ui/icons/Style';
1918
import ColorLensIcon from '@material-ui/icons/ColorLens';
@@ -23,7 +22,6 @@ import BrushIcon from '@material-ui/icons/Brush';
2322
import CloseIcon from '@material-ui/icons/Close';
2423
import Button from '@material-ui/core/Button';
2524

26-
2725
const useStyles = makeStyles({
2826
root: {
2927
display: 'flex',
@@ -100,10 +98,9 @@ const Tutorial: React.FC<RouteComponentProps> = () => {
10098
'HTML Elements',
10199
'Styling',
102100
'Customization',
103-
'Annotations',
104101
'States',
105102
'CSS Editor',
106-
'Keyboard Shortcuts',
103+
'Keyboard Shortcuts'
107104
];
108105
const icons = [
109106
<MenuBookIcon className={classes.icons} />,
@@ -115,24 +112,23 @@ const Tutorial: React.FC<RouteComponentProps> = () => {
115112
<AddPhotoAlternateIcon className={classes.icons} />,
116113
<StyleIcon className={classes.icons} />,
117114
<ColorLensIcon className={classes.icons} />,
118-
<CommentIcon className={classes.icons} />,
119115
<SwapVertIcon className={classes.icons} />,
120116
<BrushIcon className={classes.icons} />,
121-
<KeyboardIcon className={classes.icons} />,
117+
<KeyboardIcon className={classes.icons} />
122118
];
123119
const body = document.querySelector('body');
124120
body.style.overflowY = 'auto';
125121
body.style.backgroundColor = Styling.tutorialGray;
126122
const cards = topics.map((topic, i) => {
127123
return (
128124
<div key={`k${i}`} className={classes.cardWrapper}>
129-
<Link to={`/tutorialPage/${topic}`} style={{ textDecoration: 'none' }} >
125+
<Link to={`/tutorialPage/${topic}`} style={{ textDecoration: 'none' }}>
130126
<Card className={classes.root} variant="elevation">
131127
<CardContent>
132128
<Typography className={classes.title}>{topic}</Typography>
133129
</CardContent>
134-
<CardActions className={classes.cardActions} >
135-
{icons[i]}
130+
<CardActions className={classes.cardActions}>
131+
{icons[i]}
136132
</CardActions>
137133
</Card>
138134
</Link>
@@ -141,25 +137,25 @@ const Tutorial: React.FC<RouteComponentProps> = () => {
141137
});
142138
return (
143139
<>
144-
<div>
145-
{/* <Link to='/' style={{textDecoration: 'none'}}> */}
146-
<Button
147-
variant='contained'
148-
color='primary'
149-
style={{ minWidth: '137.69px'}}
150-
className="navbarButton"
151-
id="ratingButton"
152-
onClick={window.close}
153-
endIcon={<CloseIcon/>}
154-
>
155-
Close
156-
</Button>
157-
{/* </Link> */}
158-
</div>
159-
<Container maxWidth="xl" className={classes.container}>
160-
<h1 className={classes.pageTitle}>ReacType Tutorial</h1>
161-
<div className={classes.wrapper}>{cards}</div>
162-
</Container>
140+
<div>
141+
{/* <Link to='/' style={{textDecoration: 'none'}}> */}
142+
<Button
143+
variant="contained"
144+
color="primary"
145+
style={{ minWidth: '137.69px' }}
146+
className="navbarButton"
147+
id="ratingButton"
148+
onClick={window.close}
149+
endIcon={<CloseIcon />}
150+
>
151+
Close
152+
</Button>
153+
{/* </Link> */}
154+
</div>
155+
<Container maxWidth="xl" className={classes.container}>
156+
<h1 className={classes.pageTitle}>ReacType Tutorial</h1>
157+
<div className={classes.wrapper}>{cards}</div>
158+
</Container>
163159
</>
164160
);
165161
};

0 commit comments

Comments
 (0)