Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 3e5643a

Browse files
author
vikasrohit
committed
SUP-2231, New Empty States for Dashboard and Profile
-- Updated background images for empty states -- Fixed margin/paddings of non empty states as well to do styling for empty states. Moved paddings from parent elements to child elements so that we have better control on them in empty states.
1 parent b2b953f commit 3e5643a

16 files changed

+74
-119
lines changed

app/my-challenges/my-challenges.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
vm.loading = CONSTANTS.STATE_READY;
8989

9090
vm.totalCount = _.sum(_.pluck(data, 'metadata.totalCount'));
91-
vm.myChallenges = [];//vm.myChallenges.concat(_.union(data[0], data[1]));
91+
vm.myChallenges = vm.myChallenges.concat(_.union(data[0], data[1]));
9292
})
9393
.catch(function(resp) {
9494
$log.error(resp);

app/my-challenges/my-challenges.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
.content
88

99
.never-participated(ng-if="vm.neverParticipated")
10-
empty-state-placeholder(title="My Challenges", description="Compete in challenges to win money, test yourself against the world's best, and learn new skills")
10+
empty-state-placeholder(title="My Challenges", description="Compete in challenges to win money, test yourself against the world's best, and learn new skills", show="vm.neverParticipated")
1111
.info-links
1212
a.find-challenges.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenges/?pageIndex=1") Find Challenges
1313

1414
a.learn-more(href="https://www.{{DOMAIN}}/community/getting-started/") Learn More
15-
section.challenges(ng-if="!vm.neverParticipated")
15+
section.participated(ng-if="!vm.neverParticipated")
1616
.top
1717
.filters
1818
a(ng-click="vm.statusFilter !== 'active' && vm.changeFilter('active')", ng-class="{disabled: vm.statusFilter == 'active'}") Active
@@ -34,7 +34,7 @@
3434
a.find-challenges.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenges/?pageIndex=1") Find Challenges
3535
a.learn-more(href="https://www.{{DOMAIN}}/community/getting-started/") Learn More
3636

37-
tc-section.hasChallenges(ng-show="vm.myChallenges.length", state="vm.loading")
37+
.hasChallenges(ng-show="vm.myChallenges.length", state="vm.loading")
3838

3939
.data(ng-class="vm.view + '-view'")
4040
challenge-tile(

app/my-dashboard/my-dashboard.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.my-dashboard-container
44
.subtrack-stats(id="stats", ui-view="subtrack-stats")
55

6-
.my-challenges(id="challenges", ui-view="my-challenges")
6+
.challenges(id="challenges", ui-view="my-challenges")
77

88
.srms(id="srms", ui-view="srms", ng-show="dashboard.showSRMs")
99

app/my-dashboard/programs/programs.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
function activate() {
2727
MemberCertService.getMemberRegistration(userId, CONSTANTS.SWIFT_PROGRAM_ID)
2828
.then(function(res) {
29-
if (res != null) {
29+
if (res == null) {
3030
vm.registered = false;
3131
vm.loading = false;
3232
} else {

app/my-srms/my-srms.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
.no-srms(ng-if="!vm.srms.length && vm.loading === 'ready'")
1919
empty-state-placeholder(title="Past SRMs", description="You have not participated in any SRMs yet.", show="vm.statusFilter === 'past'")
2020
.info-links
21-
a.find-challenges.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenges/data?pageIndex=1") Find SRMs
21+
a.find-srms.tc-btn.tc-btn-s.tc-btn-ghost(ng-href="https://www.{{DOMAIN}}/challenges/data?pageIndex=1") Find SRMs
2222
a.learn-more(href="https://www.{{DOMAIN}}/community/getting-started/") Learn More
2323
empty-state-placeholder(title="Upcoming SRMs", description="There are no upcoming SRMs.", show="vm.statusFilter === 'future'")
2424

@@ -28,4 +28,4 @@
2828
ng-repeat="srm in vm.srms | orderBy:vm.orderBy:vm.reverseOrder",
2929
srm="srm", view="vm.view", ng-class="vm.view + '-view'", show-results="vm.statusFilter === 'past'")
3030

31-
tc-endless-paginator(state="vm.loading", page-params="vm.pageParams")
31+
tc-endless-paginator(state="vm.loading", page-params="vm.pageParams")

assets/css/my-challenges/my-challenges.scss

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
.never-participated {
3232
padding-top: 30px;
33+
background-image: url('/images/empty-states/pattern-my-challenges.png');
34+
background-repeat: repeat;
3335

3436
.info-links {
3537
text-align: center;
@@ -44,21 +46,46 @@
4446
margin-bottom: 30px;
4547
}
4648

47-
&.participate {
48-
color: $white;
49+
&.find-challenges {
4950
}
5051

5152
&.learn-more {
5253
font-size: 12px;
5354
line-height: 12px;
54-
color: $gray-lighter;
55+
color: $accent-gray;
5556
}
5657
}
5758
}
5859
}
5960

6061
section.noChallenges {
6162
padding-top: 30px;
63+
background-image: url('/images/empty-states/pattern-my-challenges.png');
64+
background-repeat: repeat;
65+
66+
.info-links {
67+
text-align: center;
68+
display: flex;
69+
flex-direction: column;
70+
71+
a {
72+
text-transform: uppercase;
73+
@include sofia-pro-medium;
74+
75+
&:not(:last-child) {
76+
margin-bottom: 30px;
77+
}
78+
79+
&.find-challenges {
80+
}
81+
82+
&.learn-more {
83+
font-size: 12px;
84+
line-height: 12px;
85+
color: $accent-gray;
86+
}
87+
}
88+
}
6289
}
6390

6491
.hasChallenges {
@@ -67,15 +94,16 @@
6794
align-items: center;
6895
border-top: none;// prevent css from my dashboard to
6996
border-bottom: none;// prevent css from my dashboard to override
97+
98+
padding: 15px 15px 30px 15px;
99+
background-color: $gray-lightest;
70100
}
71101

72102
.content {
73103

74-
section.challenges {
104+
section.participated {
75105
background: white;
76106
align-self: center;
77-
padding-bottom: 15px;
78-
padding-top: 10px 20px 0px 20px;
79107
display: flex;
80108
flex-flow: column wrap;
81109
position: relative;
@@ -88,7 +116,7 @@
88116
justify-content: space-between;
89117
padding-top: 35px;
90118
padding-bottom: 35px;
91-
border-bottom: 1px solid #F0F0F0;
119+
border-bottom: 1px solid $gray-light;
92120

93121
.filters {
94122
position: initial;

assets/css/my-dashboard/my-challenges.scss

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import 'topcoder-includes';
22
@import '../partials/combined';
33

4-
.my-challenges {
4+
.challenges {
55
header {
66
position: relative;
77
}
@@ -66,54 +66,12 @@
6666
}
6767

6868
.noChallenges {
69-
display: flex;
70-
flex-direction: column;
71-
align-items: center;
72-
color: $gray-darkest;
73-
padding-left: 20px;
74-
padding-right: 20px;
75-
76-
// TODO remove once we are sure we don't need tracks in empty state
77-
.tracks {
78-
display: flex;
79-
flex-direction: row;
80-
justify-content: space-between;
81-
min-width: 260px;
82-
@media only screen and (min-width: 450px) {
83-
min-width: 350px;
84-
}
85-
86-
.track {
87-
div:first-child {
88-
margin: 0 auto 10px;
89-
@include background-image-size(44px, 44px);
90-
}
91-
92-
&:last-child {
93-
display: none;
94-
@media only screen and (min-width: 450px) {
95-
display: block;
96-
}
97-
}
98-
99-
p {
100-
@include sofia-pro-medium;
101-
font-size: 12px;
102-
text-transform: uppercase;
103-
}
104-
}
105-
.develop-icon-outline {
106-
@include develop-icon-outline;
107-
}
108-
.design-icon-outline {
109-
@include design-icon-outline;
110-
}
111-
.data-science-icon-outline {
112-
@include data-icon-outline;
113-
}
114-
.copilot-icon-outline {
115-
@include copilot-icon-outline;
116-
}
69+
padding-top: 40px;
70+
background-image: url('/images/empty-states/pattern-my-challenges-dashboard.png');
71+
background-repeat: repeat;
72+
.title,
73+
.description {
74+
color: $white;
11775
}
11876

11977
.info-links {

assets/css/my-dashboard/my-dashboard.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,21 @@
1212
background-color: $white;
1313
}
1414

15-
.my-challenges, .srms, .programs, .community-updates {
15+
.challenges, .srms, .programs, .community-updates {
1616
@include module-l;
1717
margin-top: 1px;
1818
width: 100%;
19-
padding-top: 30px;
19+
20+
header {
21+
.section-title {
22+
padding-top: 30px;
23+
}
24+
}
2025
}
2126

22-
.my-challenges, .srms, .programs, .community-updates {
27+
.challenges, .srms, .programs, .community-updates {
2328
@media only screen and (min-width: 900px) {
24-
padding-top: 30px;
29+
padding-top: 0px;
2530
}
2631
}
2732

assets/css/my-dashboard/programs.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@import '../partials/combined';
33

44
.programs {
5-
padding-top: 30px;
65

76
.section-loading {
87
min-height: 200px;
@@ -17,9 +16,17 @@
1716
}
1817

1918
.unregistered {
19+
background-image: url('/images/empty-states/pattern-ios-challenges.png');
20+
background-repeat: repeat;
21+
padding-top: 40px;
2022

2123
.title {
2224
text-transform: none;
25+
color: $white;
26+
}
27+
28+
.description {
29+
color: $white;
2330
}
2431

2532
.info-links {

assets/css/my-srms/my-srms.scss

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -21,54 +21,13 @@
2121
text-align: center;
2222
}
2323

24-
.nav {
25-
@include module-full-width;
26-
background: white;
27-
height: 100px;
28-
padding-left: 60px;
29-
padding-right: 60px;
30-
display: flex;
31-
flex-direction: row;
32-
justify-content: space-between;
33-
align-items: center;
34-
margin-bottom: 8px;
35-
.arrow {
36-
width: 15px;
37-
}
38-
.breadcrumbs {
39-
@include sofia-pro-extra-light;
40-
font-size: 14px;
41-
line-height: 16px;
42-
.dashboard {
43-
display: block;
44-
color: black;
45-
text-align: center;
46-
text-transform: uppercase;
47-
48-
a {
49-
color: black;
50-
text-decoration: none;
51-
52-
&:hover {
53-
color: $primary;
54-
}
55-
}
56-
}
57-
.my-srms {
58-
display: block;
59-
color: $primary;
60-
font-weight: 700;
61-
text-align: center;
62-
text-transform: uppercase;
63-
}
64-
}
65-
}
66-
6724
.no-srms {
68-
margin: 30px;
25+
padding: 30px;
6926
display: flex;
7027
flex-direction: inherit;
7128
align-items: center;
29+
background-image: url('/images/empty-states/pattern-my-challenges.png');
30+
background-repeat: repeat;
7231

7332
.info-links {
7433
text-align: center;
@@ -83,14 +42,13 @@
8342
margin-bottom: 30px;
8443
}
8544

86-
&.participate {
87-
color: $white;
45+
&.find-srms {
8846
}
8947

9048
&.learn-more {
9149
font-size: 12px;
9250
line-height: 12px;
93-
color: $gray-lighter;
51+
color: $accent-gray;
9452
}
9553
}
9654
}
@@ -99,6 +57,7 @@
9957
display: flex;
10058
flex-direction: column;
10159
align-items: center;
60+
padding: 15px 15px 30px 15px;
10261
background-color: $gray-lightest;
10362
}
10463

@@ -107,8 +66,6 @@
10766
section.my-srms {
10867
background: white;
10968
align-self: center;
110-
padding-bottom: 15px;
111-
padding-top: 10px 20px 0px 20px;
11269
display: flex;
11370
flex-flow: column wrap;
11471
position: relative;
@@ -121,7 +78,7 @@
12178
justify-content: space-between;
12279
padding-top: 35px;
12380
padding-bottom: 35px;
124-
border-bottom: 1px solid #F0F0F0;
81+
border-bottom: 1px solid $gray-light;
12582

12683
.filters {
12784
position: initial;
Loading
4.97 KB
Loading
Loading
6.71 KB
Loading
Loading
4.87 KB
Loading

0 commit comments

Comments
 (0)