Skip to content

Commit 3f42bdf

Browse files
committed
Numerous updates of dashboard styles according to new feedback from Dara
1 parent 9069c06 commit 3f42bdf

File tree

21 files changed

+118
-306
lines changed

21 files changed

+118
-306
lines changed

.exchange-rates.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1519995600,"base":"USD","rates":{"AED":3.672973,"AFN":69.3625,"ALL":107.18,"AMD":480.870377,"ANG":1.78469,"AOA":214.868,"ARS":20.1494,"AUD":1.290642,"AWG":1.784998,"AZN":1.68825,"BAM":1.589199,"BBD":2,"BDT":83.006132,"BGN":1.589458,"BHD":0.377087,"BIF":1759.65,"BMD":1,"BND":1.319898,"BOB":6.933781,"BRL":3.26489,"BSD":1,"BTC":0.000090891719,"BTN":65.19905,"BWP":9.581646,"BYN":1.966043,"BZD":2.009645,"CAD":1.28744,"CDF":1626.123744,"CHF":0.935395,"CLF":0.0225,"CLP":598.425,"CNH":6.348752,"CNY":6.3451,"COP":2899.159664,"CRC":569.953642,"CUC":1,"CUP":25.5,"CVE":90.73,"CZK":20.646227,"DJF":177,"DKK":6.051132,"DOP":49.344373,"DZD":113.9785,"EGP":17.6465,"ERN":14.996667,"ETB":27.406634,"EUR":0.812454,"FJD":2.021904,"FKP":0.725301,"GBP":0.725301,"GEL":2.465148,"GGP":0.725301,"GHS":4.4624,"GIP":0.725301,"GMD":47.21,"GNF":9025.85,"GTQ":7.37607,"GYD":206.503743,"HKD":7.8294,"HNL":23.651203,"HRK":6.048004,"HTG":64.317911,"HUF":254.868,"IDR":13730.326709,"ILS":3.45192,"IMP":0.725301,"INR":65.26,"IQD":1191.475723,"IRR":37302.484098,"ISK":100.685,"JEP":0.725301,"JMD":127.103211,"JOD":0.709001,"JPY":105.378,"KES":101.3035,"KGS":68.035298,"KHR":4044.291667,"KMF":403.471027,"KPW":900,"KRW":1083.6325,"KWD":0.2999,"KYD":0.832996,"KZT":322.79,"LAK":8286.95,"LBP":1515.349713,"LKR":155.208454,"LRD":130.376991,"LSL":11.887879,"LYD":1.337696,"MAD":9.203417,"MDL":16.701559,"MGA":3194.45,"MKD":50.025,"MMK":1340.25,"MNT":2391.281976,"MOP":8.063195,"MRO":356,"MRU":35.325,"MUR":33.049,"MVR":15.460011,"MWK":725.715,"MXN":18.970085,"MYR":3.919802,"MZN":61.855,"NAD":11.887879,"NGN":360.390593,"NIO":31.109504,"NOK":7.807153,"NPR":104.338714,"NZD":1.382447,"OMR":0.38499,"PAB":1,"PEN":3.262106,"PGK":3.242796,"PHP":52.018,"PKR":110.5905,"PLN":3.40783,"PYG":5551.95,"QAR":3.640999,"RON":3.785803,"RSD":95.903,"RUB":57.215,"RWF":864.913459,"SAR":3.750619,"SBD":7.79699,"SCR":13.455149,"SDG":18.094114,"SEK":8.251749,"SGD":1.321207,"SHP":0.725301,"SLL":7668.450022,"SOS":578.201395,"SRD":7.468,"SSP":130.2634,"STD":19935.790523,"STN":20.175,"SVC":8.748533,"SYP":514.98999,"SZL":11.889751,"THB":31.48,"TJS":8.823181,"TMT":3.50998,"TND":2.389455,"TOP":2.217721,"TRY":3.823294,"TTD":6.728722,"TWD":29.3256,"TZS":2254.05,"UAH":26.534012,"UGX":3649.35,"USD":1,"UYU":28.365637,"UZS":8170.15,"VEF":28960,"VND":22757.110027,"VUV":105.255077,"WST":2.526233,"XAF":532.935214,"XAG":0.06088104,"XAU":0.00075683,"XCD":2.70255,"XDR":0.692714,"XOF":532.935214,"XPD":0.00100937,"XPF":96.951611,"XPT":0.00103681,"YER":250.294142,"ZAR":11.967003,"ZMW":9.756,"ZWL":322.355011}}
1+
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1520038805,"base":"USD","rates":{"AED":3.673014,"AFN":69.475,"ALL":107.5,"AMD":480.77,"ANG":1.784194,"AOA":215.1155,"ARS":20.264,"AUD":1.2889,"AWG":1.786505,"AZN":1.68825,"BAM":1.58875,"BBD":2,"BDT":82.977763,"BGN":1.58816,"BHD":0.377075,"BIF":1775,"BMD":1,"BND":1.321966,"BOB":6.910011,"BRL":3.2528,"BSD":1,"BTC":0.00009030383,"BTN":65.19905,"BWP":9.578914,"BYN":1.965596,"BZD":2.009098,"CAD":1.288544,"CDF":1615,"CHF":0.938145,"CLF":0.0225,"CLP":598.8,"CNH":6.330917,"CNY":6.3484,"COP":2867,"CRC":569.71,"CUC":1,"CUP":25.5,"CVE":89.7375,"CZK":20.5919,"DJF":177.075,"DKK":6.04549,"DOP":49.13,"DZD":114.04071,"EGP":17.641,"ERN":14.996667,"ETB":27.56,"EUR":0.81179,"FJD":2.021996,"FKP":0.7246,"GBP":0.7246,"GEL":2.463723,"GGP":0.7246,"GHS":4.46,"GIP":0.7246,"GMD":47.2,"GNF":9000,"GTQ":7.373907,"GYD":206.445,"HKD":7.830598,"HNL":23.601015,"HRK":6.038184,"HTG":64.297808,"HUF":254.66,"IDR":13730.326709,"ILS":3.442442,"IMP":0.7246,"INR":65.1967,"IQD":1183,"IRR":37302.484098,"ISK":100.59,"JEP":0.7246,"JMD":127.1499,"JOD":0.709001,"JPY":105.75296581,"KES":101.3855,"KGS":68.035298,"KHR":4002,"KMF":399.45,"KPW":900,"KRW":1079.65,"KWD":0.299888,"KYD":0.832789,"KZT":322.647036,"LAK":8305,"LBP":1512.5,"LKR":155.13,"LRD":130.5,"LSL":11.91,"LYD":1.33,"MAD":9.2,"MDL":16.695982,"MGA":3117.5,"MKD":49.983876,"MMK":1339.7,"MNT":2390.948643,"MOP":8.06072,"MRO":356,"MRU":35.3,"MUR":33.04,"MVR":15.460011,"MWK":725.725,"MXN":18.812575,"MYR":3.930279,"MZN":61.855,"NAD":11.915,"NGN":360.5,"NIO":31.085,"NOK":7.796875,"NPR":104.297226,"NZD":1.382,"OMR":0.384918,"PAB":1,"PEN":3.2565,"PGK":3.195,"PHP":51.939,"PKR":110.65,"PLN":3.4003,"PYG":5550.4,"QAR":3.641996,"RON":3.782471,"RSD":95.696456,"RUB":56.815,"RWF":856,"SAR":3.75015,"SBD":7.76394,"SCR":13.699823,"SDG":18.01,"SEK":8.2507,"SGD":1.319653,"SHP":0.7246,"SLL":7668.450022,"SOS":582,"SRD":7.468,"SSP":130.2634,"STD":19933.390132,"STN":19.985,"SVC":8.745727,"SYP":514.98999,"SZL":11.91,"THB":31.4455,"TJS":8.820764,"TMT":3.499986,"TND":2.4212,"TOP":2.217721,"TRY":3.806784,"TTD":6.73915,"TWD":29.283,"TZS":2254.1,"UAH":26.5275,"UGX":3648.3,"USD":1,"UYU":28.40176,"UZS":8180,"VEF":28960,"VND":22757.110027,"VUV":105.255077,"WST":2.5271,"XAF":532.499333,"XAG":0.06061195,"XAU":0.00075614,"XCD":2.70255,"XDR":0.689644,"XOF":532.499333,"XPD":0.00100706,"XPF":96.872315,"XPT":0.00103467,"YER":250.325,"ZAR":11.923195,"ZMW":9.74,"ZWL":322.355011}}

src/assets/images/filter-icon.svg

Lines changed: 11 additions & 0 deletions
Loading

src/shared/components/Dashboard/Announcement/style.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060

6161
.text {
62-
@include tc-body-md;
62+
@include tc-body-lg;
6363
}
6464

6565
.title {
@@ -93,20 +93,21 @@
9393
width: 100%;
9494

9595
.text {
96-
@include tc-heading-lg;
96+
@include tc-heading-md;
9797

9898
color: $tc-white;
99+
font-weight: 100;
99100
overflow: hidden;
100101
text-overflow: ellipsis;
101102
white-space: nowrap;
102103
}
103104

104105
.title {
105-
@include tc-heading-lg;
106+
@include tc-heading-md;
106107

107108
color: $tc-white;
108-
font-weight: 900;
109-
margin: 0 30px 0 0;
109+
font-weight: 400;
110+
margin: 0 15px 0 0;
110111
white-space: nowrap;
111112
}
112113

src/shared/components/Dashboard/CommunityBlog/Card/index.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ export default function Card({
88
text,
99
title,
1010
}) {
11+
const normalizedLink =
12+
link.replace(/^https:\/\/wwwtc\.staging\.wpengine\.com/,
13+
'https://www.topcoder.com');
1114
return (
1215
<div styleName="container">
1316
<h1 styleName="title">
1417
<a
15-
href={link}
18+
href={normalizedLink}
1619
rel="noopener noreferrer"
1720
target="_blank"
1821
>{title}</a>
@@ -25,7 +28,7 @@ export default function Card({
2528
/>
2629
<div styleName="fade" />
2730
<a
28-
href={link}
31+
href={normalizedLink}
2932
rel="noopener noreferrer"
3033
styleName="readMore"
3134
target="_blank"

src/shared/components/Dashboard/CommunityBlog/Card/style.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,10 @@
7777
position: absolute;
7878

7979
&,
80-
&:active {
81-
color: $tc-dark-blue-110;
82-
}
83-
84-
&:hover {
85-
color: $tc-dark-blue-70;
86-
}
87-
80+
&:active,
81+
&:hover,
8882
&:visited {
89-
color: $tc-purple-110;
83+
color: $tc-dark-blue-110;
9084
}
9185
}
9286

@@ -95,5 +89,7 @@
9589

9690
background: $tc-gray-neutral-light;
9791
color: $tc-dark-blue-110;
92+
font-weight: 300;
93+
min-height: 100px;
9894
padding: 20px 30px;
9995
}

src/shared/components/Dashboard/CommunityBlog/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import "~styles/mixins";
22

33
.container {
4-
padding: 40px 0 30px;
4+
padding: 60px 0 30px;
55
}
66

77
.content {

src/shared/components/Dashboard/CurrentActivity/ChallengeFilter/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import LoadingIndicator from 'components/LoadingIndicator';
44
import React from 'react';
55
import PT from 'prop-types';
66

7+
import FilterIcon from '../../../../../assets/images/filter-icon.svg';
8+
79
import './style.scss';
810

911
export default function ChallengeFilter({
@@ -19,7 +21,7 @@ export default function ChallengeFilter({
1921
<div
2022
onMouseEnter={() => expand(true)}
2123
styleName="button"
22-
>F</div>
24+
><FilterIcon /></div>
2325
);
2426
}
2527

src/shared/components/Dashboard/CurrentActivity/ChallengeFilter/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
cursor: pointer;
1010
height: 45px;
1111
margin: 10px;
12+
padding: 5px 10px;
1213
min-width: 45px;
1314
text-align: center;
1415
}

src/shared/components/Dashboard/CurrentActivity/Challenges/ChallengeCard/index.jsx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ const DAY_MS = 24 * HOUR_MS;
2929

3030
const ALERT_TIME = 24 * HOUR_MS;
3131

32+
function normalizeSubTrackTagForRendering(subTrack) {
33+
let x;
34+
switch (subTrack) {
35+
case 'WEB_DESIGNS': x = 'Web Design'; break;
36+
default: x = subTrack;
37+
}
38+
return _.startCase(_.toLower(x));
39+
}
40+
3241
export default function ChallengeCard({
3342
challenge,
3443
selectChallengeDetailsTab,
@@ -78,19 +87,28 @@ export default function ChallengeCard({
7887
'Copilot',
7988
]).length;
8089

81-
const showOrLink = _.intersection(roles, [
90+
let showOrLink = _.intersection(roles, [
8291
'Approver',
8392
'Copilot',
8493
'Reviewer',
8594
]).length;
8695

8796
const submitter = roles.includes('Submitter');
88-
// const submitted = userDetails.hasUserSubmittedForReview;
97+
const submitted = userDetails.hasUserSubmittedForReview;
8998
let nextPhase = currentPhases && currentPhases[0];
9099
if (submitter && nextPhase && nextPhase.phaseType === 'Registration') {
91100
nextPhase = currentPhases[1];
92101
}
93102

103+
const nextPhaseType = _.get(nextPhase, 'phaseType');
104+
105+
if (submitted && _.intersection(nextPhaseType, [
106+
'Appeals',
107+
'Appeal Response',
108+
]).length) showOrLink = true;
109+
110+
const submissionOpen = nextPhaseType === 'Submission';
111+
94112
let statusMsg;
95113
let deadlineMsg;
96114
let msgStyleModifier = '';
@@ -138,7 +156,7 @@ export default function ChallengeCard({
138156
theme={{ button: style.tag }}
139157
to={`/challenges?filter[subtracks][0]=${
140158
encodeURIComponent(subTrack)}`}
141-
>{_.startCase(_.toLower(challenge.subTrack))}</EventTag>
159+
>{normalizeSubTrackTagForRendering(challenge.subTrack)}</EventTag>
142160
{
143161
isTco ? (
144162
<EventTag
@@ -199,7 +217,7 @@ export default function ChallengeCard({
199217
) : null
200218
}
201219
{
202-
submitter ? (
220+
submitter && submissionOpen ? (
203221
<Button
204222
size="sm"
205223
theme={{ button: style.button }}

src/shared/components/Dashboard/CurrentActivity/Challenges/ChallengeCard/style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272

7373
&.alert {
7474
color: $tc-red-110;
75-
font-weight: bold;
75+
font-weight: 300;
7676
}
7777
}
7878

7979
.statusPanel {
8080
align-items: center;
8181
display: flex;
8282
flex-direction: column;
83-
padding: 30px 20px 40px;
83+
padding: 20px;
8484
}
8585

8686
.tag {

src/shared/components/Dashboard/CurrentActivity/Challenges/index.jsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ import LoadingIndicator from 'components/LoadingIndicator';
33
import PT from 'prop-types';
44
import React from 'react';
55
import Sticky from 'react-stickynode';
6+
import { Link } from 'topcoder-react-utils';
67

78
import * as Filter from 'utils/challenge-listing/filter';
89

910
import ChallengeCard from './ChallengeCard';
1011
import ChallengeFilter from '../ChallengeFilter';
12+
1113
import style from './style.scss';
1214

1315
export default function Challenges({
@@ -57,9 +59,33 @@ export default function Challenges({
5759
))
5860
) : (
5961
<div styleName="msg">
60-
No active challenges found
6162
{
62-
challengeFilter ? ' in the selected community' : null
63+
challengeFilter ? (
64+
'You have no active challenges in the selected community'
65+
) : (
66+
<div>
67+
<p>
68+
You have no active challenges at this moment. What are
69+
you interested&nbsp;in?
70+
&zwnj;<Link
71+
openNewTab
72+
to={config.URL.ARENA}
73+
>Competitive Programming</Link>?
74+
&zwnj;<Link
75+
openNewTab
76+
to="/challenges?filter[tracks][datasci]=true"
77+
>Data Science</Link>?
78+
&zwnj;<Link
79+
openNewTab
80+
to="/challenges?filter[tracks][design]=true"
81+
>Design</Link>?
82+
&zwnj;<Link
83+
openNewTab
84+
to="/challenges?filter[tracks][develop]=true"
85+
>Software Development</Link>?
86+
</p>
87+
</div>
88+
)
6389
}
6490
</div>
6591
)

src/shared/components/Dashboard/CurrentActivity/Challenges/style.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,16 @@
4343
.msg {
4444
@include tc-heading-md;
4545

46+
max-width: 640px;
4647
padding: 20px 0 0;
48+
49+
a,
50+
a:active,
51+
a:focus,
52+
a:hover,
53+
a:visited {
54+
color: $tc-dark-blue-110;
55+
}
4756
}
4857

4958
.sticky {

src/shared/components/Dashboard/CurrentActivity/Header/Option/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export default function Option({ select, selected, title }) {
1515
role="button"
1616
tabIndex={0}
1717
>{title}</div>
18+
{
19+
selected ? <div styleName="selectedUnderline" /> : null
20+
}
1821
</div>
1922
);
2023
}
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
@import "~styles/mixins";
22

33
.container {
4-
@include tc-heading-lg;
4+
@include tc-heading-md;
55

6-
color: $tc-dark-blue-110;
6+
color: $tc-dark-blue-70;
77
cursor: pointer;
8-
padding: 0 10px 20px;
8+
padding: 0 10px;
99
margin: 0 10px;
10+
text-transform: uppercase;
1011
}
1112

1213
.selected {
14+
color: $tc-black;
15+
cursor: default;
16+
font-weight: 500;
17+
}
18+
19+
.selectedUnderline {
1320
border-bottom: 2px solid $tc-black;
1421
color: $tc-black;
1522
cursor: default;
23+
margin: 10px auto;
24+
width: 70%;
1625
}

0 commit comments

Comments
 (0)