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

Commit a98a314

Browse files
author
vikasrohit
committed
Merge pull request #666 from appirio-tech/feature/sup-2412-challenge-title-visiblity
SUP-2412, [Usersnap] For all contests, almost all of the types at the top are truncated. Merging to get changes in dev for PM to review.
2 parents da0ceef + 8bbc10d commit a98a314

File tree

7 files changed

+96
-82
lines changed

7 files changed

+96
-82
lines changed

app/directives/challenge-tile/challenge-tile.directive.jade

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
.active-challenge(ng-show="challenge.status === 'ACTIVE'")
33

44
header
5-
.top
6-
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") #[span {{challenge.name}}]
5+
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") #[span {{challenge.name}}]
76

8-
.challenge-track
9-
10-
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
7+
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
118

129
challenge-links(challenge="challenge", view="'tile'")
1310

@@ -38,13 +35,11 @@
3835
.completed-challenge(
3936
ng-show="challenge.status === 'COMPLETED' || challenge.status === 'PAST'",
4037
ng-switch="challenge.track")
41-
.challenge-track
4238

4339
header
44-
.top
45-
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") {{challenge.name}}
40+
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") {{challenge.name}}
4641

47-
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
42+
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
4843

4944
p.date-completed {{challenge.submissionEndDate | date : 'MMMM yyyy'}}
5045

@@ -72,10 +67,9 @@
7267

7368
.challenge.list-view(ng-show="view=='list'", ng-class="challenge.track")
7469
.active-challenge(ng-show="challenge.status === 'ACTIVE'")
75-
.challenge-track
7670

7771
header
78-
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") {{challenge.name}}
72+
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") {{challenge.name}}
7973

8074
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
8175

@@ -102,22 +96,20 @@
10296
.completed-challenge(
10397
ng-show="challenge.status === 'COMPLETED' || challenge.status === 'PAST'",
10498
ng-switch="challenge.track")
105-
.challenge-track
10699

107100
header
108-
a.name(ng-href="{{challenge|challengeLinks:'detail'}}") {{challenge.name}}
101+
a.name(ng-href="{{challenge|challengeLinks:'detail'}}", title="{{challenge.name}}") {{challenge.name}}
109102

110103
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
111104

112105
p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]
113106

114107
.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")
115108

116-
div
117-
.marathon-score
118-
p.score {{challenge.pointTotal || 0 }}
109+
.marathon-score
110+
p.score {{challenge.pointTotal || 0 }}
119111

120-
p Total Points
112+
p Total Points
121113

122114
.challenge-details(ng-switch-when="DEVELOP")
123115
dev-challenge-user-place(challenge="challenge", view="view")

app/directives/challenge-user-place/design-challenge-user-place.directive.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
p.place.passed(ng-show="challenge.userStatus === 'PASSED_SCREENING'") Passed Screening
55
p.place.completed(ng-show="challenge.userStatus === 'COMPLETED'") COMPLETED
66

7-
.thumbnail(ng-click="!challenge.isPrivate && imageURL && openLightbox()", ng-class="{hidden: challenge.userStatus !== 'PASSED_REVIEW'}")
7+
.thumbnail(ng-click="!challenge.isPrivate && imageURL && openLightbox()", ng-hide="challenge.userStatus !== 'PASSED_REVIEW'")
88
img(ng-show="!challenge.isPrivate", ng-src="{{imageURL || '/images/card-bg-no-image.svg'}}", fallback-src="/images/card-bg-no-image.svg")
99
img(ng-show="challenge.isPrivate", src="/images/card-bg-private-project.svg")
1010

app/directives/challenge-user-place/dev-challenge-user-place.directive.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
p.place(ng-show="challenge.userStatus === 'PASSED_SCREENING'") Passed Screening
55
p.place(ng-show="challenge.userStatus === 'COMPLETED'") COMPLETED
66

7-
.challenge-score(ng-class="{hidden: challenge.userStatus !== 'PASSED_REVIEW'}")
7+
.challenge-score(ng-hide="challenge.userStatus !== 'PASSED_REVIEW'")
88
p.score {{challenge.userDetails.submissionReviewScore/100 | percentage}}
99

1010
p Review Score

assets/css/directives/challenge-links.directive.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
width: 100%;
99
border-bottom-right-radius: 3px;
1010
border-bottom-left-radius: 3px;
11-
padding: 0 20px;
12-
margin-bottom: 10px;
1311

1412
a {
1513
text-decoration: none;
1614
p {
1715
color: $accent-gray;
1816
@include font-with-weight('Sofia Pro', 500);
19-
font-size: 12px;
17+
font-size: 10px;
2018
line-height: 14px;
2119
text-transform: uppercase;
2220

assets/css/directives/challenge-tile.scss

Lines changed: 78 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,37 @@
33
// Default Challenge Tile Stylings
44
challenge-tile .challenge.tile-view {
55

6-
// common css for both active and completed challenge for tile-view
7-
height: 350px;
8-
display: flex;
9-
flex-direction: row;
10-
11-
.challenge-track {
12-
width: 5px;
13-
height: 91px;
14-
position: absolute;
15-
top: -1px;
16-
left: -1px;
17-
border-top-left-radius: 4px;
18-
}
19-
206
header {
217
width: 270px;
22-
height: 91px;
238
border-bottom: 1px solid #F0F0F0;
249
display: flex;
2510
flex-direction: column;
2611
justify-content: space-between;
12+
padding: 5px 10px;
2713

2814
a.name {
2915
display: block;
30-
padding: 15px 20px 0px 20px;
3116
@include font-with-weight('Sofia Pro', 500);
32-
font-size: 14px;
33-
line-height: 20px;
17+
font-size: 12px;
18+
line-height: 16px;
19+
max-height: 48px;
20+
overflow: hidden;
3421
color: $gray-darkest;
35-
@include ellipsis;
3622
@include link;
3723
text-transform: uppercase;
24+
margin-bottom: 5px;
3825

3926
&:hover {
4027
text-decoration: none;
4128
}
4229
}
4330

4431
p.subtrack-color {
45-
padding: 0 20px;
46-
margin-top: 5px;
4732
@include font-with-weight('Sofia Pro', 500);
48-
font-size: 12px;
33+
font-size: 10px;
4934
line-height: 14px;
5035
text-transform: uppercase;
36+
margin-bottom: 5px;
5137
}
5238
}
5339

@@ -60,9 +46,8 @@ challenge-tile .challenge.tile-view {
6046

6147
// roles bar is common for both active and completed
6248
.roles {
63-
width: 101%;
64-
border: 1px solid #e0e0e0;
65-
border-top: none;
49+
width: 100%;
50+
border-radius: 4px;
6651
display: flex;
6752
flex-direction: row;
6853
justify-content: flex-start;
@@ -86,6 +71,10 @@ challenge-tile .challenge.tile-view {
8671
}
8772

8873
.active-challenge {
74+
height: 350px;
75+
display: flex;
76+
flex-direction: column;
77+
justify-content: space-between;
8978
position: relative;
9079
width: 270px;
9180
border: 1px solid #E0E0E0;
@@ -190,6 +179,7 @@ challenge-tile .challenge.tile-view {
190179

191180

192181
.completed-challenge {
182+
height: 350px;
193183
display: flex;
194184
flex-direction: column;
195185
justify-content: space-between;
@@ -206,12 +196,11 @@ challenge-tile .challenge.tile-view {
206196

207197
.date-completed {
208198
@include font-with-weight('Sofia Pro', 500);
209-
font-size: 12px;
199+
font-size: 10px;
200+
line-height: 14px;
210201
text-transform: uppercase;
211202
color: $accent-gray;
212-
padding-left: 20px;
213-
padding-right: 20px;
214-
margin-bottom: 10px;
203+
margin-bottom: 5px;
215204
}
216205

217206
.winner-ribbon {
@@ -234,11 +223,13 @@ challenge-tile .challenge.tile-view {
234223
}
235224

236225
.marathon-score {
237-
margin-bottom: 70px;
226+
display: flex;
227+
flex-direction: column;
228+
justify-content: center;
229+
align-items: center;
238230
text-align: center;
239231

240232
.score {
241-
margin-top: 28px;
242233
margin-bottom: 5px;
243234
@include font-with-weight;
244235
font-size: 32px;
@@ -279,16 +270,6 @@ challenge-tile .challenge.list-view {
279270

280271
// common styles for active and completed
281272

282-
.challenge-track {
283-
width: 5px;
284-
height: 110px;
285-
position: absolute;
286-
top: -1px;
287-
left: -1px;
288-
border-top-left-radius: 6px;
289-
border-bottom-left-radius: 6px;
290-
}
291-
292273
header {
293274
display: flex;
294275
flex-direction: column;
@@ -302,10 +283,11 @@ challenge-tile .challenge.list-view {
302283
a.name {
303284
display: block;
304285
@include font-with-weight('Sofia Pro', 500);
305-
font-size: 14px;
306-
line-height: 20px;
286+
font-size: 12px;
287+
line-height: 16px;
288+
max-height: 32px;
289+
overflow: hidden;
307290
color: $gray-darkest;
308-
@include ellipsis;
309291
@include link;
310292
text-transform: uppercase;
311293

@@ -315,7 +297,6 @@ challenge-tile .challenge.list-view {
315297
}
316298

317299
p.subtrack-color {
318-
margin-bottom: 12px;
319300
@include font-with-weight('Sofia Pro', 500);
320301
font-size: 12px;
321302
line-height: 14px;
@@ -449,22 +430,66 @@ challenge-tile .challenge.list-view {
449430

450431
// Dynamic colors based on track
451432
.DESIGN {
452-
.challenge-track { background-color: $design; }
433+
&.tile-view {
434+
header {
435+
border-left: 3px solid $design;
436+
border-radius: 3px 0 0 0;
437+
}
438+
}
453439

454-
header .subtrack-color { color: $design; }
440+
&.challenge.list-view {
441+
border-left: 3px solid $design;
442+
}
443+
444+
.subtrack-color {
445+
color: $design;
446+
}
455447
}
456448
.DEVELOP {
457-
.challenge-track { background-color: $develop; }
449+
&.tile-view {
450+
header {
451+
border-left: 3px solid $develop;
452+
border-radius: 3px 0 0 0;
453+
}
454+
}
458455

459-
header .subtrack-color { color: $develop; }
456+
&.challenge.list-view {
457+
border-left: 3px solid $develop;
458+
}
459+
460+
.subtrack-color {
461+
color: $develop;
462+
}
460463
}
461464
.DATA_SCIENCE {
462-
.challenge-track { background-color: $data_science; }
465+
&.tile-view {
466+
header {
467+
border-left: 3px solid $data_science;
468+
border-radius: 3px 0 0 0;
469+
}
470+
}
463471

464-
header .subtrack-color { color: $data_science; }
472+
&.challenge.list-view {
473+
border-left: 3px solid $data_science;
474+
}
475+
476+
.subtrack-color {
477+
color: $data_science;
478+
}
465479
}
466480
.COPILOT {
467-
.challenge-track { background-color: $copilot; }
481+
&.tile-view {
482+
header {
483+
border-left: 3px solid $copilot;
484+
border-radius: 3px 0 0 0;
485+
}
486+
}
468487

469-
header .subtrack-color { color: $copilot; }
488+
&.challenge.list-view {
489+
border-left: 3px solid $copilot;
490+
}
491+
492+
.subtrack-color {
493+
color: $copilot;
494+
}
470495
}

assets/css/directives/design-challenge-user-place.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ design-challenge-user-place {
66
.tile-view {
77
display: flex;
88
flex-direction: column;
9+
justify-content: center;
910
align-items: center;
1011

1112
.place {
12-
&.completed, &.passed, &.didnt {
13-
margin-bottom: -36px;
14-
margin-top: 52px;
15-
}
16-
margin-bottom: 8px;
17-
margin-top: 8px;
1813
@include sofia-pro-regular;
1914
font-size: 20px;
2015
color: $gray-darkest;

assets/css/directives/dev-challenge-user-place.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
dev-challenge-user-place {
55

66
.tile-view {
7+
display: flex;
8+
flex-direction: column;
9+
justify-content: center;
10+
align-items: center;
11+
712
.place {
8-
margin-bottom: 30px;
913
@include sofia-pro-light;
1014
font-size: 18px;
1115
line-height: 23px;

0 commit comments

Comments
 (0)