Skip to content

Commit b975ddb

Browse files
neyser zananeyser zana
authored andcommitted
making devtool rsponsive and only showing operation name as null when there isnt one
1 parent 7c6c039 commit b975ddb

File tree

9 files changed

+102
-57
lines changed

9 files changed

+102
-57
lines changed

build/webpack-bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/webpack-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/app.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ h2{
7575
white-space: pre-wrap;
7676
}
7777

78-
.graphQLTab {
79-
display: flex;
80-
flex-direction: row;
81-
justify-content: center;
82-
}
83-
8478
button{
8579
font-size: 10px;
8680
text-transform: uppercase;
@@ -143,11 +137,12 @@ button:hover{
143137
@media screen and (max-width: 600px) {
144138
.reactTab {
145139
display: grid;
146-
grid-template-rows: 1fr 1fr 1fr;
140+
grid-template-rows: 4fr 3fr 4fr;
147141
grid-template-columns: 1fr;
148142
grid-template-areas:
149-
'sp-box'
150143
'diff'
144+
'sp-box'
151145
'tree';
146+
max-height: 1200px;
152147
}
153148
}

public/graphql.css

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
.graphQLTab{
2+
display: grid;
3+
grid-template-columns: 3fr 7fr;
4+
grid-template-areas:
5+
'log-container graphql'
6+
}
7+
18
#graphql-container {
9+
grid-area: graphql;
210
margin-right: 0px;
311
min-height: 600px;
412
}
@@ -13,7 +21,7 @@
1321
}
1422

1523
#graphql-res {
16-
background-color: white;;
24+
background-color: white;
1725
box-shadow: 0 15px 30px 0 rgba(0,0,0,0.11),
1826
0 5px 15px 0 rgba(0,0,0,0.08);
1927
padding: 10px 25px;
@@ -39,4 +47,86 @@
3947
font-weight: 500;
4048
letter-spacing: 0.8px;
4149
line-height: 15px;
42-
}
50+
}
51+
52+
/* *for log in the graphql tab */
53+
#log-container{
54+
grid-area: log-container;
55+
max-height: 400px;
56+
height: 400px;
57+
margin-bottom: 30px;
58+
}
59+
60+
#log-header{
61+
display: flex;
62+
justify-content: space-between;
63+
margin-bottom: 5px;
64+
}
65+
66+
#logs{
67+
overflow-y: scroll;
68+
max-height: 95%;
69+
}
70+
.log{
71+
overflow-x: scroll;
72+
padding: 15px;
73+
margin: 15px;
74+
background-color: rgba(255, 255, 255);
75+
/* transition: box-shadow .1s; */
76+
cursor: pointer;
77+
box-shadow: 0 15px 30px 0 rgba(0,0,0,0.11),
78+
0 5px 15px 0 rgba(0,0,0,0.08);
79+
margin-bottom: 15px;
80+
}
81+
82+
.log-p{
83+
margin: 5px 0px;
84+
}
85+
86+
.log-span{
87+
font-size: 1.2em;
88+
font-weight: 500;
89+
letter-spacing: 0.50px;
90+
margin: 5px 0px;
91+
}
92+
93+
/* *for responsive use */
94+
@media screen and (max-width: 760px) {
95+
.graphQLTab{
96+
padding: 10px;
97+
display: grid;
98+
grid-template-rows: 3fr 7fr;
99+
grid-template-columns: 1fr;
100+
grid-template-areas:
101+
'log-container'
102+
'graphql';
103+
max-height: 1200px;
104+
overflow-y: scroll;
105+
}
106+
#log-container{
107+
width: 100%;
108+
max-height: 400px;
109+
height: 400px;
110+
margin: 0 auto 30px auto;
111+
}
112+
}
113+
114+
/* * Large devices (desktops, 992px and up) */
115+
@media (min-width: 992px) {
116+
.graphQLTab{
117+
padding: 10px;
118+
display: grid;
119+
grid-template-columns: 2fr 8fr;
120+
grid-template-areas:
121+
'log-container graphql';
122+
max-height: 1200px;
123+
overflow-y: scroll;
124+
}
125+
#graphql-container {
126+
display: flex;
127+
}
128+
#graphql-res {
129+
width: 40%;
130+
margin-right: 10px;
131+
}
132+
}

public/log-container.css

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

public/stateContainer.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
max-height: 500px;
44
overflow-y: scroll;
55
padding: 10px;
6+
margin-bottom: 15px;
67
}
78

89
#state-header{

src/components/Log/Log.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Log = props => {
99
<b>Request:</b> {props.logId}
1010
</p>
1111
<p className='log-p'>
12-
<b>Operation Name:</b> {props.operationName}
12+
<b>Operation Name:</b> {props.operationName === null ? 'Null' : props.operationName}
1313
{/* {props.operationName !== null ? (<b>Operation Name:</b>props.operationName) : null} */}
1414
</p>
1515
<p className='log-p'>

src/containers/LogContainer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
22
import Log from './../components/Log/Log.jsx';
3-
import styles from '../../public/log-container.css';
43

54
const LogContainer = props => {
65
let logs = props.logs.map((log, i) => {

src/devtools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class App extends Component {
204204
<div id='window-nav'>
205205
<img id='logo' src='./hexagonFAT.png' alt='devtool logo' />
206206
<button className='window-btn active' id='graphqlbtn' data-btn='Graphql' onClick={(e) => { this.handleWindowChange(e.target); }}>GraphQL</button>
207-
<button className='window-btn' id='reactbtn' data-btn='React' onClick={(e) => { this.handleWindowChange(e.target); }}>Component Tree</button>
207+
<button className='window-btn' id='reactbtn' data-btn='React' onClick={(e) => { this.handleWindowChange(e.target); }}>React</button>
208208
</div>
209209

210210
{/* This checks what window the user has click on.

0 commit comments

Comments
 (0)