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

Commit 99eeaea

Browse files
author
Parth Shah
committed
Merge branch 'feature/profile-polish-1' into dev
2 parents f3e774d + c488222 commit 99eeaea

22 files changed

+1171
-834
lines changed

app/directives/profile-widget/profile-widget.jade

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,26 @@
66
.info
77
h1.handle(style="color:{{handleColor}};") {{profile.handle}}
88

9-
h3.tenure(ng-if="profile.startMonth")
10-
| Member Since {{profile.startMonth}}
11-
129
h3.location-challenges {{profile.homeCountryCode | isoCountry}}
1310
span.bar(ng-show="profile.homeCountryCode && numWins")  | 
1411
span(ng-show="numWins") {{numWins}} Wins
1512

16-
p.description {{profile.description}}
13+
h3.tenure(ng-if="profile.startMonth")
14+
| Member Since {{profile.startMonth}}
1715

18-
a.tc-btn.tc-btn-s.edit(ng-show="editProfileLink", ui-sref="settings.profile") Edit Profile
16+
a.tc-btn.tc-btn-m.edit(ng-show="editProfileLink", ui-sref="settings.profile") Edit Profile
1917

2018
.tracks-links
2119
.tracks
2220
.track(ng-repeat="track in (profile.tracks)", ng-click="profileVm.scrollTo(track)")
23-
div(class="{{profileVm.imgMap[track]}}-icon")
21+
div(class="track-icon {{profileVm.imgMap[track]}}-icon")
2422
div
2523
.text {{track | role}}
2624

27-
hr
25+
p.description {{profile.description}}
2826

29-
.links
30-
a.tc-btn.tc-btn-s.forums.link(ng-href="http://forums.{{DOMAIN}}/?module=History&userID={{profileVm.profile.userId}}")
31-
| Forum Posts
32-
button.tc-btn.tc-btn-s.badges.link(ng-click="profileVm.showBadges()", ng-show="profileVm.profile.badges.Achievements.length > 0")
33-
| Badges
27+
.links
28+
a.badges.link(ng-click="profileVm.showBadges()", ng-show="profileVm.profile.badges.Achievements.length > 0")
29+
| Badges
30+
a.forums.link(ng-href="http://forums.{{DOMAIN}}/?module=History&userID={{profileVm.profile.userId}}")
31+
| Forum Posts

app/directives/responsive-carousel/responsive-carousel.directive.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
activate();
1818

1919
function activate() {
20+
21+
$scope.$watchCollection('data', function(newValue, oldValue) {
22+
init();
23+
});
2024
init();
2125

2226
var window = angular.element($window);
@@ -72,8 +76,8 @@
7276
$scope.slideCounts[slidesCollection.length - 1] = slide.length;
7377
$scope.slidesCollection = slidesCollection;
7478
}
75-
79+
7680
}]
7781
};
7882
});
79-
})();
83+
})();

app/filters/rating-color.filter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
function ratingColor() {
77
return function(rating) {
88
function ratingToColor(colors, rating) {
9+
// in case rating is a number formatted string
10+
if (typeof rating === 'string')
11+
rating = parseInt(rating.replace(",", ""));
912
colors = colors.filter(function(color) {
1013
return rating >= color.start && rating <= color.end;
1114
});

app/index.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ html
259259
script(src="services/tags.service.js")
260260
script(src="services/tcAuth.service.js")
261261
script(src="services/user.service.js")
262+
script(src="services/userStats.service.js")
262263
script(src="settings/settings.module.js")
263264
script(src="settings/account-info/account-info.controller.js")
264265
script(src="settings/edit-profile/edit-profile.controller.js")

app/profile/about/about.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
profileVm.skillsPromise.then(function() {
6868
// show section if user is viewing his/her own profile OR if we have data
6969
vm.fullSkills = profileVm.skills;
70-
vm.someSkills = profileVm.skills.slice(0, 6);
70+
vm.someSkills = profileVm.skills.slice(0, 10);
7171
vm.skills = vm.someSkills;
7272
vm.displaySection.skills = profileVm.showEditProfileLink || !!vm.skills.length;
7373
});

app/profile/about/about.jade

Lines changed: 73 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,103 @@
1-
.profile-header-container(ng-cloak)
2-
profile-widget(profile="profileVm.profile", edit-profile-link="profileVm.showEditProfileLink", num-wins="profileVm.numWins", profile-vm="profileVm")
1+
.about-container
2+
.profile-header-container(ng-cloak)
3+
profile-widget(profile="profileVm.profile", edit-profile-link="profileVm.showEditProfileLink", num-wins="profileVm.numWins", profile-vm="profileVm")
34

4-
.profile-about-container
5+
.profile-about-container
56

6-
#skills
7-
tc-section(ng-show="vm.displaySection.skills", state="profileVm.status.skills")
7+
#skills
8+
tc-section(ng-show="vm.displaySection.skills", state="profileVm.status.skills")
89

9-
.skills
10-
h3.activity Skills
10+
.skills
11+
h3.activity Skills
1112

12-
.list(ng-show="profileVm.skills && profileVm.skills.length > 0")
13+
.list(ng-show="profileVm.skills && profileVm.skills.length > 0")
1314

14-
.skill(ng-repeat="skill in vm.skills")
15-
skill-tile(skill="skill")
16-
17-
button.tc-btn.tc-btn-l.more(ng-if="vm.skills.length < vm.fullSkills.length", ng-click="vm.skills = vm.fullSkills") VIEW ALL
18-
button.tc-btn.tc-btn-l.more(ng-if="vm.skills.length > 6", ng-click="vm.skills = vm.someSkills") VIEW LESS
19-
20-
.empty-state(ng-show="!profileVm.skills || (profileVm.skills && profileVm.skills.length == 0)")
21-
.action-text Tell everyone what you know
22-
23-
.list
24-
.skill(ng-repeat="skill in vm.sampleSkills")
15+
.skill(ng-repeat="skill in vm.skills")
2516
skill-tile(skill="skill")
2617

27-
.description You can add languages, environments, frameworks, libraries, platforms, tools, and any other technologies that you know well.
18+
button.tc-btn.tc-btn-m.more(ng-if="vm.skills.length < vm.fullSkills.length", ng-click="vm.skills = vm.fullSkills") VIEW ALL
19+
button.tc-btn.tc-btn-m.more(ng-if="vm.skills.length > 10", ng-click="vm.skills = vm.someSkills") VIEW LESS
2820

29-
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") ADD SKILLS
21+
.empty-state(ng-show="!profileVm.skills || (profileVm.skills && profileVm.skills.length == 0)")
22+
.action-text Tell everyone what you know
3023

31-
#tcActivity
32-
tc-section(ng-show="vm.displaySection.stats", state="profileVm.status.stats")
24+
.list
25+
.skill(ng-repeat="skill in vm.sampleSkills")
26+
skill-tile(skill="skill")
3327

34-
.categories
28+
.description You can add languages, environments, frameworks, libraries, platforms, tools, and any other technologies that you know well.
3529

36-
h3.activity Activity on Topcoder
30+
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") ADD SKILLS
3731

38-
.empty-state(ng-if="!profileVm.numProjects")
39-
.action-text Start competing within the community
40-
.tracks
41-
.track.noclick(ng-repeat="track in ['DEVELOP', 'DESIGN', 'DATA_SCIENCE']")
42-
div(class="{{profileVm.imgMap[track]}}-icon")
43-
div
44-
.text {{track | track}}
45-
.description Compete in challenges to win money, test yourself against the world's best, and learn new skills. Your performance rating will show up here.
46-
a.tc-btn.tc-btn-l.link-button(href="/challenges") FIND CHALLENGES
32+
#tcActivity
33+
tc-section(ng-show="vm.displaySection.stats", state="profileVm.status.stats")
4734

48-
.track(
49-
ng-repeat="track in profileVm.profile.tracks",
50-
ng-if="profileVm.categories[track].length > 0",
51-
id="{{track}}_TRACK"
52-
)
35+
.categories
5336

54-
div(class="name")
55-
img(ng-if="track == 'DATA_SCIENCE'", src="/images/ico-track-data-outline.svg")
56-
img(ng-if="track == 'DEVELOP'", src="/images/ico-track-develop-outline.svg")
57-
img(ng-if="track == 'DESIGN'", src="/images/ico-track-design-outline.svg")
58-
img(ng-if="track == 'COPILOT'", src="/images/ico-track-co_pilot-outline.svg")
59-
span {{track | track | uppercase}}
37+
.empty-state(ng-if="!profileVm.numProjects")
38+
.action-text Start competing within the community
39+
.tracks
40+
.track.noclick(ng-repeat="track in ['DEVELOP', 'DESIGN', 'DATA_SCIENCE']")
41+
div(class="{{profileVm.imgMap[track]}}-icon")
42+
div
43+
.text {{track | track}}
44+
.description Compete in challenges to win money, test yourself against the world's best, and learn new skills. Your performance rating will show up here.
45+
a.tc-btn.tc-btn-l.link-button(href="/challenges") FIND CHALLENGES
6046

61-
a.subtrack(
62-
ng-repeat="subtrack in profileVm.categories[track] | orderBy:'mostRecentEventDate':true",
63-
ui-sref="profile.subtrack({track: subtrack.track, subTrack: subtrack.subTrack})",
64-
class="{{$index == 0 && 'first'}}"
47+
.track(
48+
ng-repeat="track in profileVm.profile.tracks",
49+
ng-if="profileVm.categories[track].length > 0",
50+
id="{{track}}_TRACK"
6551
)
66-
.name {{subtrack.subTrack | track}}
6752

68-
.ranking(ng-if="subtrack.rating")
69-
.number.rating(style="color: {{subtrack.rating | ratingColor}}")
70-
| {{subtrack.rating}}
71-
span.square(style="background-color: {{subtrack.rating | ratingColor}}")
53+
div(class="name")
54+
img(ng-if="track == 'DATA_SCIENCE'", src="/images/ico-track-data-outline.svg")
55+
img(ng-if="track == 'DEVELOP'", src="/images/ico-track-develop-outline.svg")
56+
img(ng-if="track == 'DESIGN'", src="/images/ico-track-design-outline.svg")
57+
img(ng-if="track == 'COPILOT'", src="/images/ico-track-co_pilot-outline.svg")
58+
span {{track | track | uppercase}} ACTIVITY
59+
60+
a.subtrack(
61+
ng-repeat="subtrack in profileVm.categories[track] | orderBy:'mostRecentEventDate':true",
62+
ui-sref="profile.subtrack({track: subtrack.track, subTrack: subtrack.subTrack})",
63+
class="{{$index == 0 && 'first'}}"
64+
)
65+
.name {{subtrack.subTrack | track}}
66+
67+
.ranking(ng-if="subtrack.rating")
68+
.number.rating(style="color: {{subtrack.rating | ratingColor}}")
69+
| {{subtrack.rating}}
7270

73-
.tag Rating
71+
.tag Rating
7472

75-
.ranking(ng-if="subtrack.rank && !subtrack.rating")
76-
.number {{subtrack.rank | ordinal}}
73+
.ranking(ng-if="subtrack.rank && !subtrack.rating")
74+
.number {{subtrack.rank | ordinal}}
7775

78-
.tag Ranking
76+
.tag Ranking
7977

80-
.ranking(ng-if="subtrack.wins && !subtrack.rank && !subtrack.rating")
81-
.number(style="color: #21B2F1") {{subtrack.wins}}
78+
.ranking(ng-if="subtrack.wins && !subtrack.rank && !subtrack.rating")
79+
.number(style="color: #21B2F1") {{subtrack.wins}}
8280

83-
.tag Wins
81+
.tag Wins
8482

85-
.ranking(ng-if="subtrack.fulfillment")
86-
.number {{subtrack.fulfillment + '%'}}
83+
.ranking(ng-if="subtrack.fulfillment")
84+
.number {{subtrack.fulfillment + '%'}}
8785

88-
.tag Fulfillment
86+
.tag Fulfillment
8987

90-
img.arrow(src="/images/ico-arrow-big-right.svg")
88+
img.arrow(src="/images/ico-arrow-big-right.svg")
9189

92-
#externalLinks
93-
tc-section(ng-show="vm.displaySection.externalLinks", state="profileVm.status.externalLinks")
94-
.external-links
95-
h3.activity Activity across the web
96-
external-links-data(ng-show="vm.hasLinks", external-links="vm.linkedExternalAccounts", linked-accounts-data="vm.linkedExternalAccountsData")
90+
#externalLinks
91+
tc-section(ng-show="vm.displaySection.externalLinks", state="profileVm.status.externalLinks")
92+
.external-links
93+
h3.activity on the web
94+
external-links-data(ng-show="vm.hasLinks", external-links="vm.linkedExternalAccounts", linked-accounts-data="vm.linkedExternalAccountsData")
9795

98-
.empty-state(ng-hide="vm.hasLinks")
99-
.action-text Showcase your work from around the web
96+
.empty-state(ng-hide="vm.hasLinks")
97+
.action-text Showcase your work from around the web
10098

101-
external-accounts.external-account-container(linked-accounts="[]", links-data="{}", read-only="true")
99+
external-accounts.external-account-container(linked-accounts="[]", links-data="{}", read-only="true")
102100

103-
.description Show off your work and experience outside of Topcoder. Connect accounts from popular services and networks or add a link to any site.
101+
.description Show off your work and experience outside of Topcoder. Connect accounts from popular services and networks or add a link to any site.
104102

105-
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") CONNECT ACCOUNTS
103+
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") CONNECT ACCOUNTS

0 commit comments

Comments
 (0)