Skip to content

Commit

Permalink
Merge pull request #1507 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
Markdown editing / download all submissions
  • Loading branch information
jmgasper authored Mar 1, 2023
2 parents 4915462 + 9714431 commit 24d9d87
Show file tree
Hide file tree
Showing 24 changed files with 6,769 additions and 569 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ builddeploy_steps: &builddeploy_steps
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
source buildenvvar
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
curl --request POST \
--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
--header "Circle-Token: ${CIRCLE_TOKEN}" \
--header 'content-type: application/json' \
--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true, "run_basedeployment": false}}'
#curl --request POST \
#--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \
#--header "Circle-Token: ${CIRCLE_TOKEN}" \
#--header 'content-type: application/json' \
#--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true, "run_basedeployment": false}}'
# Automated Smoke Testing
smoke_testing: &smoke_testing
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.22.1
12.17.0
4 changes: 4 additions & 0 deletions config/constants/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const DOMAIN = 'topcoder-dev.com'
const DEV_API_HOSTNAME = `https://api.${DOMAIN}`

module.exports = {
API_V2: `${DEV_API_HOSTNAME}/v2`,
API_V3: `${DEV_API_HOSTNAME}/v3`,
API_V4: `${DEV_API_HOSTNAME}/v4`,
API_V5: `${DEV_API_HOSTNAME}/v5`,
ACCOUNTS_APP_CONNECTOR_URL: `https://accounts-auth0.${DOMAIN}`,
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
Expand Down
4 changes: 4 additions & 0 deletions config/constants/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const DOMAIN = 'topcoder.com'
const PROD_API_HOSTNAME = `https://api.${DOMAIN}`

module.exports = {
API_V2: `${PROD_API_HOSTNAME}/v2`,
API_V3: `${PROD_API_HOSTNAME}/v3`,
API_V4: `${PROD_API_HOSTNAME}/v4`,
API_V5: `${PROD_API_HOSTNAME}/v5`,
ACCOUNTS_APP_CONNECTOR_URL: process.env.ACCOUNTS_APP_CONNECTOR_URL || `https://accounts-auth0.${DOMAIN}`,
ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`,
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
Expand Down
5 changes: 5 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ module.exports = function (webpackEnv) {
tls: 'empty',
child_process: 'empty'
},
externals: {
/* NodeJS library for https://logentries.com. It is server-side only. Exclude it as null. */
le_node: 'null',
module: 'null'
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the base image with Node.js
FROM node:10
FROM node:12
ARG NODE_ENV
ARG BABEL_ENV

Expand All @@ -10,6 +10,7 @@ ENV NODE_ENV=$NODE_ENV
ENV BABEL_ENV=$BABEL_ENV
ENV FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY
ENV FORCE_DEV=$FORCE_DEV
ENV NODE_OPTIONS="--max-old-space-size=6144"

# Copy the current directory into the Docker image
COPY . /challenge-engine-ui
Expand Down
5,664 changes: 5,316 additions & 348 deletions package-lock.json

Large diffs are not rendered by default.

53 changes: 33 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"axios": "^0.19.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
"babel-loader": "8.0.4",
"babel-plugin-named-asset-import": "^0.3.0",
"babel-preset-react-app": "^7.0.0",
Expand All @@ -25,37 +24,25 @@
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
"eslint": "5.6.0",
"eslint-config-react-app": "^3.0.6",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-react": "^7.0.2",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "7.11.1",
"eslint-plugin-standard": "^4.0.0",
"easymde": "^2.18.0",
"express": "^4.16.4",
"fflate": "^0.7.4",
"file-loader": "2.0.0",
"filestack-js": "^3.20.0",
"filestack-react": "^4.0.1",
"fs-extra": "7.0.0",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.1",
"jest-resolve": "23.6.0",
"jquery": "^3.4.1",
"jstimezonedetect": "^1.0.6",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.11",
"marked": "^1.0.0",
"mini-css-extract-plugin": "0.4.3",
"moment": "^2.24.0",
"moment-duration-format": "^2.2.2",
"moment-timezone": "^0.5.34",
"node-sass": "^4.14.0",
"normalize-text": "^2.4.1",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.1.0",
"postcss-flexbugs-fixes": "4.1.0",
Expand All @@ -76,8 +63,10 @@
"react-dom": "^16.7.0",
"react-google-charts": "^3.0.13",
"react-helmet": "^5.2.0",
"react-hot-loader": "^4.13.1",
"react-idle-timer": "^4.6.4",
"react-js-pagination": "^3.0.3",
"react-markdown": "^6.0.3",
"react-popper": "^2.2.4",
"react-redux": "^6.0.0",
"react-redux-toastr": "^7.5.1",
Expand All @@ -90,14 +79,22 @@
"redux-logger": "^3.0.6",
"redux-promise-middleware": "4.2.1",
"redux-thunk": "^2.3.0",
"rehype-katex": "^5.0.0",
"rehype-raw": "^5.1.0",
"rehype-stringify": "^8.0.0",
"remark-breaks": "^2.0.2",
"remark-frontmatter": "^3.0.0",
"remark-gfm": "^1.0.0",
"remark-math": "^4.0.0",
"remark-parse": "^10.0.1",
"resolve": "1.8.1",
"sass-loader": "7.1.0",
"simplemde": "^1.11.2",
"style-loader": "0.23.0",
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.4",
"terser": "^3.16.1",
"terser-webpack-plugin": "1.1.0",
"topcoder-healthcheck-dropin": "^1.0.3",
"topcoder-react-lib": "^1.2.10",
"url-loader": "1.1.1",
"webpack": "^4.43.0",
"webpack-dev-server": "^3.11.0",
Expand Down Expand Up @@ -174,9 +171,25 @@
]
},
"devDependencies": {
"standard": "^12.0.1"
"standard": "^12.0.1",
"eslint": "5.6.0",
"eslint-config-react-app": "^3.0.6",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-react": "^7.0.2",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "7.11.1",
"eslint-plugin-standard": "^4.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.1",
"jest-resolve": "23.6.0",
"babel-jest": "23.6.0"
},
"volta": {
"node": "10.15.3"
"node": "12.17.0"
}
}
20 changes: 19 additions & 1 deletion src/components/Buttons/PrimaryButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ import styles from './PrimaryButton.module.scss'

const PrimaryButton = React.forwardRef(
(
{ type, text, link, onClick, submit, disabled, onMouseEnter, onMouseLeave },
{ type, text, link, onClick, submit, disabled, onMouseEnter, onMouseLeave, href },
ref
) => {
if (!_.isEmpty(href)) {
return (
<a
type={submit ? 'submit' : 'button'}
className={cn(styles.container, styles[type])}
onClick={submit ? null : onClick}
disabled={disabled}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
ref={ref}
href={href}
target='_blank'
>
<span>{text}</span>
</a>
)
}
if (_.isEmpty(link)) {
return (
<button
Expand Down Expand Up @@ -44,6 +61,7 @@ PrimaryButton.propTypes = {
type: PropTypes.string.isRequired,
text: PropTypes.string.isRequired,
link: PropTypes.string,
href: PropTypes.string,
onClick: PropTypes.func,
submit: PropTypes.bool,
disabled: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChallengeEditor/ChallengeViewTabs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const ChallengeViewTabs = ({
<Registrants challenge={challenge} registrants={registrants} />
)}
{selectedTab === 2 && (
<Submissions challenge={challenge} submissions={submissions} />
<Submissions challenge={challenge} submissions={submissions} token={token} />
)}
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
margin: 0 30px;
border-radius: 2px;
font-size: 16px;
max-height: 410px;
display: flex;
flex-direction: column;
overflow: auto;
Expand All @@ -20,6 +19,84 @@
.CodeMirror.CodeMirror-wrap {
min-height: 0;
flex: 1;
box-sizing: border-box;
height: auto;
border-right: 1px solid #aaa;
border-left: 1px solid #aaa;
border-bottom: 1px solid #aaa;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}

.editor-toolbar {
opacity: 1;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;

&::after,
&::before {
content: none;
}

button.table {
width: auto;
}
}

.editor-statusbar {
font-size: 13px;
padding: 8px 0;
overflow: hidden;
display: flex;

span {
min-width: 0;
}

.upload-image {
margin-left: 0;
margin-right: auto;
display: flex;
}

.countOfRemainingChars {
margin-left: 0;
min-width: 0;
display: flex;
}

.message {
display: none;
}
}
}

.reviewContainer {
:global {
table {
display: block;
width: 100%;
overflow: auto;
box-sizing: border-box;

* {
box-sizing: border-box;
}

tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}

th,
td {
padding: 6px 13px;
border: 1px solid #dfe2e5;
}
}
}
}

Expand Down
Loading

0 comments on commit 24d9d87

Please sign in to comment.