Skip to content

Commit 5e319d0

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/auth0-RS256-Idtoken
2 parents 59b4800 + 27118ee commit 5e319d0

File tree

48 files changed

+296
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+296
-177
lines changed

.circleci/config.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,16 @@ workflows:
230230
filters:
231231
branches:
232232
only:
233-
- feature-contentful
233+
- milestone-20200924
234+
- develop
234235
# This is alternate dev env for parallel testing
235236
- "build-test":
236237
context : org-global
237238
filters:
238239
branches:
239240
only:
241+
- hot-fix-ad-code
240242
- feature-contentful
241-
- hot-fix
242243
# This is alternate dev env for parallel testing
243244
- "build-qa":
244245
context : org-global
@@ -247,20 +248,21 @@ workflows:
247248
only:
248249
- hot-fix
249250
- feature/auth0-RS256-Idtoken
251+
- community-app-tests-poc
250252
# This is beta env for production soft releases
251253
- "build-prod-beta":
252254
context : org-global
253255
filters:
254256
branches:
255257
only:
258+
- integration-v5-challenge-api
256259
- hot-fix
257260
# This is stage env for production QA releases
258261
- "build-prod-staging":
259262
context : org-global
260263
filters:
261264
branches:
262265
only:
263-
- feature-contentful
264266
- develop
265267
# Production builds are exectuted
266268
# when PR is merged to the master

__tests__/shared/__snapshots__/index.jsx.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ exports[`Snapshot match 1`] = `
1919
href="/challenges/manifest.json"
2020
rel="manifest"
2121
/>
22+
<script
23+
async={true}
24+
src="https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com"
25+
/>
2226
</HelmetWrapper>
2327
<withRouter(Connect(Routes)) />
2428
<Connect(ErrorMessageContainer) />
@@ -53,6 +57,10 @@ exports[`Snapshot match 2`] = `
5357
href="/challenges/manifest.json"
5458
rel="manifest"
5559
/>
60+
<script
61+
async={true}
62+
src="https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com"
63+
/>
5664
</HelmetWrapper>
5765
<withRouter(Connect(Routes)) />
5866
<Connect(ErrorMessageContainer) />

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,15 @@ exports[`renders marathon 1`] = `
202202
className="src-shared-components-ChallengeTile-___style__completed-challenge___3w5tT"
203203
>
204204
<header>
205-
<a
205+
<Link
206206
className="src-shared-components-ChallengeTile-___style__name___1jF7j"
207-
href="https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=17153"
207+
replace={false}
208+
to="/challenges/15404"
208209
>
209-
2018 TCO Marathon
210-
</a>
210+
<span>
211+
2018 TCO Marathon
212+
</span>
213+
</Link>
211214
<p
212215
className="src-shared-components-ChallengeTile-___style__subtrack-color___2AJaw"
213216
>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ exports[`Default render 1`] = `
118118
},
119119
Object {
120120
"href": "https://www.topcoder-dev.com/blog",
121+
"openNewTab": true,
121122
"title": "Blog",
122123
},
123124
Object {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = `
5858
}
5959
onShowBadges={[Function]}
6060
showBadgesButton={true}
61-
wins={3}
61+
wins={0}
6262
/>
6363
</div>
6464
</Sticky>

config/default.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ module.exports = {
160160
COMMUNITY_API: 'http://localhost:8000',
161161
COMMUNITY_APP_GITHUB_ISSUES: 'https://github.com/topcoder-platform/community-app/issues',
162162
EMAIL_VERIFY_URL: 'http://www.topcoder-dev.com/settings/account/changeEmail',
163+
ABANDONMENT_EMBED: 'https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com',
163164
},
164165

165166
/* Information about Topcoder user groups can be cached in various places.
@@ -370,6 +371,7 @@ module.exports = {
370371
{
371372
title: 'Blog',
372373
href: 'https://www.topcoder-dev.com/blog',
374+
openNewTab: true,
373375
},
374376
{
375377
title: 'Thrive',
@@ -409,4 +411,5 @@ module.exports = {
409411
TC_EDU_SEARCH_BAR_MAX_RESULTS_EACH_GROUP: 3,
410412
POLICY_PAGES_PATH: '/policy',
411413
GIGS_PAGES_PATH: '/gigs',
414+
START_PAGE_PATH: '/start',
412415
};

config/production.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ module.exports = {
171171
{
172172
title: 'Blog',
173173
href: 'https://www.topcoder.com/blog',
174+
openNewTab: true,
174175
},
175176
{
176177
title: 'Thrive',

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@
137137
"tc-auth-lib": "git+https://github.com/topcoder-platform/tc-auth-lib.git#dev",
138138
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
139139
"tc-ui": "^1.0.12",
140-
"topcoder-react-lib": "1.0.3",
141-
"topcoder-react-ui-kit": "2.0.0",
140+
"topcoder-react-lib": "1.0.5",
141+
"topcoder-react-ui-kit": "2.0.1",
142142
"topcoder-react-utils": "0.7.8",
143143
"turndown": "^4.0.2",
144144
"url-parse": "^1.4.1",

src/assets/images/gig-blob.svg

Lines changed: 23 additions & 0 deletions
Loading

src/assets/images/img-gig-work.png

254 KB
Loading

src/shared/app.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Routes from 'routes';
1111
import ErrorMessage from 'containers/ErrorMessage';
1212
import ErrorIcons from 'containers/ErrorIcons';
1313

14-
import { DevTools, isomorphy } from 'topcoder-react-utils';
14+
import { DevTools, isomorphy, config } from 'topcoder-react-utils';
1515

1616
import ExtendedReduxToastr from 'containers/toastr';
1717

@@ -37,6 +37,7 @@ export default function App() {
3737
<Helmet htmlAttributes={{ lang: 'en' }}>
3838
<meta name="theme-color" content="#FFFFFF" />
3939
<link rel="manifest" href="/challenges/manifest.json" />
40+
<script src={config.URL.ABANDONMENT_EMBED} async />
4041
</Helmet>
4142
<Routes />
4243
<ErrorMessage />

src/shared/components/ChallengeTile/index.jsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Challenge tile.
33
*/
44
/* eslint-env browser */
5-
import _ from 'lodash';
65
import React from 'react';
76
import PT from 'prop-types';
87
import { Link } from 'react-router-dom';
@@ -83,36 +82,27 @@ class ChallengeTile extends React.Component {
8382
margin: '10px 5px',
8483
};
8584

86-
const isDataScience = track === COMPETITION_TRACKS.DATA_SCIENCE;
8785
const isDevelopment = track === COMPETITION_TRACKS.DEVELOP;
8886
const isDesign = track === COMPETITION_TRACKS.DESIGN;
8987

90-
const roundId = isDataScience ? _.get(challenge, 'rounds.0.id') : 0;
91-
9288
return (
9389
<div styleName="challenge tile" style={extraStyle}>
9490
<div styleName={outStyleName}>
9591
<div styleName="completed-challenge">
9692
<header>
97-
{ !isDataScience && (!challenge.isPrivate
93+
{ !challenge.isPrivate
9894
? (
9995
<Link to={`/challenges/${challenge.id}`} styleName="name">
10096
<span>
10197
{ challenge.name }
10298
</span>
10399
</Link>
104-
) : (
100+
)
101+
: (
105102
<span>
106103
{ challenge.name }
107104
</span>
108-
)) }
109-
110-
{ isDataScience
111-
&& (
112-
<a styleName="name" href={`https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=${roundId}`}>
113-
{ challenge.name }
114-
</a>
115-
) }
105+
)}
116106

117107
<p styleName="subtrack-color">
118108
{underscoreReplace(type)}

src/shared/components/Contentful/Article/Article.jsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import LoadingIndicator from 'components/LoadingIndicator';
1515
import YouTubeVideo from 'components/YouTubeVideo';
1616
import moment from 'moment';
1717
import localStorage from 'localStorage';
18-
import { config, Link, isomorphy } from 'topcoder-react-utils';
18+
import { Helmet } from 'react-helmet';
19+
import {
20+
config, Link, isomorphy,
21+
} from 'topcoder-react-utils';
1922
import qs from 'qs';
2023
// SVGs and assets
2124
import GestureIcon from 'assets/images/icon-gesture.svg';
@@ -110,9 +113,27 @@ export default class Article extends React.Component {
110113
if (isomorphy.isClientSide()) {
111114
shareUrl = encodeURIComponent(window.location.href);
112115
}
116+
const description = htmlToText.fromString(
117+
ReactDOMServer.renderToString(markdown(fields.content)),
118+
{
119+
ignoreHref: true,
120+
ignoreImage: true,
121+
singleNewLineParagraphs: true,
122+
uppercaseHeadings: false,
123+
},
124+
).substring(0, CONTENT_PREVIEW_LENGTH);
113125

114126
return (
115127
<React.Fragment>
128+
<Helmet>
129+
<title>{fields.title}</title>
130+
<meta name="title" property="og:title" content={fields.title} />
131+
<meta name="description" property="og:description" content={description} />
132+
<meta name="description" property="description" content={description} />
133+
<meta name="twitter:description" content={description} />
134+
<meta name="image" property="og:image" content={fields.featuredImage ? `https:${subData.assets.items[fields.featuredImage.sys.id].fields.file.url}` : null} />
135+
<meta name="twitter:image" content={fields.featuredImage ? `https:${subData.assets.items[fields.featuredImage.sys.id].fields.file.url}` : null} />
136+
</Helmet>
116137
{/* Banner */}
117138
{
118139
fields.featuredImage ? (

src/shared/components/Contentful/Modal/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { errors } from 'topcoder-react-lib';
1414
import { themr } from 'react-css-super-themr';
1515
import classnames from 'classnames';
1616

17+
import defaultModalTheme from 'components/Leaderboard/ChallengeHistoryModal/styles.scss';
1718
import defaultStyle from './style.scss';
1819

1920
const { fireErrorMessage } = errors;
@@ -102,7 +103,10 @@ class ContentfulModal extends React.Component {
102103
className: classnames(theme.modalTrigger, child.props.className),
103104
}))}
104105
{isOpen && (
105-
<Modal onCancel={this.onCloseModal}>
106+
<Modal
107+
onCancel={this.onCloseModal}
108+
theme={defaultModalTheme}
109+
>
106110
<div
107111
className={theme.dismissButton}
108112
onClick={this.onCloseModal}

0 commit comments

Comments
 (0)