Skip to content

Commit 965224d

Browse files
authored
Merge pull request #51 from oslabs-beta/Yale/frontendmods
Yale/frontendmods
2 parents 9f3bb92 + 00e8e5f commit 965224d

File tree

13 files changed

+793
-752
lines changed

13 files changed

+793
-752
lines changed

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ function createWindow() {
117117
mainWindow = new BrowserWindow({
118118
width: 2000,
119119
height: 1000,
120-
minWidth: 1304,
121-
minHeight: 700,
120+
minWidth: 1000,
121+
minHeight: 600,
122122
backgroundColor: '-webkit-linear-gradient(top, #3dadc2 0%,#2f4858 100%)',
123123
show: false,
124124
webPreferences: {

src/client/components-v2/main/GRPCComposer.tsx

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

178178
return(
179-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between is-tall" id = "composer-grpc">
179+
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id = "composer-grpc">
180180
<div
181181
className="is-flex-grow-3 add-vertical-scroll"
182182
style={{ overflowX: 'hidden' }}

src/client/components-v2/main/GraphQLComposer.tsx

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

238238
return(
239-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between is-tall" id = "composer-graphql">
239+
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id = "composer-graphql">
240240
<div
241241
className="is-flex-grow-3 add-vertical-scroll"
242242
style={{ overflowX: 'hidden' }}

src/client/components-v2/main/MainContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function MainContainer(props) {
109109
element={<WebhookComposer {...props} />}
110110
/>
111111
</Routes>
112-
<Divider orientation="horizontal"/>
112+
{/* <Divider orientation="horizontal"/> */}
113113
<ResponsePaneContainer />
114114
</Box>
115115
)

src/client/components-v2/main/OpenAPIComposer.tsx

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

122122
return(
123-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between is-tall" id= "composer-openapi">
123+
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id= "composer-openapi">
124124
<div
125125
className="is-flex-grow-3 add-vertical-scroll"
126126
style={{ overflowX: 'hidden' }}

src/client/components-v2/main/WebRTCComposer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function WebRTCComposer(props) {
107107
};
108108

109109
return(
110-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between is-tall"
110+
<Box className="is-flex is-flex-direction-column is-justify-content-space-between"
111111
id = "composer-webrtc"> <div
112112
className="is-flex-grow-3 add-vertical-scroll"
113113
style={{ overflowX: 'hidden' }}

src/client/components-v2/main/WebSocketComposer.tsx

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

105105
return(
106-
<Box className="is-flex is-flex-direction-column is-justify-content-space-between is-tall" id = "composer-websocket">
106+
<Box className="is-flex is-flex-direction-column is-justify-content-space-between" id = "composer-websocket">
107107
<div
108108
className="is-flex-grow-3 add-vertical-scroll"
109109
style={{ overflowX: 'hidden' }}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ const ResponsePaneContainer = () => {
4040

4141
return (
4242
<div
43-
className={`${isDark ? 'is-dark-400' : 'is-divider-neutral-300'} box is-child`} // gigi playing with css
43+
className={`${isDark ? 'is-dark-400' : 'is-divider-neutral-300'} box is-3 add-vertical-scroll`} // gigi playing with css
4444
// className={`${isDark ? 'is-dark-400' : ''} column is-one-third is-flex is-flex-direction-column is-tall`}
45-
style={{ height: '50vh', margin: "10px"}}
45+
style={{ height: '50vh', margin: "0px", padding: "0px"}}
4646
id="responses"
4747
>
4848

@@ -51,7 +51,9 @@ const ResponsePaneContainer = () => {
5151

5252

5353
{/* HEADER */}
54-
<div className="hero is-primary is-flex is-flex-direction-row is-justify-content-center">
54+
<div className="hero is-primary is-flex is-flex-direction-row is-justify-content-center"
55+
style={{padding: "10px"}}
56+
>
5557
<ResponseTime currentResponse={currentResponse} />
5658
{currentResponse.responseSize && (
5759
<div className="response-size-placement">

src/client/components-v2/navbar/ProtocolSelect.tsx

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,51 @@ import * as actions from './../../features/business/businessSlice';
77
import * as uiactions from './../../features/ui/uiSlice';
88

99
// Import MUI components.
10+
import { styled } from '@mui/system';
1011
import { Box, Button } from '@mui/material';
12+
import ButtonUnstyled, { buttonUnstyledClasses } from '@mui/base/ButtonUnstyled';
13+
14+
const blue = {
15+
500: '#51819b',
16+
600: '#51819b',
17+
700: '#7ebdde',
18+
};
19+
20+
const white = {
21+
500: '#f0f6fa',
22+
}
23+
24+
const CustomButton = styled(ButtonUnstyled)`
25+
font-family: IBM Plex Sans, sans-serif;
26+
font-weight: bold;
27+
font-size: 0.875rem;
28+
background-color: ${blue[500]};
29+
padding: 10px 0px;
30+
border-radius: 3px;
31+
color: ${white[500]};
32+
transition: all 150ms ease;
33+
cursor: pointer;
34+
border: none;
35+
width: 8vw;
36+
37+
&:hover {
38+
background-color: ${blue[600]};
39+
}
40+
41+
&.${buttonUnstyledClasses.active} {
42+
background-color: ${blue[700]};
43+
}
44+
45+
&.${buttonUnstyledClasses.focusVisible} {
46+
box-shadow: 0 4px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5);
47+
outline: none;
48+
}
49+
50+
&.${buttonUnstyledClasses.disabled} {
51+
opacity: 0.5;
52+
cursor: not-allowed;
53+
}
54+
`;
1155

1256
const mapStateToProps = (store) => {
1357
return {
@@ -71,13 +115,13 @@ const mapDispatchToProps = (dispatch) => ({
71115
* value: The value of the button used to update the Redux store.
72116
*/
73117
const pages = [
74-
{ name: 'HTTP2', route: '/', value: 'rest' },
75-
{ name: 'GRAPHQL', route: '/graphql', value: 'graphQL' },
76-
{ name: 'GRPC', route: '/grpc', value: 'grpc' },
77-
{ name: 'WEB SOCKET', route: '/websocket', value: 'ws' },
78-
{ name: 'WEBRTC', route: '/webrtc', value: 'webrtc' },
79-
{ name: 'OPENAPI', route: '/openapi', value: 'openapi' },
80-
{ name: 'WEBHOOK', route: '/webhook', value: 'webhook' },
118+
{ name: 'HTTP/2', route: '/', value: 'rest' },
119+
{ name: 'GraphQL', route: '/graphql', value: 'graphQL' },
120+
{ name: 'gRPC', route: '/grpc', value: 'grpc' },
121+
{ name: 'WebSocket', route: '/websocket', value: 'ws' },
122+
{ name: 'WebRTC', route: '/webrtc', value: 'webrtc' },
123+
{ name: 'OpenAPI', route: '/openapi', value: 'openapi' },
124+
{ name: 'Webhook', route: '/webhook', value: 'webhook' },
81125
]
82126

83127
/**
@@ -274,10 +318,10 @@ function ProtocolSelect(props) {
274318
key={page.name}
275319
to={page.route}
276320
>
277-
<Button
321+
<CustomButton
278322
key={page.name}
279-
variant="contained"
280-
color="primary"
323+
// variant="contained"
324+
// color="primary"
281325
onClick={() => {
282326
console.log(page.value)
283327
onProtocolSelect(page.value)}
@@ -286,7 +330,7 @@ function ProtocolSelect(props) {
286330
m: 1
287331
}}>
288332
{page.name}
289-
</Button>
333+
</CustomButton>
290334
</Link>
291335
))}
292336
</Box>

0 commit comments

Comments
 (0)