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

Commit dddb90a

Browse files
author
vikasrohit
committed
Merge branch 'dev' into hotfix/sup-2582-sort-srms-by-registration-start
* dev: Update Fix search bar, styling and placement of user handle Move footer links to bottom of mobile nav, style white Fix formatting Fix import adjusted winner ribbon positioning Fix test Remove stopPropagation fixed some design card display stuff Prevent the section from flickering quick fix more nav styling changes Finished nav basics placeholder logo 'beta' tag css fix
2 parents 5c4211f + f3aae78 commit dddb90a

21 files changed

+466
-223
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The tests folder contains mock data (tests/test-helpers/mock-data.js). It also h
5858
Spec files live alongside the code they are testing. For example, in peer-review you have review-status.controller.js and review-status.spec.js in the same review-status folder. If you want to see an example of tests, use review-status.spec.js as an example of controller tests and services/challenge.service.spec.js as an example of service tests.
5959

6060
## UI-Router and States
61-
See sample.routes.js and peer-review.routes.js as examples.
61+
See any *.routes.js file as an example.
6262

6363
## Contributing
6464

@@ -87,7 +87,7 @@ Jade Files
8787
```
8888

8989
SCSS Files
90-
- Use SCSS syntax (nesting)
90+
- Use SCSS syntax, but do not overly nest
9191
- Use variables and mixins as much as possible
9292
- Store new variables and mixins in the appropriate file in `assets/css/partials`
9393
- Since a class with the current state name is added to the ui-view (see the Creating New Views/Pages section), wrap your .scss file with this class, in order to write specific SCSS in its own file for that page.

app/directives/header/header-menu-item.directive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
var href = $scope.item.href;
1414

1515
// I believe I have to hack this because of https://github.com/angular-ui/ui-router/issues/395, I tried ui-state
16-
if ($scope.item.srefParams)
16+
if ($scope.item.srefParams) {
1717
$scope.wtfhref = $state.href($scope.item.sref, $scope.item.srefParams);
18+
}
1819

1920
$scope.isActive = function() {
2021
if (window.location.pathname == href || $state.is(sref)) {
@@ -23,6 +24,7 @@
2324

2425
return true;
2526
}
27+
2628
return false;
2729
}
2830
}]

app/index.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ html
3737
link(rel="stylesheet", href="assets/css/settings/edit-profile.css")
3838
link(rel="stylesheet", href="assets/css/settings/account-info.css")
3939
link(rel="stylesheet", href="assets/css/profile/subtrack.css")
40+
link(rel="stylesheet", href="assets/css/profile/nav.css")
4041
link(rel="stylesheet", href="assets/css/profile/icons.css")
4142
link(rel="stylesheet", href="assets/css/profile/header.css")
4243
link(rel="stylesheet", href="assets/css/profile/badges.css")

app/layout/footer/footer.jade

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@ footer.bottom-footer
22
// Footer links
33
nav.menu-item
44
.menu-item-header.show-small OTHERS
5+
56
ul.submenu
6-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/sitemap") SITEMAP]
7-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/about") ABOUT US]
8-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/contact-us") CONTACT US]
9-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://help.{{domain}}" target="_blank") HELP CENTER]
10-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://www.{{domain}}/community/how-it-works/privacy-policy/") PRIVACY POLICY]
11-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://www.{{domain}}/community/how-it-works/terms/") TERMS]
7+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/sitemap") SITE MAP]
8+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/about") ABOUT US]
9+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/contact-us") CONTACT US]
10+
li.submenu-item #[a.menu-link(ng-href="https://help.{{domain}}" target="_blank") HELP CENTER]
11+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/community/how-it-works/privacy-policy/") PRIVACY POLICY]
12+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/community/how-it-works/terms/") TERMS]
1213

1314
// Social links
1415
.social-links
1516
p Topcoder is also on
17+
1618
a.fb-link(href="https://www.facebook.com/topcoder" target="fbwindow")
19+
1720
a.twitter-link(href="http://www.twitter.com/topcoder" target="twwindow")
21+
1822
a.linkedin-link(href="https://www.linkedin.com/company/topcoder" target="liwindow")
23+
1924
a.google-link(href="https://plus.google.com/u/0/b/104268008777050019973/104268008777050019973/posts" target="gpwindow")
2025

2126
p.copyright-notice © 2015 Topcoder. All Rights Reserved

app/layout/header/header.jade

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.header-wrapper(ng-class="{'autocomplete': main.searchTerm.length > 0}")
22
header.top-header
33
a.logo-link(href="/")
4+
45
// Header content visible on small screens
56
.show-small.mobile-heading
67
span.tc-text-logo(ng-if="main.menuVisible") [ topcoder ]
@@ -11,8 +12,8 @@
1112

1213
// User link (profile or join)
1314
a(ui-sref="profile.about({userHandle: vm.userHandle})", ng-switch="vm.isAuth" class="user-link" data-ng-if="!main.menuVisible")
14-
//- img(ng-switch-when="true", class="user-avatar", ng-src="{{vm.profile.photoURL}}")
1515
img(ng-switch-when="true", ng-if="vm.profile.photoURL && vm.profile.photoURL.length", class="user-avatar", ng-src="{{vm.profile.photoURL}}")
16+
1617
img(ng-switch-when="true", ng-if="!vm.profile.photoURL || !vm.profile.photoURL.length", class="user-avatar", ng-src="/images/ico-user-default.svg")
1718

1819
span(ng-switch-when="false" class="tc-btn tc-btn-s") JOIN
@@ -29,7 +30,7 @@
2930
// a(href="javascript:;" class="menu-link") {{suggestion}}
3031
3132
li.menu-item.link-group.user-menu(ng-switch="vm.isAuth", ng-class="{'anonymous-menu': !vm.isAuth}")
32-
// links for logged in user
33+
// Links for logged in user
3334
div(ng-switch-when="true")
3435
.menu-item-header(
3536
ng-class="{'hide': vm.selectedGroup() == 'user'}"
@@ -52,20 +53,16 @@
5253
//- a.menu-link(ng-click="vm.logout(); main.menuVisible = vm.isAuth = false")
5354
a.menu-link(ui-sref="logout")
5455
img.menu-icon(ng-src="/images/nav/exit.svg")
56+
5557
.menu-text LOG OUT
5658

57-
// links for anonymous user
59+
// Links for anonymous user
5860
.menu-item-header(ng-switch-when="false")
5961
a.tc-btn.tc-btn-s.btn-link(ui-sref="register") JOIN
6062

6163
a.tc-btn.tc-btn-s.tc-btn-ghost.btn-link(ui-sref="login") LOG IN
6264

63-
//- a(ng-click="launchIntro();", ng-show="!!vm.introOptions") Intro
64-
65-
li.menu-item.link-group(
66-
ng-repeat="(menu, items) in vm.menuLinks",
67-
ng-class="{'selected': vm.selectedGroup() == menu}"
68-
)
65+
li.menu-item.link-group(ng-repeat="(menu, items) in vm.menuLinks", ng-class="{'selected': vm.selectedGroup() == menu}")
6966
.menu-item-header {{menu}}
7067

7168
ul.submenu

app/profile/profile.controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// set profile to the object that was resolved
1414
vm.profile = profile;
1515
vm.userHandle = userHandle;
16+
vm.handleColor = ProfileService.getUserHandleColor(profile);
1617
vm.showBadges = showBadges;
1718
vm.closeDialog = closeDialog;
1819
vm.scrollTo = scrollTo;

app/profile/profile.controller.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ describe('Profile Controller', function() {
2424
getUserSkills: function() {
2525
return $q.when({result: {content: mockSkills}});
2626
},
27+
getUserHandleColor: function() {
28+
return 'something';
29+
},
2730
getRanks: ProfileService.getRanks
2831
};
2932
// mock user api

app/profile/subtrack/nav.jade

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
.nav-top
2+
.user
3+
.avatar
4+
img(ng-src="{{vm.profile.photoURL}}")
5+
6+
.handle(style="color: {{vm.handleColor}}") {{vm.profile.handle}}
7+
8+
.exit(ng-click="vm.closeDialog()")
9+
img(src="/images/x-mark-gray.svg")
10+
11+
hr
112
.categoryNav
213
.track(
314
ng-repeat="track in vm.profile.tracks",

app/profile/subtrack/subtrack.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
template: 'profile/subtrack/nav.html',
228228
controller: 'ProfileCtrl',
229229
controllerAs: 'vm',
230-
className: 'ngdialog-theme-default',
230+
className: 'ngdialog-nav-theme',
231231
resolve: {
232232
userHandle: function() {
233233
return vm.userHandle;

app/services/nav.service.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
function NavService(CONSTANTS, $state, UserService, TcAuthService) {
99

1010
var service = {
11-
1211
selectedTopLevelItem: null,
1312
getParent: getParent
14-
1513
};
1614

1715
service.menuLinks = {
@@ -47,6 +45,7 @@
4745
];
4846

4947
service.hrefs = {};
48+
5049
service.menuLinks.compete.forEach(function(link) {
5150
link.parent = 'compete';
5251
service.hrefs[link.href] = link;
@@ -68,8 +67,9 @@
6867
});
6968

7069
function getParent(ref) {
71-
if (ref.indexOf('.') >= 0)
70+
if (ref.indexOf('.') >= 0) {
7271
ref = ref.slice(0, ref.indexOf('.'));
72+
}
7373

7474
if (ref.match(/profile/)) {
7575
if (TcAuthService.isAuthenticated() && $state.params && $state.params.userHandle == UserService.getUserIdentity().handle) {
@@ -82,9 +82,6 @@
8282
}
8383
}
8484

85-
8685
return service;
87-
8886
}
89-
9087
})();

app/settings/account-info/account-info.controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
function activate() {
1818
vm.isSocialRegistrant = false;
19+
vm.loading = true;
1920

2021
vm.formProcessing = {
2122
accountInfoForm: false,
@@ -28,10 +29,12 @@
2829
UserService.getUserProfile({fields: 'credential'})
2930
.then(function(res) {
3031
vm.isSocialRegistrant = !res.credential.hasPassword;
32+
vm.loading = false;
3133
})
3234
.catch(function(err) {
3335
$log.error("Error fetching user profile. Redirecting to edit profile.");
3436
$state.go('settings.profile');
37+
vm.loading = false;
3538
});
3639

3740
vm.countries = ISO3166.getAllCountryObjects();

app/settings/account-info/account-info.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
.form-label Email
1212
input.form-field.grey(name="email", value="{{vm.userData.email}}", disabled=true)
1313

14-
div(ng-hide="vm.isSocialRegistrant")
14+
div(ng-if="!vm.isSocialRegistrant && !vm.loading")
1515
form(name="vm.newPasswordForm", role="form", ng-submit="vm.newPasswordForm.$valid && vm.submitNewPassword()", novalidate)
1616
.form-label Current password
1717

@@ -45,7 +45,7 @@
4545
button.tc-btn.save(type="submit", tc-busy-button, tc-busy-when="vm.formProcessing.newPasswordForm", ng-disabled="vm.newPasswordForm.$invalid || vm.newPasswordForm.$pristine", ng-class="{'disabled': vm.newPasswordForm.$invalid || vm.newPasswordForm.$pristine}") Change Password
4646

4747

48-
div(ng-show="vm.isSocialRegistrant")
48+
div(ng-if="vm.isSocialRegistrant && !vm.loading")
4949
p You joined Topcoder by using an external account, so we don't have a password for you.
5050

5151
form(name="vm.accountInfoForm", role="form", novalidate, autocomplete="off")

app/sitemap/sitemap.jade

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
.sitemap-container
2-
h1.page-header SITEMAP
3-
4-
.sitemap-wrapper
5-
section.sitemap-nav
6-
h2.sitemap-header Compete
7-
ul
8-
li
9-
a(href="/challenges/design/active") Design Challenges
10-
li
11-
a(href="/challenges/develop/active") Development Challenges
12-
li
13-
a(href="/challenges/data/active") Data Science Challenges
14-
li
15-
a(href="//arena.topcoder.com/") Single Round Matches
16-
17-
18-
section.sitemap-nav.hide-small
19-
h2.sitemap-header Learn
20-
ul
21-
li
22-
a(href="/community/design") Design
23-
li
24-
a(href="/community/devlopment") Development
25-
li
26-
a(href="/community/data-science") Data Science
27-
li
28-
a(href="/community/competitive programming") Competitive Programming
29-
30-
section.sitemap-nav
31-
h2.sitemap-header Community
32-
ul
33-
li
34-
a(href="/community") Home
35-
li
36-
a(href="/community/members") Members
37-
li
38-
a(href="/community/member-programs") Programs
39-
li
40-
a(href="//apps.topcoder.com/forums") Forums
41-
li
42-
a(href="/community/statistics") Statistics
43-
li
44-
a(href="/community/events") Events
45-
li
46-
a(href="/blog") Blog
47-
48-
section.sitemap-nav.hide-small
49-
h2.sitemap-header My Account
50-
ul
51-
li
52-
a(href="/my-dashboard") Dashboard
53-
li
54-
a(href="/members/") My Profile
55-
li
56-
a(href="/settings/profile") Settings
57-
58-
2+
h1.page-header SITE MAP
3+
4+
.sitemap-wrapper
5+
section.sitemap-nav
6+
h2.sitemap-header Compete
7+
ul
8+
li
9+
a(href="/challenges/design/active") Design Challenges
10+
li
11+
a(href="/challenges/develop/active") Development Challenges
12+
li
13+
a(href="/challenges/data/active") Data Science Challenges
14+
li
15+
a(href="//arena.topcoder.com/") Single Round Matches
16+
17+
18+
section.sitemap-nav.hide-small
19+
h2.sitemap-header Learn
20+
ul
21+
li
22+
a(href="/community/design") Design
23+
li
24+
a(href="/community/devlopment") Development
25+
li
26+
a(href="/community/data-science") Data Science
27+
li
28+
a(href="/community/competitive programming") Competitive Programming
29+
30+
section.sitemap-nav
31+
h2.sitemap-header Community
32+
ul
33+
li
34+
a(href="/community") Home
35+
li
36+
a(href="/community/members") Members
37+
li
38+
a(href="/community/member-programs") Programs
39+
li
40+
a(href="//apps.topcoder.com/forums") Forums
41+
li
42+
a(href="/community/statistics") Statistics
43+
li
44+
a(href="/community/events") Events
45+
li
46+
a(href="/blog") Blog
47+
48+
section.sitemap-nav.hide-small
49+
h2.sitemap-header My Account
50+
ul
51+
li
52+
a(href="/my-dashboard") Dashboard
53+
li
54+
a(href="/members/") My Profile
55+
li
56+
a(href="/settings/profile") Settings
57+
58+

app/specs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ <h1><a href="specs.html">Spec Runner</a></h1>
253253
<script src="/app/blocks/exception/exception-handler.provider.spec.js"></script>
254254
<script src="/app/account/login/login.spec.js"></script>
255255
<script src="/app/account/logout/logout.controller.spec.js"></script>
256-
<script src="/app/account/register/register.spec.js"></script>
257256
<script src="/app/account/reset-password/reset-password.spec.js"></script>
257+
<script src="/app/account/register/register.spec.js"></script>
258258
<script src="/app/directives/badges/badge-tooltip.spec.js"></script>
259259
<script src="/app/directives/busy-button/busy-button.directive.spec.js"></script>
260260
<script src="/app/directives/challenge-tile/challenge-tile.spec.js"></script>

assets/css/directives/challenge-tile.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ challenge-tile .challenge.tile-view {
217217
.winner-ribbon {
218218
position: absolute;
219219
z-index: 1;
220-
bottom: -40px;
220+
bottom: -33px;
221221
left: -2px;
222222
@include background-image-size(73px, 26px);
223223
background: url(/images/ico-winner-ribbon.svg);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ design-challenge-user-place {
99
align-items: center;
1010

1111
.place {
12+
&.completed, &.passed, &.didnt {
13+
margin-bottom: -23px;
14+
margin-top: 40px;
15+
}
1216
margin-bottom: 8px;
1317
margin-top: 8px;
1418
@include sofia-pro-regular;

0 commit comments

Comments
 (0)