Skip to content

Commit 24d9d87

Browse files
authored
Merge pull request #1507 from topcoder-platform/develop
Markdown editing / download all submissions
2 parents 4915462 + 9714431 commit 24d9d87

File tree

24 files changed

+6769
-569
lines changed

24 files changed

+6769
-569
lines changed

.circleci/config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ builddeploy_steps: &builddeploy_steps
7474
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
7575
source buildenvvar
7676
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
77-
curl --request POST \
78-
--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
79-
--header "Circle-Token: ${CIRCLE_TOKEN}" \
80-
--header 'content-type: application/json' \
81-
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true, "run_basedeployment": false}}'
77+
#curl --request POST \
78+
#--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
79+
#--header "Circle-Token: ${CIRCLE_TOKEN}" \
80+
#--header 'content-type: application/json' \
81+
#--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true, "run_basedeployment": false}}'
8282
8383
# Automated Smoke Testing
8484
smoke_testing: &smoke_testing

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.22.1
1+
12.17.0

config/constants/development.js

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ const DOMAIN = 'topcoder-dev.com'
22
const DEV_API_HOSTNAME = `https://api.${DOMAIN}`
33

44
module.exports = {
5+
API_V2: `${DEV_API_HOSTNAME}/v2`,
6+
API_V3: `${DEV_API_HOSTNAME}/v3`,
7+
API_V4: `${DEV_API_HOSTNAME}/v4`,
8+
API_V5: `${DEV_API_HOSTNAME}/v5`,
59
ACCOUNTS_APP_CONNECTOR_URL: `https://accounts-auth0.${DOMAIN}`,
610
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
711
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,

config/constants/production.js

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ const DOMAIN = 'topcoder.com'
22
const PROD_API_HOSTNAME = `https://api.${DOMAIN}`
33

44
module.exports = {
5+
API_V2: `${PROD_API_HOSTNAME}/v2`,
6+
API_V3: `${PROD_API_HOSTNAME}/v3`,
7+
API_V4: `${PROD_API_HOSTNAME}/v4`,
8+
API_V5: `${PROD_API_HOSTNAME}/v5`,
59
ACCOUNTS_APP_CONNECTOR_URL: process.env.ACCOUNTS_APP_CONNECTOR_URL || `https://accounts-auth0.${DOMAIN}`,
610
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
711
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,

config/webpack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,11 @@ module.exports = function (webpackEnv) {
558558
tls: 'empty',
559559
child_process: 'empty'
560560
},
561+
externals: {
562+
/* NodeJS library for https://logentries.com. It is server-side only. Exclude it as null. */
563+
le_node: 'null',
564+
module: 'null'
565+
},
561566
// Turn off performance processing because we utilize
562567
// our own hints via the FileSizeReporter
563568
performance: false

docker/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use the base image with Node.js
2-
FROM node:10
2+
FROM node:12
33
ARG NODE_ENV
44
ARG BABEL_ENV
55

@@ -10,6 +10,7 @@ ENV NODE_ENV=$NODE_ENV
1010
ENV BABEL_ENV=$BABEL_ENV
1111
ENV FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY
1212
ENV FORCE_DEV=$FORCE_DEV
13+
ENV NODE_OPTIONS="--max-old-space-size=6144"
1314

1415
# Copy the current directory into the Docker image
1516
COPY . /challenge-engine-ui

package-lock.json

+5,316-348
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+33-20
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"axios": "^0.19.0",
1414
"babel-core": "7.0.0-bridge.0",
1515
"babel-eslint": "9.0.0",
16-
"babel-jest": "23.6.0",
1716
"babel-loader": "8.0.4",
1817
"babel-plugin-named-asset-import": "^0.3.0",
1918
"babel-preset-react-app": "^7.0.0",
@@ -25,37 +24,25 @@
2524
"css-loader": "1.0.0",
2625
"dotenv": "6.0.0",
2726
"dotenv-expand": "4.2.0",
28-
"eslint": "5.6.0",
29-
"eslint-config-react-app": "^3.0.6",
30-
"eslint-config-standard": "^12.0.0",
31-
"eslint-config-standard-react": "^7.0.2",
32-
"eslint-loader": "2.1.1",
33-
"eslint-plugin-flowtype": "2.50.1",
34-
"eslint-plugin-import": "^2.14.0",
35-
"eslint-plugin-jsx-a11y": "6.1.2",
36-
"eslint-plugin-node": "^8.0.1",
37-
"eslint-plugin-promise": "^4.0.1",
38-
"eslint-plugin-react": "7.11.1",
39-
"eslint-plugin-standard": "^4.0.0",
27+
"easymde": "^2.18.0",
4028
"express": "^4.16.4",
29+
"fflate": "^0.7.4",
4130
"file-loader": "2.0.0",
4231
"filestack-js": "^3.20.0",
32+
"filestack-react": "^4.0.1",
4333
"fs-extra": "7.0.0",
4434
"html-webpack-plugin": "4.0.0-alpha.2",
4535
"identity-obj-proxy": "3.0.0",
46-
"jest": "23.6.0",
47-
"jest-pnp-resolver": "1.0.1",
48-
"jest-resolve": "23.6.0",
4936
"jquery": "^3.4.1",
5037
"jstimezonedetect": "^1.0.6",
5138
"jwt-decode": "^2.2.0",
5239
"lodash": "^4.17.11",
53-
"marked": "^1.0.0",
5440
"mini-css-extract-plugin": "0.4.3",
5541
"moment": "^2.24.0",
5642
"moment-duration-format": "^2.2.2",
5743
"moment-timezone": "^0.5.34",
5844
"node-sass": "^4.14.0",
45+
"normalize-text": "^2.4.1",
5946
"optimize-css-assets-webpack-plugin": "5.0.1",
6047
"pnp-webpack-plugin": "1.1.0",
6148
"postcss-flexbugs-fixes": "4.1.0",
@@ -76,8 +63,10 @@
7663
"react-dom": "^16.7.0",
7764
"react-google-charts": "^3.0.13",
7865
"react-helmet": "^5.2.0",
66+
"react-hot-loader": "^4.13.1",
7967
"react-idle-timer": "^4.6.4",
8068
"react-js-pagination": "^3.0.3",
69+
"react-markdown": "^6.0.3",
8170
"react-popper": "^2.2.4",
8271
"react-redux": "^6.0.0",
8372
"react-redux-toastr": "^7.5.1",
@@ -90,14 +79,22 @@
9079
"redux-logger": "^3.0.6",
9180
"redux-promise-middleware": "4.2.1",
9281
"redux-thunk": "^2.3.0",
82+
"rehype-katex": "^5.0.0",
83+
"rehype-raw": "^5.1.0",
84+
"rehype-stringify": "^8.0.0",
85+
"remark-breaks": "^2.0.2",
86+
"remark-frontmatter": "^3.0.0",
87+
"remark-gfm": "^1.0.0",
88+
"remark-math": "^4.0.0",
89+
"remark-parse": "^10.0.1",
9390
"resolve": "1.8.1",
9491
"sass-loader": "7.1.0",
95-
"simplemde": "^1.11.2",
9692
"style-loader": "0.23.0",
9793
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.4",
9894
"terser": "^3.16.1",
9995
"terser-webpack-plugin": "1.1.0",
10096
"topcoder-healthcheck-dropin": "^1.0.3",
97+
"topcoder-react-lib": "^1.2.10",
10198
"url-loader": "1.1.1",
10299
"webpack": "^4.43.0",
103100
"webpack-dev-server": "^3.11.0",
@@ -174,9 +171,25 @@
174171
]
175172
},
176173
"devDependencies": {
177-
"standard": "^12.0.1"
174+
"standard": "^12.0.1",
175+
"eslint": "5.6.0",
176+
"eslint-config-react-app": "^3.0.6",
177+
"eslint-config-standard": "^12.0.0",
178+
"eslint-config-standard-react": "^7.0.2",
179+
"eslint-loader": "2.1.1",
180+
"eslint-plugin-flowtype": "2.50.1",
181+
"eslint-plugin-import": "^2.14.0",
182+
"eslint-plugin-jsx-a11y": "6.1.2",
183+
"eslint-plugin-node": "^8.0.1",
184+
"eslint-plugin-promise": "^4.0.1",
185+
"eslint-plugin-react": "7.11.1",
186+
"eslint-plugin-standard": "^4.0.0",
187+
"jest": "23.6.0",
188+
"jest-pnp-resolver": "1.0.1",
189+
"jest-resolve": "23.6.0",
190+
"babel-jest": "23.6.0"
178191
},
179192
"volta": {
180-
"node": "10.15.3"
193+
"node": "12.17.0"
181194
}
182195
}

src/components/Buttons/PrimaryButton/index.js

+19-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,26 @@ import styles from './PrimaryButton.module.scss'
88

99
const PrimaryButton = React.forwardRef(
1010
(
11-
{ type, text, link, onClick, submit, disabled, onMouseEnter, onMouseLeave },
11+
{ type, text, link, onClick, submit, disabled, onMouseEnter, onMouseLeave, href },
1212
ref
1313
) => {
14+
if (!_.isEmpty(href)) {
15+
return (
16+
<a
17+
type={submit ? 'submit' : 'button'}
18+
className={cn(styles.container, styles[type])}
19+
onClick={submit ? null : onClick}
20+
disabled={disabled}
21+
onMouseEnter={onMouseEnter}
22+
onMouseLeave={onMouseLeave}
23+
ref={ref}
24+
href={href}
25+
target='_blank'
26+
>
27+
<span>{text}</span>
28+
</a>
29+
)
30+
}
1431
if (_.isEmpty(link)) {
1532
return (
1633
<button
@@ -44,6 +61,7 @@ PrimaryButton.propTypes = {
4461
type: PropTypes.string.isRequired,
4562
text: PropTypes.string.isRequired,
4663
link: PropTypes.string,
64+
href: PropTypes.string,
4765
onClick: PropTypes.func,
4866
submit: PropTypes.bool,
4967
disabled: PropTypes.bool,

src/components/ChallengeEditor/ChallengeViewTabs/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ const ChallengeViewTabs = ({
258258
<Registrants challenge={challenge} registrants={registrants} />
259259
)}
260260
{selectedTab === 2 && (
261-
<Submissions challenge={challenge} submissions={submissions} />
261+
<Submissions challenge={challenge} submissions={submissions} token={token} />
262262
)}
263263
</div>
264264
)

src/components/ChallengeEditor/Description-Field/Description-Field.module.scss

+78-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
margin: 0 30px;
88
border-radius: 2px;
99
font-size: 16px;
10-
max-height: 410px;
1110
display: flex;
1211
flex-direction: column;
1312
overflow: auto;
@@ -20,6 +19,84 @@
2019
.CodeMirror.CodeMirror-wrap {
2120
min-height: 0;
2221
flex: 1;
22+
box-sizing: border-box;
23+
height: auto;
24+
border-right: 1px solid #aaa;
25+
border-left: 1px solid #aaa;
26+
border-bottom: 1px solid #aaa;
27+
border-bottom-left-radius: 8px;
28+
border-bottom-right-radius: 8px;
29+
}
30+
31+
.editor-toolbar {
32+
opacity: 1;
33+
border-top-left-radius: 8px;
34+
border-top-right-radius: 8px;
35+
border-top: 1px solid #aaa;
36+
border-left: 1px solid #aaa;
37+
border-right: 1px solid #aaa;
38+
39+
&::after,
40+
&::before {
41+
content: none;
42+
}
43+
44+
button.table {
45+
width: auto;
46+
}
47+
}
48+
49+
.editor-statusbar {
50+
font-size: 13px;
51+
padding: 8px 0;
52+
overflow: hidden;
53+
display: flex;
54+
55+
span {
56+
min-width: 0;
57+
}
58+
59+
.upload-image {
60+
margin-left: 0;
61+
margin-right: auto;
62+
display: flex;
63+
}
64+
65+
.countOfRemainingChars {
66+
margin-left: 0;
67+
min-width: 0;
68+
display: flex;
69+
}
70+
71+
.message {
72+
display: none;
73+
}
74+
}
75+
}
76+
77+
.reviewContainer {
78+
:global {
79+
table {
80+
display: block;
81+
width: 100%;
82+
overflow: auto;
83+
box-sizing: border-box;
84+
85+
* {
86+
box-sizing: border-box;
87+
}
88+
89+
tr {
90+
background-color: #fff;
91+
border-top: 1px solid #c6cbd1;
92+
}
93+
94+
th,
95+
td {
96+
padding: 6px 13px;
97+
border: 1px solid #dfe2e5;
98+
}
99+
}
23100
}
24101
}
25102

0 commit comments

Comments
 (0)