Skip to content

Commit 3bc9011

Browse files
committed
fix light theme
1 parent 4117245 commit 3bc9011

File tree

12 files changed

+56
-48
lines changed

12 files changed

+56
-48
lines changed

packages/graphql-playground-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-react",
3-
"version": "1.5.13",
3+
"version": "1.6.0",
44
"main": "./lib/lib.js",
55
"typings": "./lib/lib.d.ts",
66
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
@@ -116,7 +116,7 @@
116116
"dependencies": {
117117
"apollo-link": "^1.0.7",
118118
"apollo-link-http": "^1.3.2",
119-
"apollo-link-ws": "^1.0.7",
119+
"apollo-link-ws": "1.0.4",
120120
"calculate-size": "^1.1.1",
121121
"classnames": "^2.2.5",
122122
"codemirror": "^5.36.0",

packages/graphql-playground-react/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
npm publish
5+
#npm publish
66

77
curl -X POST \
88
http://purge.jsdelivr.net/ \

packages/graphql-playground-react/src/components/Playground/Tab.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class Tab extends React.PureComponent<Props & ReduxProps, State> {
7575
margin-left: 0;
7676
}
7777
.light.tab {
78+
color: $darkBlue80;
7879
background-color: #e7eaec;
7980
&.active {
8081
background-color: #eeeff0;
@@ -144,6 +145,12 @@ class Tab extends React.PureComponent<Props & ReduxProps, State> {
144145
@p: .o100;
145146
}
146147
}
148+
149+
.light.tab .operation-name,
150+
.light.tab :global(input) {
151+
color: $darkBlue80;
152+
}
153+
147154
.tab :global(input) {
148155
opacity: 1 !important;
149156
}

packages/graphql-playground-react/src/components/Playground/TopBar/TopBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const inactiveFontColor = theme('mode', {
173173
})
174174

175175
const fontColor = theme('mode', {
176-
light: p => p.theme.colours.darkBlue60,
176+
light: p => p.theme.colours.darkBlue80,
177177
dark: p => p.theme.colours.white60,
178178
})
179179

packages/graphql-playground-react/src/components/ProjectsSideNav.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,32 +126,34 @@ const mapStateToProps = createStructuredSelector({
126126
export default connect(mapStateToProps, { openConfigTab })(ProjectsSideNav)
127127

128128
const textColor = theme('mode', {
129-
light: p => p.theme.colours.white,
129+
light: p => p.theme.colours.darkBlue80,
130130
dark: p => p.theme.colours.white,
131131
})
132132

133133
const backgroundColor = theme('mode', {
134-
light: p => p.theme.colours.darkBlue,
134+
light: p => p.theme.colours.lightGrey,
135135
dark: p => p.theme.colours.darkBlue,
136136
})
137137

138138
const darkerBackgroundColor = theme('mode', {
139-
light: p => p.theme.colours.darkerBlue,
139+
// light: p => '#dbdee0',
140+
light: p => p.theme.colours.lightGrey,
140141
dark: p => p.theme.colours.darkerBlue,
141142
})
142143

143144
const borderColor = theme('mode', {
144-
light: p => p.theme.colours.darkestBlue,
145+
light: p => '#dbdee0',
146+
// light: p => p.theme.colours.lightGrey,
145147
dark: p => p.theme.colours.darkestBlue,
146148
})
147149

148150
const footerBackgroundColor = theme('mode', {
149-
light: p => p.theme.colours.darkBlue,
151+
light: p => p.theme.colours.lighterGrey,
150152
dark: p => p.theme.colours.darkBlue,
151153
})
152154

153155
const buttonFontColor = theme('mode', {
154-
light: p => p.theme.colours.darkBlue,
156+
light: p => p.theme.colours.lightGrey,
155157
dark: p => p.theme.colours.darkBlue,
156158
})
157159

@@ -166,12 +168,12 @@ const buttonHoverBackgroundColor = theme('mode', {
166168
})
167169

168170
const iconColor = theme('mode', {
169-
light: p => p.theme.colours.white20,
171+
light: p => p.theme.colours.darkBlue20,
170172
dark: p => p.theme.colours.white20,
171173
})
172174

173175
const iconColorActive = theme('mode', {
174-
light: p => p.theme.colours.white60,
176+
light: p => p.theme.colours.darkBlue60,
175177
dark: p => p.theme.colours.white60,
176178
})
177179

@@ -184,10 +186,7 @@ const SideNav = styled.div`
184186
background: ${backgroundColor};
185187
flex: 0 222px;
186188
color: ${textColor};
187-
188-
@p: .white, .relative, .bgDarkBlue;
189-
border-right: 6px solid ${borderColor};
190-
}
189+
border-right: 6px solid ${borderColor};
191190
.left-content.light {
192191
@p: .bgWhite70, .black60;
193192
}
@@ -212,7 +211,7 @@ const List = styled.div`
212211
const Title = styled.div`
213212
font-size: 16px;
214213
font-weight: 600;
215-
color: white;
214+
color: ${textColor};
216215
`
217216

218217
const TitleRow = styled.div`
@@ -241,7 +240,7 @@ const TitleRow = styled.div`
241240

242241
const ProjectName = styled.div`
243242
font-size: 14px;
244-
color: white;
243+
color: ${textColor};
245244
font-weight: 600;
246245
letter-spacing: 0.53px;
247246
margin-left: 30px;

packages/graphql-playground-react/src/components/ProjectsSideNavItem.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
22
import * as cx from 'classnames'
33
import { styled } from '../styled/index'
4+
import * as theme from 'styled-theming'
45

56
export interface Props {
67
env: string
@@ -36,6 +37,16 @@ export default class ProjectsSideNavItem extends React.Component<Props, {}> {
3637
}
3738
}
3839

40+
const textColor = theme('mode', {
41+
light: p => p.theme.colours.darkBlue80,
42+
dark: p => p.theme.colours.white,
43+
})
44+
45+
const backgroundColor = theme('mode', {
46+
light: p => p.theme.colours.lighterGrey,
47+
dark: p => p.theme.colours.darkBlue,
48+
})
49+
3950
const ListItem = styled.div`
4051
padding: 10px 10px;
4152
font-weight: 600;
@@ -55,7 +66,7 @@ const ListItem = styled.div`
5566
padding-right: 10px;
5667
}
5768
&.active {
58-
background: ${p => p.theme.colours.darkBlue};
69+
background: ${backgroundColor};
5970
position: relative;
6071
&:before {
6172
content: '';
@@ -69,9 +80,9 @@ const ListItem = styled.div`
6980
}
7081
}
7182
&:hover {
72-
background: ${p => p.theme.colours.darkBlue};
83+
background: ${backgroundColor};
7384
.count {
74-
color: white;
85+
color: ${textColor};
7586
}
7687
}
7788
`
@@ -90,6 +101,6 @@ const Count = styled.div`
90101
color: rgba(255, 255, 255, 0.3);
91102
transition: 0.1s linear all;
92103
&.active {
93-
color: white;
104+
color: ${textColor};
94105
}
95106
`

packages/graphql-playground-react/src/state/workspace/reducers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,7 @@ function normalizeSettings(settings) {
152152
return settings
153153
}
154154

155-
export const getTheme = createSelector([getSettings], s => s.theme || 'dark')
155+
export const getTheme = createSelector(
156+
[getSettings],
157+
s => s['editor.theme'] || 'dark',
158+
)

packages/graphql-playground-react/src/styled/theme.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export interface Colours {
2121
paleGrey: string
2222
red: string
2323
purple: string
24+
lightGrey: string
25+
lighterGrey: string
2426
}
2527

2628
export const colours: Colours = {
@@ -47,6 +49,8 @@ export const colours: Colours = {
4749

4850
paleText: 'rgba(0, 0, 0, 0.5)',
4951
paleGrey: '#f3f4f4', // use for bgs, borders, etc
52+
lightGrey: '#eeeff0',
53+
lighterGrey: '#f6f7f7',
5054
}
5155

5256
export interface Sizes {

packages/graphql-playground-react/src/styles/graphiql_dark.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@
371371
font-family: 'Source Code Pro', 'Consolas', 'Inconsolata', 'Droid Sans Mono',
372372
'Monaco', monospace;
373373
font-size: 14px;
374+
font-weight: 500;
374375
height: 100%;
375376
left: 0;
376377
position: absolute;

packages/graphql-playground-react/src/styles/graphiql_light.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
.docs-graphiql .variable-editor .cm-variable,
243243
.docs-graphiql .variable-editor .cm-punctuation,
244244
.docs-graphiql .variable-editor .cm-string {
245-
color: rgb(28, 191, 50);
245+
color: #328c8c;
246246
}
247247

248248
.docs-graphiql .graphiql-container .codemirrorWrap {

0 commit comments

Comments
 (0)