Skip to content

Commit f1a9361

Browse files
authored
Merge pull request #55 from oslabs-beta/alex/cleanup
Alex/cleanup
2 parents 44e017b + bc57cfa commit f1a9361

22 files changed

+235
-103
lines changed

src/client/components/App.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { Box, Divider } from '@mui/material';
2424
* - AA 18 May, 2022
2525
*/
2626
import '../../assets/style/App.scss';
27+
import WorkspaceContainer from './workspace/WorkspaceContainer';
2728

2829

2930
const { api } = window as unknown as WindowExt;
@@ -44,15 +45,15 @@ const App = () => {
4445
* main containers for this application.
4546
*/
4647
return (
47-
<div id="app" className="git brais-tall">
48+
<div id="app" className="is-tall">
4849
<HashRouter>
4950
{/* Navigation bar. Top of the application. */}
5051
<NavBarContainer />
51-
<Divider orientation="horizontal"/>
52+
{/* <Divider orientation="horizontal" sx={{ borderBottomWidth: 2, background: '#51819b' }}/> */}
5253
<Box sx={{ height: '100%', display: 'flex' }}>
5354
{/* Workspace. Left side of the application. */}
5455
<HistoryOrWorkspaceContainer currentWorkspaceId={currentWorkspaceId} setWorkspace={setWorkspace} />
55-
<Divider orientation="vertical"/>
56+
<Divider orientation="vertical" sx={{ borderRightWidth: 2, background: '#51819b' }} />
5657
{/* Main container. Contains the composer and response panes. */}
5758
<MainContainer currentWorkspaceId={currentWorkspaceId} />
5859
</Box>

src/client/components/main/GRPCComposer.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,16 @@ export default function GRPCComposer(props) {
176176
};
177177

178178
return(
179-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id = "composer-grpc">
179+
<Box
180+
className="is-flex-grow-3 add-vertical-scroll"
181+
sx={{
182+
height: '40%',
183+
px: 1,
184+
overflowX: 'scroll',
185+
overflowY: 'scroll',
186+
}}
187+
id = "composer-grpc"
188+
>
180189
<div
181190
className="is-flex-grow-3 add-vertical-scroll"
182191
style={{ overflowX: 'hidden' }}

src/client/components/main/GraphQLComposer.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,16 @@ export default function GraphQLComposer(props) {
236236
};
237237

238238
return(
239-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id = "composer-graphql">
239+
<Box
240+
className="is-flex-grow-3 add-vertical-scroll"
241+
sx={{
242+
height: '40%',
243+
px: 1,
244+
overflowX: 'scroll',
245+
overflowY: 'scroll',
246+
}}
247+
id = "composer-graphql"
248+
>
240249
<div
241250
className="is-flex-grow-3 add-vertical-scroll"
242251
style={{ overflowX: 'hidden' }}

src/client/components/main/MainContainer.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,14 @@ const mapDispatchToProps = (dispatch) => ({
7878

7979
function MainContainer(props) {
8080
return(
81-
<Box sx={{p: 1.5, width: '80%', overflowY: 'scroll'}}>
81+
<Box
82+
sx={{
83+
width: '75%',
84+
// overflowY: 'scroll',
85+
// display: 'flex',
86+
// flexDirection: 'column'
87+
}}
88+
>
8289
<Routes>
8390
<Route
8491
path="/"
@@ -109,7 +116,7 @@ function MainContainer(props) {
109116
element={<WebhookComposer {...props} />}
110117
/>
111118
</Routes>
112-
{/* <Divider orientation="horizontal"/> */}
119+
<Divider orientation='horizontal' sx={{ borderBottomWidth: 2, background: '#51819b' }} />
113120
<ResponsePaneContainer />
114121
</Box>
115122
)

src/client/components/main/OpenAPIComposer.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,16 @@ export default function OpenAPIComposer(props) {
120120
};
121121

122122
return(
123-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id= "composer-openapi">
123+
<Box
124+
className="is-flex-grow-3 add-vertical-scroll"
125+
sx={{
126+
height: '40%',
127+
px: 1,
128+
overflowX: 'scroll',
129+
overflowY: 'scroll',
130+
}}
131+
id= "composer-openapi"
132+
>
124133
<div
125134
className="is-flex-grow-3 add-vertical-scroll"
126135
style={{ overflowX: 'hidden' }}

src/client/components/main/WebRTCComposer.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,11 @@ export default function WebRTCComposer(props) {
107107
};
108108

109109
return(
110-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between"
111-
id = "composer-webrtc"> <div
110+
<Box
111+
className="is-flex is-flex-direction-column is-justify-content-space-between"
112+
id = "composer-webrtc"
113+
>
114+
<div
112115
className="is-flex-grow-3 add-vertical-scroll"
113116
style={{ overflowX: 'hidden' }}
114117
>

src/client/components/main/WebSocketComposer.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,16 @@ export default function WebSocketComposer(props) {
103103
};
104104

105105
return(
106-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id = "composer-websocket">
106+
<Box
107+
className="is-flex-grow-3 add-vertical-scroll"
108+
sx={{
109+
height: '40%',
110+
px: 1,
111+
overflowX: 'scroll',
112+
overflowY: 'scroll',
113+
}}
114+
id = "composer-websocket"
115+
>
107116
<div
108117
className="is-flex-grow-3 add-vertical-scroll"
109118
style={{ overflowX: 'hidden' }}

src/client/components/main/WebhookComposer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export default function WebhookComposer(props) {
158158

159159
return(
160160
<Box className='mr-2 is-flex is-justify-content-center'
161-
style={{padding: '10px'}}
161+
sx={{padding: '10px', height: '40%'}}
162162
id = "composer-webhook">
163163
<button
164164
className={`button ${

src/client/components/main/http2-composer/Http2Composer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import NewRequestButton from '../new-request/NewRequestButton';
1919
import BodyEntryForm from '../new-request/BodyEntryForm';
2020
import TestEntryForm from '../new-request/TestEntryForm';
2121
// Import MUI components
22-
import { Box } from '@mui/material';
22+
import { Box, Typography } from '@mui/material';
2323
import { BooleanValueNode } from 'graphql';
2424

2525
// Translated from RestContainer.jsx
@@ -297,11 +297,16 @@ export default function Http2Composer(props) {
297297
<Box
298298
className="is-flex-grow-3 add-vertical-scroll"
299299
sx={{
300+
height: '40%',
301+
px: 1,
300302
overflowX: 'scroll',
301303
overflowY: 'scroll',
302304
}}
303305
id = "composer-http2"
304306
>
307+
{/* <Typography align='center'>
308+
HTTP/2
309+
</Typography> */}
305310
{/**
306311
* TODO:
307312
* The two commented components are our attempt to port the entire app to use MaterialUI for consistency.

src/client/components/main/response/ResponsePaneContainer.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useSelector, useDispatch } from 'react-redux';
66
import * as actions from '../../../features/business/businessSlice';
77
import * as uiactions from '../../../features/ui/uiSlice';
88
import ReqResCtrl from '../../../controllers/reqResController';
9+
import { Box } from '@mui/material';
910

1011
// Import local components.
1112
import EventsContainer from './EventsContainer';
@@ -39,10 +40,16 @@ const ResponsePaneContainer = () => {
3940
}
4041

4142
return (
43+
<Box
44+
sx={{
45+
height: '100%',
46+
p: 1,
47+
}}
48+
>
4249
<div
4350
className={`${isDark ? 'is-dark-400' : 'is-divider-neutral-300'} box is-3 add-vertical-scroll`} // gigi playing with css
4451
// className={`${isDark ? 'is-dark-400' : ''} column is-one-third is-flex is-flex-direction-column is-tall`}
45-
style={{ height: '50vh', margin: "0px", padding: "0px"}}
52+
style={{ height: '54%', margin: "0px", marginTop: "1px"}}
4653
id="responses"
4754
>
4855

@@ -203,6 +210,7 @@ const ResponsePaneContainer = () => {
203210
</div>
204211
)}
205212
</div>
213+
</Box>
206214
);
207215
};
208216

0 commit comments

Comments
 (0)