Skip to content

Commit 108edf7

Browse files
committed
addressed Elizas and Cyrus' pr review
1 parent 660d67c commit 108edf7

File tree

4 files changed

+19
-25
lines changed

4 files changed

+19
-25
lines changed

app/src/Dashboard/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
flex-direction: column-reverse;
3131
flex-flow: row wrap;
3232
flex-grow: 1;
33-
overflow-y: scroll; */
33+
overflow-y: scroll;
3434
}
3535

3636
.projectInfo {

app/src/components/left/Sidebar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const Sidebar: React.FC<SidebarProps> = ({
2323
oldValue = newValue;
2424
};
2525

26+
//the following allows users to click on the left panel to expand and collapse.
27+
// We decided to freeze so we've commented this and line 41 out
28+
29+
2630
// const handleTabClick = (event: React.MouseEvent, oldValue: number) => {
2731
// if (activeTab === oldValue) {
2832
// setActiveTab(null);

app/src/components/main/CanvasContainer.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,14 @@ function CanvasContainer(props: CanvasContainerProps): JSX.Element {
2626

2727
const canvasContainerStyle: React.CSSProperties = {
2828
width: '100%',
29-
minHeight: '100%',
29+
height: '100%',
3030
backgroundColor: 'rgba(25, 25, 25)',
3131
border: '2px solid grey',
3232
borderBottom: 'none',
3333
overflow: 'auto'
3434
};
3535

3636
const codePreviewStyle: React.CSSProperties = {
37-
// position: 'relative',
38-
// width: '100px',
39-
// height: '35px',
40-
// bottom: '150px',
41-
// right: '45vw',
42-
// padding: '5px',
4337
textAlign: 'center',
4438
color: '#ffffff',
4539
backgroundColor: '#151515',
@@ -50,11 +44,6 @@ function CanvasContainer(props: CanvasContainerProps): JSX.Element {
5044
} as const;
5145

5246
const backToTop: React.CSSProperties = {
53-
// position: 'relative',
54-
// width: '100px',
55-
// height: '35px',
56-
// bottom: '100px',
57-
// right: '45vw',
5847
textAlign: 'center',
5948
color: '#ffffff',
6049
backgroundColor: '#151515',
@@ -153,10 +142,7 @@ function CanvasContainer(props: CanvasContainerProps): JSX.Element {
153142
containerRef={containerRef}
154143
/>
155144
) : (
156-
<Canvas
157-
zoom={zoom}
158-
ref={containerRef} /*isThemeLight={props.isThemeLight} */
159-
/>
145+
<Canvas zoom={zoom} ref={containerRef} />
160146
)}
161147
</div>
162148
);

app/src/components/main/DemoRender.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Link, Route, BrowserRouter as Router, Switch, useHistory } from 'react-router-dom';
1+
import {
2+
Link,
3+
Route,
4+
BrowserRouter as Router,
5+
Switch,
6+
useHistory
7+
} from 'react-router-dom';
28
import React, { useEffect, useRef } from 'react';
39
import { useDispatch, useSelector } from 'react-redux';
410

@@ -24,8 +30,7 @@ const DemoRender = (): JSX.Element => {
2430
width: '100%',
2531
backgroundColor: '#FBFBFB',
2632
borderBottom: 'none',
27-
overflow: 'auto',
28-
33+
overflow: 'auto'
2934
};
3035

3136
const html = `
@@ -101,7 +106,7 @@ const DemoRender = (): JSX.Element => {
101106
const elementType = element.name;
102107
const childId = element.childId;
103108
const elementStyle = element.style;
104-
const innerText = element.attributes.compText;
109+
const innerText = element.attributes.compText;
105110
const classRender = element.attributes.cssClasses;
106111
const activeLink = element.attributes.compLink;
107112
let renderedChildren;
@@ -209,11 +214,10 @@ const DemoRender = (): JSX.Element => {
209214
//adds the code into the iframe
210215
useEffect(() => {
211216
//load the current state code when the iframe is loaded and when code changes
212-
iframe.current.addEventListener('load', ()=>{
217+
iframe.current.addEventListener('load', () => {
213218
iframe.current.contentWindow.postMessage(code, '*');
214-
})
219+
});
215220
iframe.current.contentWindow.postMessage(code, '*');
216-
217221
}, [code]);
218222

219223
return (
@@ -225,7 +229,7 @@ const DemoRender = (): JSX.Element => {
225229
srcDoc={html}
226230
width="100%"
227231
height="100%"
228-
style = {{zIndex: -30}}
232+
style={{ zIndex: -30 }}
229233
/>
230234
</div>
231235
</>

0 commit comments

Comments
 (0)