Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
birdofpreyru committed Aug 28, 2017
2 parents bd0de88 + 66be347 commit da9a624
Show file tree
Hide file tree
Showing 26 changed files with 203 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ exports[`Matches shallow shapshot 1`] = `
onShowDetails={[Function]}
onlineReviewUrl=""
showDetails={Set {}}
status={undefined}
submissionObjects={Array []}
type="Challenge Track"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports[`Matches shallow shapshot 1`] = `
onDownload={[Function]}
onShowDetails={[Function]}
showScreeningDetails={true}
status={undefined}
submissionObject={
Object {
"submissionId": 12345,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ exports[`Snapshot match 1`] = `
>
<a
className="tc-btn-sm tc-btn-primary"
href="http://accounts-test.topcoder-dev.com/member/registration"
href="http://accounts.topcoder-dev.com/member/registration"
>
Join
</a>
<a
className="tc-btn-sm tc-btn-default"
href="http://accounts-test.topcoder-dev.com/member"
href="http://accounts.topcoder-dev.com/member"
>
Log In
</a>
Expand All @@ -25,13 +25,13 @@ exports[`Snapshot match 2`] = `
>
<a
className="tc-btn-sm tc-btn-primary"
href="http://accounts-test.topcoder-dev.com/member/registration"
href="http://accounts.topcoder-dev.com/member/registration"
>
Join
</a>
<a
className="tc-btn-sm tc-btn-default"
href="http://accounts-test.topcoder-dev.com/member"
href="http://accounts.topcoder-dev.com/member"
>
Log In
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ exports[`Default render 1`] = `
>
<a
className="tc-btn-sm tc-btn-primary"
href="http://accounts-test.topcoder-dev.com/member/registration"
href="http://accounts.topcoder-dev.com/member/registration"
>
Join
</a>
<a
className="tc-btn-sm tc-btn-default"
href="http://accounts-test.topcoder-dev.com/member"
href="http://accounts.topcoder-dev.com/member"
>
Log In
</a>
Expand Down Expand Up @@ -232,13 +232,13 @@ exports[`Render with open menu 1`] = `
>
<a
className="tc-btn-sm tc-btn-primary"
href="http://accounts-test.topcoder-dev.com/member/registration"
href="http://accounts.topcoder-dev.com/member/registration"
>
Join
</a>
<a
className="tc-btn-sm tc-btn-default"
href="http://accounts-test.topcoder-dev.com/member"
href="http://accounts.topcoder-dev.com/member"
>
Log In
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exports[`Matches shallow shapshot shapshot 1 1`] = `
</span>
<Tags
onTechTagClicked={[Function]}
platforms=""
technologies="Data Science"
/>
</div>
Expand Down Expand Up @@ -155,6 +156,7 @@ exports[`Matches shallow shapshot shapshot 2 1`] = `
</span>
<Tags
onTechTagClicked={[Function]}
platforms=""
technologies="Go"
/>
</div>
Expand Down Expand Up @@ -261,6 +263,7 @@ exports[`Matches shallow shapshot shapshot 3 1`] = `
</span>
<Tags
onTechTagClicked={[Function]}
platforms=""
technologies=""
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`Matches shallow shapshot 1`] = `
>
<a
className="tc-btn-md tc-btn-primary"
href="http://accounts-test.topcoder-dev.com/member?retUrl=null%2F"
href="http://accounts.topcoder-dev.com/member?retUrl=null%2F"
>
Log In Here
</a>
Expand Down
2 changes: 1 addition & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ACCOUNTS_APP_CONNECTOR": "https://accounts.topcoder-dev.com/connector.html",

"ARENA": "https://arena.topcoder-dev.com",
"AUTH": "http://accounts-test.topcoder-dev.com",
"AUTH": "http://accounts.topcoder-dev.com",
"BASE": "https://www.topcoder-dev.com",
"BLOG": "https://www.topcoder-dev.com/feed",
"COGNITIVE": "https://cognitive.topcoder.com",
Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"react-dom": "^15.6.1",
"react-dropdown": "^1.2.1",
"react-hot-loader": "^3.0.0-beta.6",
"react-player": "^0.20.0",
"react-redux": "^5.0.3",
"react-router-dom": "^4.0.0",
"react-select": "^1.0.0-rc.3",
Expand Down
12 changes: 8 additions & 4 deletions src/shared/components/SubmissionManagement/Submission/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function Submission(props) {
type,
onDelete,
onShowDetails,
status,
} = props;
const formatDate = date => moment(+new Date(date)).format('MMM DD, YYYY hh:mm A');

Expand Down Expand Up @@ -72,10 +73,12 @@ export default function Submission(props) {
onClick={() => onDownload(submissionObject.submissionId)}
><DownloadIcon /></button>
*/ }
<button
styleName="delete-icon"
onClick={() => onDelete(submissionObject.submissionId)}
><DeleteIcon /></button>
{status !== 'COMPLETED' &&
<button
styleName="delete-icon"
onClick={() => onDelete(submissionObject.submissionId)}
><DeleteIcon /></button>
}
<button
styleName={`expand-icon ${(showScreeningDetails ? 'expanded' : '')}`}
onClick={() => onShowDetails(submissionObject.submissionId)}
Expand Down Expand Up @@ -108,4 +111,5 @@ Submission.propTypes = {
type: PT.string.isRequired,
onDelete: PT.func.isRequired,
onShowDetails: PT.func,
status: PT.string.isRequired,
};
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export default function SubmissionManagement(props) {
submissionObjects={submissions}
showDetails={showDetails}
type={challenge.track}
status={challenge.status}
{...componentConfig}
/>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function SubmissionsTable(props) {
helpPageUrl,
onDownload,
onShowDetails,
status,
} = props;

const submissionsWithDetails = [];
Expand All @@ -53,6 +54,7 @@ export default function SubmissionsTable(props) {
onShowDetails={onShowDetails}
onDelete={onDelete}
onDownload={onDownload}
status={status}
key={shortid.generate()}
/>
);
Expand Down Expand Up @@ -125,4 +127,5 @@ SubmissionsTable.propTypes = {
helpPageUrl: PT.string,
onDownload: PT.func,
onShowDetails: PT.func,
status: PT.string.isRequired,
};
4 changes: 2 additions & 2 deletions src/shared/components/TopcoderHeader/mobile/Search/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.icon {
left: 18px;
position: absolute;
top: 14px;
top: 18px;
}

.search {
Expand All @@ -26,7 +26,7 @@
font: 16px "Sofia Pro", sans-serif;
height: 32px;
outline: none;
padding-left: 28px;
padding-left: 30px !important;

&::placeholder {
color: $tc-gray-60;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/challenge-detail/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function ChallengeHeader(props) {
</p> :
<p styleName="bonus-text">
<span styleName={`bonus-highlight ${trackLower}-accent-color`}>
RELIABILITY BONUS: {reliabilityBonus}
RELIABILITY BONUS: $ {reliabilityBonus}
</span>
</p>
}
Expand Down
4 changes: 4 additions & 0 deletions src/shared/components/challenge-detail/Header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@
font-family: roboto;
font-weight: 400;

&:last-child {
border-right: none;
}

.deadline-info {
font-size: 13px;
color: $tc-gray-40;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function Submissions(props) {
</div>
<div styleName="col-2">{moment(s.submissionDate).format('MMM DD, YYYY HH:mm')} EDT</div>
<div styleName="col-3">
{s.initialScore.toFixed(2)} / {s.finalScore.toFixed(2)}
{(s.initialScore || 0).toFixed(2)} / {(s.finalScore || 0).toFixed(2)}
</div>
</div>
))
Expand Down
4 changes: 3 additions & 1 deletion src/shared/components/challenge-detail/Winners/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export default function Winners(props) {
isDesign,
} = props;

results.sort((a, b) => a.placement - b.placement);
const maxPlace = Number.MAX_SAFE_INTEGER;
results.sort((a, b) => (_.isNumber(a.placement) ? a.placement : maxPlace) -
(_.isNumber(b.placement) ? b.placement : maxPlace));
const winners = results.slice(0, prizes.length);

return (
Expand Down
12 changes: 10 additions & 2 deletions src/shared/components/challenge-listing/ChallengeCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ function ChallengeCard({
{challenge.status === 'ACTIVE' ? 'Ends ' : 'Ended '}
{getEndDate(challenge.submissionEndDate)}
</span>
<Tags technologies={challenge.technologies} onTechTagClicked={onTechTagClicked} />
<Tags
technologies={challenge.technologies}
platforms={challenge.platforms}
onTechTagClicked={onTechTagClicked}
/>
</div>
</div>
</div>
Expand Down Expand Up @@ -205,7 +209,9 @@ class Tags extends React.Component {
}

renderTechnologies() {
const technologies = this.props.technologies ? this.props.technologies.split(',') : [];
let technologies = this.props.technologies ? this.props.technologies.split(',').map(item => item.trim()) : [];
const platforms = this.props.platforms ? this.props.platforms.split(',').map(item => item.trim()) : [];
technologies = _.union(technologies, platforms);
if (technologies.length) {
let technologyList = technologies;
if (technologies.length > VISIBLE_TECHNOLOGIES && !this.state.expanded) {
Expand Down Expand Up @@ -241,11 +247,13 @@ class Tags extends React.Component {
Tags.defaultProps = {
onTechTagClicked: _.noop,
technologies: '',
platforms: '',
};

Tags.propTypes = {
onTechTagClicked: PT.func,
technologies: PT.string,
platforms: PT.string,
};

export default ChallengeCard;
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ export default function ChallengeSearchBar({
<div styleName="ChallengeSearchBar">
<input
onChange={event => setQuery(event.target.value)}
onKeyPress={event => (event.key === 'Enter' ? onSearch(query) : null)}
onKeyPress={event => (event.key === 'Enter' ? onSearch(query.trim()) : null)}
placeholder={placeholder}
type="text"
value={query}
/>
<span
styleName={`SearchButton ${query ? 'active' : ''}`}
onClick={() => onSearch(query)}
onClick={() => onSearch(query.trim())}
>
<ZoomIcon styleName="zoomIcon" />
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ const DESCRIPTION = {
WEB_DESIGNS: 'Design UI and front end experiences for web experiences',
WIDGET_OR_MOBILE_SCREEN_DESIGN: 'Design UI and front end experiences for mobile',
WIREFRAMES: 'Produce the information architecture for user experiences',
BUG_HUNT: 'Quickly find Bugs in apps, websites',
};

const HEADER = {
APPLICATION_FRONT_END_DESIGN: 'Application Front-End Design (AFED)',
ARCHITECTURE: 'Architecture (Ar)',
ASSEMBLY_COMPETITION: 'Assembly (As)',
BANNERS_OR_ICONS: 'Banners/Icons (BI)',
BUG_HUNT: 'Bug Hunt (BH)',
CODE: 'Code (Cd)',
CONCEPTUALIZATION: 'Conceptualization (Cn)',
DESIGN_FIRST_2_FINISH: 'Design First2Finish(DF2F)',
Expand All @@ -44,6 +46,7 @@ const HEADER = {
UI_PROTOTYPE_COMPETITION: 'UI Prototype (Pr)',
WEB_DESIGNS: 'Web Design (Wd)',
WIDGET_OR_MOBILE_SCREEN_DESIGN: 'Widget or Mobile Screen Design (Wg)',
WIREFRAMES: 'Wireframe (Wf)',
};

const TRACK_COLOR_CLASS = {
Expand Down
Loading

0 comments on commit da9a624

Please sign in to comment.