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

Commit 8ff60da

Browse files
author
vikasrohit
committed
Merge pull request #686 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.
2 parents 5360982 + ed4e179 commit 8ff60da

File tree

4 files changed

+68
-39
lines changed

4 files changed

+68
-39
lines changed

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

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,30 @@
77
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
88

99
challenge-links(challenge="challenge", view="'tile'")
10+
.challenge-card__bottom.challenge-card__bottom--active
11+
.challenge-details
12+
p.currentPhase {{challenge.userCurrentPhase}}
1013

11-
.challenge-details
12-
p.currentPhase {{challenge.userCurrentPhase}}
14+
.challenge-calendar(ng-show="challenge.userCurrentPhaseEndTime")
15+
p.ends-in Ends In
16+
p.time-remaining {{challenge.userCurrentPhaseEndTime[0]}}
17+
p.unit-of-time {{challenge.userCurrentPhaseEndTime[1]}}
1318

14-
.challenge-calendar(ng-show="challenge.userCurrentPhaseEndTime")
15-
p.ends-in Ends In
16-
p.time-remaining {{challenge.userCurrentPhaseEndTime[0]}}
17-
p.unit-of-time {{challenge.userCurrentPhaseEndTime[1]}}
19+
.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
1820

19-
.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
21+
.phase-action(ng-show="challenge.userAction", ng-switch="challenge.userAction")
22+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'detail'}}") Submit
2023

21-
.phase-action(ng-switch="challenge.userAction")
22-
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'detail'}}") Submit
24+
.submitted(ng-switch-when="Submitted") Submitted
2325

24-
.submitted(ng-switch-when="Submitted") Submitted
26+
// TODO: Need styling and JS logic for this one
27+
.registered(ng-switch-when="Registered") Registered
2528

26-
// TODO: Need styling and JS logic for this one
27-
.registered(ng-switch-when="Registered") Registered
28-
29-
// Only show if not data science track
30-
p.roles
31-
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
32-
span Role:  
33-
span {{challenge.userDetails.roles | listRoles}}
29+
// Only show if not data science track
30+
p.roles
31+
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
32+
span Role:  
33+
span {{challenge.userDetails.roles | listRoles}}
3434

3535
.completed-challenge(
3636
ng-show="challenge.status === 'COMPLETED' || challenge.status === 'PAST'",
@@ -45,25 +45,26 @@
4545

4646
.winner-ribbon(ng-show="challenge.wonFirst")
4747

48-
.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")
48+
.challenge-card__bottom.challenge-card__bottom--completed
49+
.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")
4950

50-
div
51-
.marathon-score
52-
p.score {{challenge.pointTotal || 0 }}
51+
div
52+
.marathon-score
53+
p.score {{challenge.pointTotal || 0 }}
5354

54-
p Total Points
55+
p Total Points
5556

56-
.challenge-details(ng-switch-when="DEVELOP")
57-
dev-challenge-user-place(challenge="challenge", view="view")
57+
.challenge-details(ng-switch-when="DEVELOP")
58+
dev-challenge-user-place(challenge="challenge", view="view")
5859

59-
.challenge-details(ng-switch-when="DESIGN")
60-
design-challenge-user-place(challenge="challenge", view="view")
60+
.challenge-details(ng-switch-when="DESIGN")
61+
design-challenge-user-place(challenge="challenge", view="view")
6162

62-
// Only show if not data science track
63-
p.roles
64-
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
65-
span Role:  
66-
span {{challenge.userDetails.roles | listRoles}}
63+
// Only show if not data science track
64+
p.roles
65+
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
66+
span Role:  
67+
span {{challenge.userDetails.roles | listRoles}}
6768

6869
.challenge.list-view(ng-show="view=='list'", ng-class="challenge.track")
6970
.active-challenge(ng-show="challenge.status === 'ACTIVE'")

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-hide="challenge.userStatus !== 'PASSED_REVIEW'")
7+
.thumbnail(ng-click="!challenge.isPrivate && imageURL && openLightbox()", ng-class="{hidden: 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

assets/css/directives/challenge-tile.scss

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,26 @@ challenge-tile .challenge.tile-view {
3737
}
3838
}
3939

40+
.challenge-card__bottom {
41+
width: 268px;/* 2px adjustment for 2 1px borders */
42+
flex: 2;
43+
display: flex;
44+
flex-direction: column;
45+
}
46+
4047
// challenge details section
4148
.challenge-details {
4249
display: flex;
4350
flex-direction: column;
4451
align-items: center;
52+
justify-content: center;
53+
flex: 2;
4554
}
4655

4756
// roles bar is common for both active and completed
4857
.roles {
4958
width: 100%;
50-
border-radius: 4px;
59+
border-radius: 0px 0px 4px 4px;
5160
display: flex;
5261
flex-direction: row;
5362
justify-content: flex-start;
@@ -71,7 +80,7 @@ challenge-tile .challenge.tile-view {
7180
}
7281

7382
.active-challenge {
74-
height: 350px;
83+
height: 390px;
7584
display: flex;
7685
flex-direction: column;
7786
justify-content: space-between;
@@ -84,7 +93,6 @@ challenge-tile .challenge.tile-view {
8493

8594
.challenge-details {
8695
.currentPhase {
87-
margin-top: 40px;
8896
margin-bottom: 20px;
8997
@include font-with-weight('Sofia Pro', 300);
9098
font-size: 18px;
@@ -99,7 +107,6 @@ challenge-tile .challenge.tile-view {
99107
align-items: center;
100108
width: 75px;
101109
height: 63px;
102-
margin-bottom: 20px;
103110
background-image: url(/images/ico-calendar.svg);
104111

105112
> p {
@@ -179,7 +186,7 @@ challenge-tile .challenge.tile-view {
179186

180187

181188
.completed-challenge {
182-
height: 350px;
189+
height: 390px;
183190
display: flex;
184191
flex-direction: column;
185192
justify-content: space-between;
@@ -222,6 +229,27 @@ challenge-tile .challenge.tile-view {
222229
justify-content: center;
223230
}
224231

232+
design-challenge-user-place {
233+
display: flex;
234+
flex-direction: column;
235+
flex: 2;
236+
237+
.tile-view {
238+
flex: 2;
239+
justify-content: flex-end;
240+
}
241+
}
242+
243+
dev-challenge-user-place {
244+
display: flex;
245+
flex-direction: column;
246+
flex: 2;
247+
248+
.tile-view {
249+
flex: 2;
250+
}
251+
}
252+
225253
.marathon-score {
226254
display: flex;
227255
flex-direction: column;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176

177177
challenge-tile {
178178
&.tile-view {
179-
margin-bottom: 20px;
179+
margin-bottom: 13px;
180180
@media only screen and (max-width: 767px) {
181181
display: inline-block;
182182
margin-left: 15px;

0 commit comments

Comments
 (0)