Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Commit 7004463

Browse files
authored
Merge branch 'dev' into search-bot
2 parents d146606 + 04e0f51 commit 7004463

File tree

11 files changed

+710
-678
lines changed

11 files changed

+710
-678
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ before_install:
1010
- npm i -g npm@6.9.0
1111
- npm install -g grunt-cli
1212
install: npm ci
13+
script: travis_retry npm test

src/assets/icons/ic-stage-1.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/ic-stage-2.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/ic-stage-3.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/ic-stage-4.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/sass/base/typography.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ $FONT_STACK: roboto, sans-serif;
1313
-webkit-text-size-adjust: 100%;
1414
-ms-text-size-adjust: 100%;
1515
box-sizing: border-box;
16+
}
17+
18+
html {
19+
font-size: 62.5%;
1620
}

src/assets/sass/scratch/_toolbox.scss

Lines changed: 111 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,27 @@ $category-colours: (
1818
tick-analysis : #2e7d32,
1919
candle : #5e35b1,
2020
miscellaneous : #ffb300,
21+
trade_parameters : #30409f,
22+
purchase_conditions: #00897b,
23+
sell_conditions : #78909c,
24+
trade_results : #d81a60,
25+
technical_analysis : #689e38,
26+
utility : #8e25aa,
27+
math : #fc8b01,
28+
text : #5d4037,
29+
logic : #1876d2,
30+
lists : #e53836,
31+
custom_functions : #00acc1,
32+
variables : #616161,
33+
loops : #afb42b,
2134
);
2235

2336
.toolbox {
24-
$toolbox : &;
25-
$white : #fff;
26-
$lightgrey: #ebebeb;
27-
$grey : #f4f4f6;
37+
$toolbox : &;
38+
$white : #fff;
39+
$lightgrey : #ebebeb;
40+
$grey : #f4f4f6;
41+
$category-text-spacing: 15px;
2842

2943
background-color: $white;
3044
border: 1px solid $lightgrey;
@@ -37,81 +51,113 @@ $category-colours: (
3751
overflow: hidden;
3852
position: absolute;
3953
user-select: none;
40-
z-index: 99 !important;
54+
z-index: 1;
55+
width: 250px;
4156

4257
&__header {
58+
padding: 0.5em;
59+
position: relative;
4360
font-weight: bold;
61+
font-size: 1.6em;
4462
background-color: $grey;
63+
text-align: center;
64+
}
65+
&__item {
66+
display: flex;
67+
flex-direction: row;
68+
}
69+
&__category-arrow {
70+
display: flex;
71+
margin: auto;
72+
73+
&--back {
74+
margin-left: $category-text-spacing;
75+
fill: $white;
76+
@include vendor(transform, rotate(90deg));
77+
}
78+
&--open {
79+
margin-right: $category-text-spacing;
80+
@include vendor(transform, rotate(270deg));
81+
}
82+
}
83+
&__category-colour {
84+
width: 5px;
85+
flex-shrink: 0;
4586
}
87+
@each $category, $colour in $category-colours {
88+
&__category {
89+
&--#{$category} {
90+
#{$toolbox}__category-colour {
91+
background-color: $colour;
92+
}
93+
}
94+
}
95+
&__category-return {
96+
#{$toolbox}__category {
97+
&--#{$category} {
98+
background-color: $colour;
99+
}
100+
}
101+
}
102+
}
103+
46104
&__category-menu {
47105
display: flex;
48106
flex-direction: column;
49107
flex-grow: 1;
50108
min-height: 0;
51109
overflow: auto;
52110
}
53-
&__row {
54-
cursor: pointer;
55-
border-top: 1px solid $lightgrey;
56-
}
57-
&__header, &__label {
58-
font-size: 1em;
59-
padding: 0.6em 1em;
60-
}
61-
&__title {
62-
margin-right: 0.6em;
63-
}
64-
&__arrow {
111+
&__category-return {
65112
cursor: pointer;
66-
position: absolute;
67-
top: 0.6em;
68-
right: 0.6em;
69-
@include vendor(transform, rotate(90deg));
70-
@include vendor(transition, transform 0.25s ease);
113+
color: $white;
114+
text-align: center;
115+
116+
#{$toolbox}__label {
117+
margin-left: -($category-text-spacing * 2);
118+
}
71119
}
72-
&__item {
73-
position: relative;
120+
&__category-text {
121+
align-self: center;
122+
margin: $category-text-spacing;
123+
width: 100%;
74124
}
75-
&__color {
76-
position: absolute;
77-
left: 0;
78-
width: 4px;
79-
height: 100%;
125+
&__description {
126+
font-size: 1.3em;
80127
}
81-
&--collapsed {
82-
#{$toolbox}__header, #{$toolbox}__item {
83-
padding: 0.6em;
84-
}
85-
#{$toolbox}__color {
86-
position: relative;
87-
width: 20px;
88-
height: 20px;
89-
border-radius: 50%;
90-
}
91-
#{$toolbox}__title, #{$toolbox}__label {
92-
display: none;
93-
}
94-
#{$toolbox}__arrow {
95-
position: relative;
96-
@include vendor(transform, rotate(270deg));
97-
margin-top: -2px;
98-
top: 0;
99-
right: -2px;
100-
}
101-
#{$toolbox}__row {
102-
border-top: none;
128+
&__icon {
129+
display: flex;
130+
align-self: center;
131+
margin-right: $category-text-spacing;
132+
133+
> svg {
134+
height: 25px;
135+
width: 25px;
103136
}
104137
}
105-
@each $category, $category-colour in $category-colours {
106-
&__category--#{$category}#{&}__category--selected {
107-
background-color: transparentize($category-colour, 0.9);
138+
&__label {
139+
font-weight: bold;
140+
font-size: 1.6em;
141+
}
142+
&__row {
143+
cursor: pointer;
144+
border-top: 1px solid $lightgrey;
145+
146+
&:last-of-type {
147+
border-bottom: 1px solid $lightgrey;
108148
}
109-
&__category--#{$category} {
110-
&:hover {
111-
background-color: transparentize($category-colour, 0.95);
112-
}
113-
& > #{$toolbox}__color {
114-
background-color: $category-colour;
149+
150+
@each $category, $colour in $category-colours {
151+
#{$toolbox}__category {
152+
&--#{$category} {
153+
&:hover:not(#{$toolbox}__category--selected) {
154+
background-image: linear-gradient(to right, $white 25%, transparentize($colour, 0.8) 100%);
155+
}
156+
}
157+
&--#{$category}#{$toolbox}__category--selected {
158+
background-color: transparentize($colour, 0.9);
159+
@include vendor(transition, background-color 0.25s ease);
160+
}
115161
}
116162
}
117163
}
@@ -122,4 +168,9 @@ $category-colours: (
122168
border: solid $grey 1px;
123169
margin: 3px;
124170
}
171+
172+
&__separator {
173+
padding: 20px 0;
174+
border-top: 1px solid $lightgrey;
175+
}
125176
}

src/components/Icons.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import React from 'react';
22
import arrow from '../assets/icons/ic-arrow.svg';
33
import logo from '../assets/icons/ic-logo.svg';
44
import tradeActive from '../assets/icons/ic-trade-active.svg';
5+
import stage1 from '../assets/icons/ic-stage-1.svg';
6+
import stage2 from '../assets/icons/ic-stage-2.svg';
7+
import stage3 from '../assets/icons/ic-stage-3.svg';
8+
import stage4 from '../assets/icons/ic-stage-4.svg';
59

610
/* eslint-disable react/display-name */
711
export const Icon = svgItem => (props) => {
@@ -18,3 +22,7 @@ export const Icon = svgItem => (props) => {
1822
export const LogoIcon = Icon(logo);
1923
export const TradeActive = Icon(tradeActive);
2024
export const ArrowIcon = Icon(arrow);
25+
export const Stage1Icon = Icon(stage1);
26+
export const Stage2Icon = Icon(stage2);
27+
export const Stage3Icon = Icon(stage3);
28+
export const Stage4Icon = Icon(stage4);

0 commit comments

Comments
 (0)