Skip to content

Commit a5ac06c

Browse files
authored
Merge pull request #81 from topcoder-platform/develop
Misc enhancements
2 parents 0959f0d + 090e004 commit a5ac06c

File tree

37 files changed

+259
-243
lines changed

37 files changed

+259
-243
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}],
2323
["transform-assets", {
2424
"extensions": ["gif", "jpeg", "jpg", "png"],
25-
"name": "[hash].[ext]"
25+
"name": "/images/[hash].[ext]"
2626
}]
2727
]
2828
}

__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -53,41 +53,33 @@ exports[`Matches shallow shapshot 1`] = `
5353
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
5454
}
5555
}
56-
url="some.fake.string"
56+
url={null}
5757
/>
5858
</span>
5959
</td>
6060
<td
6161
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-handle___3Sr8G"
6262
>
6363
<a
64-
href="https://www.topcoder-dev.com/members/overachieving.mofo/"
65-
>
66-
overachieving.mofo
67-
</a>
64+
href="https://www.topcoder-dev.com/members/undefined/"
65+
/>
6866
<div
6967
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__winnings-info___1Fiyn"
7068
>
7169
<span>
72-
9999999999
7370
points
7471
</span>
7572
<span>
76-
99999
7773
challenges
7874
</span>
7975
</div>
8076
</td>
8177
<td
8278
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-challenges___29htm"
83-
>
84-
99999
85-
</td>
79+
/>
8680
<td
8781
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-points___10Lis"
88-
>
89-
9999999999
90-
</td>
82+
/>
9183
</tr>
9284
<tr>
9385
<td
@@ -110,41 +102,33 @@ exports[`Matches shallow shapshot 1`] = `
110102
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
111103
}
112104
}
113-
url="some.fake.string"
105+
url={null}
114106
/>
115107
</span>
116108
</td>
117109
<td
118110
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-handle___3Sr8G"
119111
>
120112
<a
121-
href="https://www.topcoder-dev.com/members/overachieving.mofo/"
122-
>
123-
overachieving.mofo
124-
</a>
113+
href="https://www.topcoder-dev.com/members/undefined/"
114+
/>
125115
<div
126116
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__winnings-info___1Fiyn"
127117
>
128118
<span>
129-
9999999999
130119
points
131120
</span>
132121
<span>
133-
99999
134122
challenges
135123
</span>
136124
</div>
137125
</td>
138126
<td
139127
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-challenges___29htm"
140-
>
141-
99999
142-
</td>
128+
/>
143129
<td
144130
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-points___10Lis"
145-
>
146-
9999999999
147-
</td>
131+
/>
148132
</tr>
149133
<tr>
150134
<td
@@ -167,41 +151,33 @@ exports[`Matches shallow shapshot 1`] = `
167151
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
168152
}
169153
}
170-
url="some.fake.string"
154+
url={null}
171155
/>
172156
</span>
173157
</td>
174158
<td
175159
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-handle___3Sr8G"
176160
>
177161
<a
178-
href="https://www.topcoder-dev.com/members/overachieving.mofo/"
179-
>
180-
overachieving.mofo
181-
</a>
162+
href="https://www.topcoder-dev.com/members/undefined/"
163+
/>
182164
<div
183165
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__winnings-info___1Fiyn"
184166
>
185167
<span>
186-
9999999999
187168
points
188169
</span>
189170
<span>
190-
99999
191171
challenges
192172
</span>
193173
</div>
194174
</td>
195175
<td
196176
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-challenges___29htm"
197-
>
198-
99999
199-
</td>
177+
/>
200178
<td
201179
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-points___10Lis"
202-
>
203-
9999999999
204-
</td>
180+
/>
205181
</tr>
206182
<tr>
207183
<td
@@ -224,41 +200,33 @@ exports[`Matches shallow shapshot 1`] = `
224200
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
225201
}
226202
}
227-
url="some.fake.string"
203+
url={null}
228204
/>
229205
</span>
230206
</td>
231207
<td
232208
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-handle___3Sr8G"
233209
>
234210
<a
235-
href="https://www.topcoder-dev.com/members/overachieving.mofo/"
236-
>
237-
overachieving.mofo
238-
</a>
211+
href="https://www.topcoder-dev.com/members/undefined/"
212+
/>
239213
<div
240214
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__winnings-info___1Fiyn"
241215
>
242216
<span>
243-
9999999999
244217
points
245218
</span>
246219
<span>
247-
99999
248220
challenges
249221
</span>
250222
</div>
251223
</td>
252224
<td
253225
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-challenges___29htm"
254-
>
255-
99999
256-
</td>
226+
/>
257227
<td
258228
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__col-points___10Lis"
259-
>
260-
9999999999
261-
</td>
229+
/>
262230
</tr>
263231
</tbody>
264232
</table>

__tests__/shared/components/Leaderboard/__snapshots__/PodiumSpot.jsx.snap

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`Matches shallow shapshot 1`] = `
1616
"avatar": "src-shared-components-Leaderboard-___avatarStyles__gold___1KUGN",
1717
}
1818
}
19-
url="some.fake.string"
19+
url={null}
2020
/>
2121
</span>
2222
<div
@@ -27,20 +27,16 @@ exports[`Matches shallow shapshot 1`] = `
2727
<div>
2828
<a
2929
className="src-shared-components-Leaderboard-PodiumSpot-___styles__profile-link___n7nJB"
30-
href="https://www.topcoder-dev.com/members/overachieving.mofo/"
31-
>
32-
overachieving.mofo
33-
</a>
30+
href="https://www.topcoder-dev.com/members/undefined/"
31+
/>
3432
</div>
3533
<div
3634
className="src-shared-components-Leaderboard-PodiumSpot-___styles__winnings-info___2_pZP"
3735
>
3836
<span>
39-
9999999999
4037
points
4138
</span>
4239
<span>
43-
99999
4440
challenges
4541
</span>
4642
</div>

__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ exports[`Default render 1`] = `
1212
href="https://www.topcoder-dev.com"
1313
>
1414
<LogoTopcoderWithName
15-
height={54}
16-
width={156}
15+
height={53}
16+
width={135}
1717
/>
1818
</a>
1919
<ul
@@ -71,6 +71,7 @@ exports[`Default render 1`] = `
7171
</div>
7272
<SubMenu
7373
closeMenu={[Function]}
74+
currentSubMenuTitle=""
7475
menu={null}
7576
trigger={null}
7677
/>
@@ -194,8 +195,8 @@ exports[`Render with open menu 1`] = `
194195
href="https://www.topcoder-dev.com"
195196
>
196197
<LogoTopcoderWithName
197-
height={54}
198-
width={156}
198+
height={53}
199+
width={135}
199200
/>
200201
</a>
201202
<ul
@@ -253,6 +254,7 @@ exports[`Render with open menu 1`] = `
253254
</div>
254255
<SubMenu
255256
closeMenu={[Function]}
257+
currentSubMenuTitle=""
256258
menu={
257259
Object {
258260
"items": Array [
@@ -387,8 +389,8 @@ exports[`Render with specified profile 1`] = `
387389
href="https://www.topcoder-dev.com"
388390
>
389391
<LogoTopcoderWithName
390-
height={54}
391-
width={156}
392+
height={53}
393+
width={135}
392394
/>
393395
</a>
394396
<ul
@@ -459,6 +461,7 @@ exports[`Render with specified profile 1`] = `
459461
</div>
460462
<SubMenu
461463
closeMenu={[Function]}
464+
currentSubMenuTitle=""
462465
menu={null}
463466
trigger={null}
464467
/>

__tests__/shared/components/TopcoderHeader/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ test('Default render', () => {
3232
closeMenu={_.noop}
3333
closeMobileMenu={_.noop}
3434
closeSearch={_.noop}
35+
currentNav={{}}
3536
openMenu={_.noop}
3637
openMobileMenu={_.noop}
3738
openSearch={_.noop}
@@ -46,6 +47,7 @@ test('Render with open menu', () => {
4647
closeMenu={_.noop}
4748
closeMobileMenu={_.noop}
4849
closeSearch={_.noop}
50+
currentNav={{}}
4951
openMenu={_.noop}
5052
openedMenu={{
5153
title: 'Menu Title',
@@ -68,6 +70,7 @@ test('Render with specified profile', () => {
6870
closeMenu={_.noop}
6971
closeMobileMenu={_.noop}
7072
closeSearch={_.noop}
73+
currentNav={{}}
7174
openMenu={_.noop}
7275
openMobileMenu={_.noop}
7376
openSearch={_.noop}
@@ -91,6 +94,7 @@ describe('User input handling', () => {
9194
closeMenu={mockCloseMenu}
9295
closeMobileMenu={_.noop}
9396
closeSearch={mockCloseSearch}
97+
currentNav={{}}
9498
openMenu={mockOpenMenu}
9599
openMobileMenu={_.noop}
96100
openSearch={mockOpenSearch}

__tests__/shared/components/__snapshots__/LoadingIndicator.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ exports[`renders correctly 1`] = `
44
<img
55
alt="Loading..."
66
className="src-shared-components-LoadingIndicator-___styles__style___3RNHL"
7-
src="2f402d440d802a10b7672b75897c47a5.gif"
7+
src="/images/2f402d440d802a10b7672b75897c47a5.gif"
88
/>
99
`;

__tests__/shared/components/tc-communities/__snapshots__/Header.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ exports[`Snapshot match 1`] = `
8989
</header>
9090
<SubMenu
9191
closeMenu={undefined}
92+
currentSubMenuTitle=""
9293
menu={null}
9394
trigger={null}
9495
/>
@@ -233,6 +234,7 @@ exports[`Snapshot match 2`] = `
233234
</header>
234235
<SubMenu
235236
closeMenu={undefined}
237+
currentSubMenuTitle=""
236238
menu={null}
237239
trigger={null}
238240
/>

__tests__/shared/containers/__snapshots__/TopcoderHeader.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exports[`Matches shallow snapshot 1`] = `
1313
openedMenu={null}
1414
profile={Object {}}
1515
searchOpened={false}
16+
setCurrentNav={[Function]}
1617
store={
1718
Object {
1819
"dispatch": [Function],

__tests__/shared/containers/tc-communities/__snapshots__/Page.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ exports[`Matches shapshot 1`] = `
7373
],
7474
}
7575
}
76+
setCurrentNav={[Function]}
7677
store={
7778
Object {
7879
"dispatch": [Function],

__tests__/shared/reducers/topcoder_header.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ function testReducer(reducer, istate) {
7979
}
8080

8181
describe('Default reducer', () =>
82-
testReducer(reducers.default, {}),
82+
testReducer(reducers.default, {
83+
currentNav: {},
84+
}),
8385
);
8486

config/webpack/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = {
5959
loader: 'file-loader',
6060
options: {
6161
outputPath: '/images/',
62-
publicPath: '/images/../',
62+
publicPath: '',
6363
},
6464
}, {
6565
test: /\.scss$/,

src/server/tc-communities/tc-prod-dev/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
"url": "leaderboard"
3434
}
3535
],
36-
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/412/run/json/"
36+
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/"
3737
}

src/server/tc-communities/wipro/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"redirect": "https://ios.topcoder.com/",
1919
"value": "3"
2020
}],
21-
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/0/run/json/",
21+
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/",
2222
"logos": [
2323
"/themes/wipro/wipro-logo.png",
2424
"/themes/wipro/logo_topcoder_with_name.svg"

0 commit comments

Comments
 (0)