Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c68e422
A hacky update of SRMX Home page
birdofpreyru Aug 10, 2017
cd9456e
FIX: Links for reg and submissions for past challenges in challenge l…
birdofpreyru Aug 11, 2017
b4dc163
Adds Veterans Community
birdofpreyru Aug 11, 2017
72bee6c
Moves button on TopGear Learn page
birdofpreyru Aug 11, 2017
103b5f1
Misc updates of TopGear community
birdofpreyru Aug 11, 2017
b5d7288
Adds points to prize tooltips in challenge listings
birdofpreyru Aug 11, 2017
c221e9f
JS code-splitting setup
birdofpreyru Aug 12, 2017
e37d80f
Testing and fixing of JS code-splitting setup
birdofpreyru Aug 12, 2017
509d76d
Support of CSS code splitting (without HMR)
birdofpreyru Aug 13, 2017
59d254d
First test of the new code-splitting setup in dev
birdofpreyru Aug 13, 2017
dacba75
CSS code splitting optimization + HMR support
birdofpreyru Aug 13, 2017
1c3e5c1
Update of configuration related to CSS modules
birdofpreyru Aug 14, 2017
800d261
Removes CSS optimization on development Webpack builds
birdofpreyru Aug 14, 2017
b6725fd
Merge branch 'code-splitting' into develop
birdofpreyru Aug 14, 2017
a4afde3
updated challenge id for content
ajefts Aug 14, 2017
db88140
Corrections of babel setup related to CSS modules
birdofpreyru Aug 14, 2017
f023f74
Merge branch 'code-splitting' into develop
birdofpreyru Aug 14, 2017
0ea96e4
Fix of dockerfile
birdofpreyru Aug 14, 2017
5494687
Experimenting with the deployment setup
birdofpreyru Aug 14, 2017
2c98b21
Another attempt to fix the build
birdofpreyru Aug 14, 2017
7818689
A better fix of extract-css-chunks-webpack-plugin problem
birdofpreyru Aug 14, 2017
56142ed
Adds cacheCss option to the SplitRoute component
birdofpreyru Aug 14, 2017
44217c3
Introduction of Code Splitting into the codebase
birdofpreyru Aug 15, 2017
d763fd3
Examples code is splitted into a separate code chunk
birdofpreyru Aug 15, 2017
81d7721
CODE: New Challenge Details Page - Specs Sidebar & Challenge Terms
birdofpreyru Aug 16, 2017
c27097f
Merge branch 'develop' into terms
birdofpreyru Aug 16, 2017
dc88a16
Fix of return URL generation in terms-related code
birdofpreyru Aug 16, 2017
209cc8e
A bunch of different fixes, mostly related to Challenge Details page
birdofpreyru Aug 17, 2017
ba81e37
Next portion of fixes for challenge details page
birdofpreyru Aug 18, 2017
575353c
Server side rendering of challenge details page
birdofpreyru Aug 18, 2017
cd02db0
A small fix of the previous commit
birdofpreyru Aug 18, 2017
0b93ca3
More fixes of the specification tab
birdofpreyru Aug 18, 2017
f0a257f
Fixes responsive behaviour of the challenge specs tab
birdofpreyru Aug 20, 2017
e49fb15
Refactoring of communities-related code - Step I
birdofpreyru Aug 20, 2017
9a0cce9
Refactoring of communities-related code - Step II
birdofpreyru Aug 20, 2017
bf6b9d9
fixed case for refcode
ajefts Aug 21, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 52 additions & 12 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,66 @@
// Babel config for NodeJS (server-side). Frontend Babel configuration is embed
// inside Webpack config.
{
"env": {
"development": {
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[path][name]___[local]"
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
},
"generateScopedName": "[path][name]___[local]"
}]
]
},
"production": {
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[hash:base64:6]"
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
},
"generateScopedName": "[hash:base64:6]"
}]
]
},
"test": {
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[path]___[name]__[local]___[hash:base64:5]"
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
}
}]
]
}
},
"presets": ["env", "react", "stage-2"],
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[path]___[name]__[local]___[hash:base64:5]"
}],
"dynamic-import-node",
"inline-react-svg",
["module-resolver", {
"extensions": [".js", ".jsx"],
"root": [
"./src/shared",
"./src"
]
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
}
],
"transformFunctions": ["resolveWeak"]
}],
["transform-assets", {
"extensions": ["gif", "jpeg", "jpg", "png"],
Expand Down
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "airbnb",
"parser": "babel-eslint",
"settings": {
"import/resolver": {
"babel-module": {}
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN npm install
ADD . /opt/app

ARG BUILD_ENV=prod
ENV BABEL_ENV=production
ENV NODE_ENV=$BUILD_ENV
RUN npm run build

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ We use [https://logentries.com](https://logentries.com) to track the logs. Log E

### Development Notes
- [Challenge Listing - Notes from winning submission](docs/challenge-listing-notes.md)
- [**Code Splitting**](docs/code-splitting.md)
- [**How to Add a New Topcoder Community?**](docs/how-to-add-a-new-topcoder-community.md)
- [Leaderboard - Notes from the winning submission](docs/leaderboard-notes.md)
- [**Why Reducer Factories and How to Use Them?**](docs/why-reducer-factories-and-how-to-use-them.md)
Expand Down
1 change: 1 addition & 0 deletions __tests__/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jest.setMock(require.resolve('server/renderer'), (req, res, next) => next());
afterAll(() => {
delete process.env.DEV_TOOLS;
delete process.env.FRONT_END;
delete process.env.NODE_ENV_REAL;
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Renderer from 'react-test-renderer/shallow';
import Content from 'components/examples/Content';
import Content from 'components/Content';

test('Matches shallow shapshot', () => {
const renderer = new Renderer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,8 @@ exports[`Matches shallow shapshot 1`] = `
centerMode={true}
dots={false}
infinite={false}
nextArrow={
<NavButton
currentSlide={null}
slideCount={null}
/>
}
prevArrow={
<NavButton
currentSlide={null}
slideCount={null}
/>
}
nextArrow={<NavButton />}
prevArrow={<NavButton />}
slidesToScroll={1}
slidesToShow={1}
speed={500}
Expand Down
6 changes: 3 additions & 3 deletions __tests__/shared/components/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ const render = TU.renderIntoDocument((

test('onCancel', () => {
const obj = TU.findAllInRenderedTree(render, item =>
item && item.className && item.className.match('bg-overlay'))[0];
item && item.className && item.className.match('overlay'))[0];
TU.Simulate.click(obj);
expect(mockOnCancel).toHaveBeenCalled();
});

test('onWheel', () => {
const container = TU.findAllInRenderedTree(render, item =>
item && item.className && item.className.match('modal-container'))[0];
item && item.className && item.className.match('container'))[0];
TU.Simulate.wheel(container);
const overlay = TU.findAllInRenderedTree(render, item =>
item && item.className && item.className.match('bg-overlay'))[0];
item && item.className && item.className.match('overlay'))[0];
TU.Simulate.wheel(overlay);
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Matches shallow shapshot 1`] = `
<div
className="src-shared-components-examples-Content-___style__Content___3X7yY"
className="src-shared-components-Content-___style__Content___aJySd"
>
<h1>
Topcoder Community App
Expand Down Expand Up @@ -205,7 +205,7 @@ exports[`Matches shallow shapshot 1`] = `
>
design challenge 2
</Link>
,
.
</li>
<li>
<Link
Expand Down Expand Up @@ -296,6 +296,14 @@ exports[`Matches shallow shapshot 1`] = `
TopGear (Wipro) community
</Link>
</li>
<li>
<Link
replace={false}
to="/community/veterans/"
>
Veterans Community
</Link>
</li>
</ul>
<h3>
Misc Examples
Expand All @@ -314,6 +322,14 @@ exports[`Matches shallow shapshot 1`] = `
</code>
.
</li>
<li>
<Link
replace={false}
to="/examples/code-splitting"
>
Code Splitting
</Link>
</li>
<li>
<Link
replace={false}
Expand Down
20 changes: 9 additions & 11 deletions __tests__/shared/components/__snapshots__/Modal.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Snapshot match 1`] = `
<div>
<div
className="src-shared-components-Modal-___styles__modal-container___2m4KB"
onWheel={[Function]}
/>
<button
className="src-shared-components-Modal-___styles__bg-overlay___2xty_"
onClick={[Function]}
onWheel={[Function]}
/>
</div>
<Modal
onCancel={[Function]}
theme={
Object {
"container": "src-shared-components-Modal-___styles__container___2HN2G",
"overlay": "src-shared-components-Modal-___styles__overlay___36ZAX",
}
}
/>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports[`Matches shallow shapshot shapshot 1 1`] = `
<Prize
bonuses={Array []}
label="Purse"
points={null}
prizeUnitSymbol="$"
prizes={
Array [
Expand Down Expand Up @@ -168,6 +169,7 @@ exports[`Matches shallow shapshot shapshot 2 1`] = `
<Prize
bonuses={Array []}
label="Purse"
points={null}
prizeUnitSymbol="$"
prizes={
Array [
Expand Down Expand Up @@ -273,6 +275,7 @@ exports[`Matches shallow shapshot shapshot 3 1`] = `
<Prize
bonuses={Array []}
label="Purse"
points={null}
prizeUnitSymbol="$"
prizes={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ exports[`Matches shallow shapshot 1`] = `
>
Join Community
</button>
<Modal
<ThemedModal
composeTheme="deeply"
mapThemrProps={[Function]}
onCancel={[Function]}
theme={Object {}}
>
<p
className="src-shared-components-tc-communities-JoinCommunity-___style__confirmMsg___3Urx0"
Expand All @@ -34,7 +37,7 @@ exports[`Matches shallow shapshot 1`] = `
Cancel
</button>
</div>
</Modal>
</ThemedModal>
</div>
`;

Expand Down Expand Up @@ -76,8 +79,11 @@ exports[`Matches shallow shapshot 4`] = `
>
Join Community
</button>
<Modal
<ThemedModal
composeTheme="deeply"
mapThemrProps={[Function]}
onCancel={[Function]}
theme={Object {}}
>
<h1
className="src-shared-components-tc-communities-JoinCommunity-___style__modalTitle___1U_iw"
Expand All @@ -97,7 +103,7 @@ exports[`Matches shallow shapshot 4`] = `
>
Return to the Community
</button>
</Modal>
</ThemedModal>
</div>
`;

Expand All @@ -109,8 +115,11 @@ exports[`Matches shallow shapshot 5`] = `
>
Join Community
</button>
<Modal
<ThemedModal
composeTheme="deeply"
mapThemrProps={[Function]}
onCancel={[Function]}
theme={Object {}}
>
<p
className="src-shared-components-tc-communities-JoinCommunity-___style__confirmMsg___3Urx0"
Expand All @@ -135,6 +144,6 @@ exports[`Matches shallow shapshot 5`] = `
Cancel
</button>
</div>
</Modal>
</ThemedModal>
</div>
`;
Loading