Skip to content

Commit 48701b5

Browse files
authored
Merge pull request #10 from oslabs-beta/nick
Trying UI updates again
2 parents a360fc3 + 80348d6 commit 48701b5

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default function ComponentMap({
165165
/>
166166

167167
<svg ref={containerRef} width={totalWidth} height={totalHeight}>
168-
<LinearGradient id='links-gradient' from='#fd9b93' to='#fe6e9e' />
168+
<LinearGradient id='links-gradient' from='#e75e62' to='#f00008' />
169169
<rect
170170
onClick={() => {
171171
hideTooltip();
@@ -188,18 +188,19 @@ export default function ComponentMap({
188188
key={i}
189189
data={link}
190190
percent={stepPercent}
191-
stroke='#ff6569'
191+
stroke='#F00008'
192192
strokeWidth='1'
193193
fill='none'
194194
/>
195195
))}
196196

197197
{tree.descendants().map((node, key) => {
198198
const widthFunc:number = (name) => {
199+
// is this the name of the component - so if it's longer it will make the box wider?
199200
const nodeLength = name.length;
200-
if (nodeLength < 5) return nodeLength + 40;
201-
if (nodeLength < 10) return nodeLength + 60;
202-
return nodeLength + 70;
201+
if (nodeLength < 5) return nodeLength + 80; // change from 40 to 80, to see what's affected
202+
if (nodeLength < 10) return nodeLength + 120; // change from 60 to 120 to see what's affected
203+
return nodeLength + 140; // change from 70 to 140 to see what happens
203204
};
204205
const width:number = widthFunc(node.data.name);
205206
const height:number = 25;
@@ -236,9 +237,9 @@ export default function ComponentMap({
236237
<Group top={top} left={left} key={key} className='rect'>
237238
{node.depth === 0 && (
238239
<circle
239-
r={12}
240+
r={25} // increase from 12 to 25 to improve visibility
240241
fill="url('#links-gradient')"
241-
stroke='#ff6569'
242+
stroke='#F00008' // changing to red #F00008 to increase readability with sharper contrast
242243
onClick={() => {
243244
dispatch(toggleExpanded(node.data));
244245
hideTooltip();
@@ -256,7 +257,7 @@ export default function ComponentMap({
256257
fill={node.children ? '#161521' : '#62d6fb'}
257258
stroke={
258259
node.data.isExpanded && node.data.children.length > 0
259-
? '#ff6569'
260+
? '#F00008' // changed to #F00008 for higher contrast
260261
: '#4D4D4D'
261262
}
262263
strokeWidth={1.5}

src/app/styles/components/_buttons.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
border-radius: 5px;
1313
cursor: pointer;
1414
line-height: 1.5em;
15-
font: 400 14px 'Roboto', sans-serif;
15+
font: 400 16px 'Roboto', sans-serif;
1616
// font-size: $button-text-size;
1717
width: 120px;
1818
background: $red-color-gradient;
@@ -60,8 +60,8 @@
6060
border-radius: 3px;
6161
cursor: pointer;
6262
line-height: 1.5em;
63-
font: 300 14px 'Roboto', sans-serif;
64-
font-size: $button-text-size;
63+
font: 500 16px 'Roboto', sans-serif;
64+
// font-size: $button-text-size; increase the font size and contrast for readability
6565
width: 120px;
6666
background: #62d6fb;
6767
}
@@ -94,7 +94,7 @@
9494
border: none;
9595
border-radius: 3px;
9696
background: $grey-color-gradient;
97-
font: normal 11px 'Roboto', sans-serif;
97+
font: normal 16px 'Roboto', sans-serif;
9898
color: #b0b0b0;
9999
}
100100

@@ -106,8 +106,8 @@
106106
border: transparent;
107107
border-radius: 3px;
108108
background-color: #565a61;
109-
font: normal 11px 'Roboto', sans-serif;
110-
color: #b0b0b0;
109+
font: normal 16px 'Roboto', sans-serif;
110+
color: #FFFFFF;
111111
transform: rotateX(90deg);
112112
transition: opacity 300ms, transform 0.15s linear;
113113
opacity: 0;
@@ -143,6 +143,8 @@
143143
border-color: transparent;
144144
background: $blue-color-gradient;
145145
border-radius: 5px;
146+
font-weight: 500;
147+
font-size: 16px;
146148
}
147149

148150
.play-button:hover {

src/app/styles/components/_renderingFrequency.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
font-family: 'Roboto', sans-serif;
4141

4242
h3 {
43-
color: $text-color;
43+
color: #FFFFFF;
4444
margin-bottom: 5px;
4545
margin-top: 5px;
4646
text-transform: uppercase;

src/app/styles/layout/_actionContainer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929
.route {
30-
background-color: #ff6569;
30+
background-color: #F00008;
3131
padding-left: 10px;
3232
padding-top: 5px;
3333
padding-bottom: 5px;

src/app/styles/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
* {
55
font-family: 'Roboto', sans-serif;
6+
font-size: 16px;
67
}
78

89
/* width */

0 commit comments

Comments
 (0)