Skip to content

Release 2020/11/24 #5212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8ce1152
Fix route to profile with space in handle name
luizrrodrigues Nov 12, 2020
ed10f41
ci: deploy tcx-202011 to Stag env
luizrrodrigues Nov 12, 2020
a8af95b
Fix #5174
kkartunov Nov 16, 2020
98a062b
ci: on test
kkartunov Nov 16, 2020
6bb720a
ci: on staging
kkartunov Nov 16, 2020
531d0d3
Fix prizeSets logical to get 'placements' instead first one
luizrrodrigues Nov 19, 2020
d04d108
fix: for issue #5193
luizrrodrigues Nov 19, 2020
bdae5e6
Merge pull request #5204 from topcoder-platform/issue-5193
luizrrodrigues Nov 19, 2020
2a20c54
Add Submission Review tab to challenge spec
luizrrodrigues Nov 20, 2020
87fab15
ci: deploy submission-review to Dev env
luizrrodrigues Nov 20, 2020
5a3a930
ci: deploy ubmission-review to Stag env
luizrrodrigues Nov 20, 2020
74b6955
Submission Review - Fix prod URL
luizrrodrigues Nov 20, 2020
f3391db
Move MetaTags from utils lib to community-app
luizrrodrigues Nov 24, 2020
2e4fa37
Fix SEO to Gigs and Thrive pages
luizrrodrigues Nov 24, 2020
7671609
Merge pull request #5205 from topcoder-platform/c30151518-s415826
luizrrodrigues Nov 24, 2020
1d6f5bb
ci: deploy seo-fix to Stag env
luizrrodrigues Nov 24, 2020
d008b34
Fix title in social SEO
luizrrodrigues Nov 24, 2020
9278750
Merge pull request #5207 from topcoder-platform/issue-5206
luizrrodrigues Nov 24, 2020
57bba81
Merge pull request #5208 from topcoder-platform/mml-fix
luizrrodrigues Nov 24, 2020
dd7a88b
Merge branch 'develop' into tcx-202011
luizrrodrigues Nov 24, 2020
fdb5d50
fix: for issue #5193 sync with develop
luizrrodrigues Nov 24, 2020
76d7e93
Merge pull request #5209 from topcoder-platform/tcx-202011
luizrrodrigues Nov 24, 2020
4f52467
Merge pull request #5210 from topcoder-platform/submission-review
luizrrodrigues Nov 24, 2020
835c7dc
Merge branch 'develop' into seo-fix
luizrrodrigues Nov 24, 2020
4be9c90
Merge pull request #5211 from topcoder-platform/seo-fix
luizrrodrigues Nov 24, 2020
5a3f40c
ci: remove develop branch from Dev env
luizrrodrigues Nov 24, 2020
538bf84
release: v1.6.1
sushilshinde Nov 24, 2020
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ workflows:
filters:
branches:
only:
- develop
- free
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ module.exports = {
COMMUNITY: 'https://community.topcoder-dev.com',
FORUMS: 'https://apps.topcoder-dev.com/forums',
HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles',
SUBMISSION_REVIEW: 'https://submission-review.topcoder-dev.com',

THRIVE: 'https://www.topcoder.com/thrive',

Expand Down
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
COMMUNITY: 'https://community.topcoder.com',
FORUMS: 'https://apps.topcoder.com/forums',
HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles',
SUBMISSION_REVIEW: 'https://submission-review.topcoder.com',
MEMBER: 'https://member.topcoder.com',
ONLINE_REVIEW: 'https://software.topcoder.com',
PAYMENT_TOOL: 'https://payment.topcoder.com',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"supertest": "^3.1.0",
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
"tc-ui": "^1.0.12",
"topcoder-react-lib": "1.1.2",
"topcoder-react-lib": "1.1.3",
"topcoder-react-ui-kit": "2.0.1",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/Contentful/Route.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import _ from 'lodash';
import ContentfulLoader from 'containers/ContentfulLoader';
import Error404 from 'components/Error404';
import LoadingIndicator from 'components/LoadingIndicator';
import { MetaTags } from 'topcoder-react-utils';
import MetaTags from 'components/MetaTags';
import PT from 'prop-types';
import React from 'react';
import { Route, Switch } from 'react-router-dom';
Expand Down
3 changes: 2 additions & 1 deletion src/shared/components/MMatchLeaderboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export default class MMLeaderboard extends Component {
// Use Lodash to sort array
data = _.orderBy(
data,
[d => String(d[sortParam.field]).toLowerCase()], [sortParam.order],
[d => Number(d[sortParam.field]) || String(d[sortParam.field]).toLowerCase()],
[sortParam.order],
);
}

Expand Down
82 changes: 82 additions & 0 deletions src/shared/components/MetaTags.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/**
* Auxiliary wrapper around React Helmet that helps to generate meta tags for
* generic use cases.
*
* NOTE: This component relies on `domain` path of Redux store to hold
* the current app domain, which will serve as the base path for the bundled
* images.
*/

import PT from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import { Helmet } from 'react-helmet';

function MetaTags({
description,
domain,
image,
siteName,
socialDescription,
socialTitle,
title,
url,
}) {
const img = `${domain}${image}`;
const socTitle = socialTitle || title;
const socDesc = socialDescription || description;
return (
<Helmet>
{/* General tags. */}
<title>
{title}
</title>
<meta name="description" content={description} />

{/* Twitter cards. */}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={socTitle} />
<meta name="twitter:description" content={socDesc} />
{ image ? <meta name="twitter:image" content={img} /> : null }
{
siteName ? (
<meta name="twitter:site" content={`@${siteName}`} />
) : null
}

{/* Open Graph data. */}
<meta property="og:title" content={socTitle} />
{ image ? <meta property="og:image" content={img} /> : null }
{ image ? <meta property="og:image:alt" content={socTitle} /> : null }
<meta property="og:description" content={socDesc} />
{
siteName ? (<meta property="og:sitename" content={siteName} />) : null
}
{ url ? (<meta property="og:url" content={url} />) : null }
</Helmet>
);
}

MetaTags.defaultProps = {
image: null,
siteName: null,
socialDescription: null,
socialTitle: null,
url: null,
};

MetaTags.propTypes = {
description: PT.string.isRequired,
domain: PT.string.isRequired,
image: PT.string,
siteName: PT.string,
socialDescription: PT.string,
socialTitle: PT.string,
title: PT.string.isRequired,
url: PT.string,
};

/* TODO: It is not good to depend on the domain written into redux state here,
* better pass it via the renderer context at the server side, and get it from
* the location at the frontend side, or something similar? */
export default connect(state => ({ domain: state.domain }))(MetaTags);
2 changes: 1 addition & 1 deletion src/shared/components/Settings/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import React from 'react';
import PT from 'prop-types';
import { MetaTags } from 'topcoder-react-utils';
import MetaTags from 'components/MetaTags';

import { TABS } from 'actions/page/settings';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,18 @@ export default function ChallengeViewSelector(props) {
</a>
) : null
}
{
(hasRegistered && mySubmissions.length > 0) && (
<a
href={`${config.URL.SUBMISSION_REVIEW}/challenges/${challenge.legacyId}`}
styleName="challenge-selector-common challenge-unselected-view"
target="_blank"
rel="oopener noreferrer"
>
SUBMISSION REVIEW
</a>
)
}
{
numWinners ? (
<a
Expand Down Expand Up @@ -225,6 +237,7 @@ ChallengeViewSelector.defaultProps = {
ChallengeViewSelector.propTypes = {
isLoggedIn: PT.bool,
challenge: PT.shape({
legacyId: PT.string,
legacy: PT.shape({
forumId: PT.number,
}),
Expand Down
3 changes: 2 additions & 1 deletion src/shared/components/challenge-detail/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export default function ChallengeHeader(props) {
const sortedAllPhases = _.cloneDeep(allPhases)
.sort((a, b) => moment(phaseEndDate(a)).diff(phaseEndDate(b)));

const { prizes } = prizeSets && prizeSets.length ? prizeSets[0] : [];
const placementPrizes = _.find(prizeSets, { type: 'placement' });
const { prizes } = placementPrizes || [];

const checkpointPrizes = _.find(prizeSets, { type: 'checkpoint' });
let numberOfCheckpointsPrizes = 0;
Expand Down
16 changes: 8 additions & 8 deletions src/shared/containers/EDU/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import React from 'react';
import { config } from 'topcoder-react-utils';
import { Helmet } from 'react-helmet';
import MetaTags from 'components/MetaTags';
import Viewport from 'components/Contentful/Viewport';
import SearchBar from 'components/Contentful/SearchBar/SearchBar';
import { getService } from 'services/contentful';
Expand Down Expand Up @@ -44,15 +44,15 @@ export default class EDUHome extends React.Component {

render() {
const { taxonomy } = this.state;
const title = 'Topcoder Thrive | Topcoder Community | Topcoder';
const description = 'Thrive is our vault of content that we have been gathering over the years. It is full of tutorials and workshops that matter. Grow with us!';

return (
<div className={homeTheme.container}>
<Helmet>
<title>THRIVE - Grow with us. Tutorials and workshops that matter.</title>
<meta name="title" property="og:title" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="description" property="og:description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="description" property="description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="twitter:description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
</Helmet>
<MetaTags
description={description}
title={title}
/>
{/* Banner */}
<div className={homeTheme.bannerContainer}>
<div className={homeTheme.bannerImage} />
Expand Down
28 changes: 19 additions & 9 deletions src/shared/containers/EDU/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import _ from 'lodash';
import moment from 'moment';
import React from 'react';
import { config, isomorphy } from 'topcoder-react-utils';
import MetaTags from 'components/MetaTags';
import Viewport from 'components/Contentful/Viewport';
import SearchBar from 'components/Contentful/SearchBar/SearchBar';
import { getService } from 'services/contentful';
Expand All @@ -13,7 +14,6 @@ import { updateQuery } from 'utils/url';
import qs from 'qs';
import LoadingIndicator from 'components/LoadingIndicator';
import SearchPageFilter from 'components/Contentful/SearchPageFilter/SearchPageFilter';
import { Helmet } from 'react-helmet';
// Partials
import ResultTabs from './partials/ResultTabs';
// CSS
Expand Down Expand Up @@ -87,18 +87,28 @@ export default class EDUSearch extends React.Component {
const {
taxonomy, query, tree, isShowFilter,
} = this.state;
const title = 'Topcoder Thrive | Topcoder Community | Topcoder';
const description = 'Thrive is our vault of content that we have been gathering over the years. It is full of tutorials and workshops that matter. Grow with us!';

const metaTags = (
<MetaTags
description={description}
title={title}
/>
);
// This container needs at least those variables
// to be able to render meaningful data
if (!taxonomy) return <LoadingIndicator />;
if (!taxonomy) {
return (
<React.Fragment>
{ metaTags }
<LoadingIndicator />;
</React.Fragment>
);
}
return (
<div className={searchTheme.container}>
<Helmet>
<title>THRIVE - Search {`${query.title}`}</title>
<meta name="title" property="og:title" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="description" property="og:description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="description" property="description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="twitter:description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
</Helmet>
{ metaTags }
{/* Banner */}
<div className={searchTheme.bannerContainer}>
<div className={searchTheme.searchBarWrapp}>
Expand Down
28 changes: 19 additions & 9 deletions src/shared/containers/EDU/Tracks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import _ from 'lodash';
import moment from 'moment';
import React from 'react';
import { config, isomorphy } from 'topcoder-react-utils';
import MetaTags from 'components/MetaTags';
import Viewport from 'components/Contentful/Viewport';
import SearchBar from 'components/Contentful/SearchBar/SearchBar';
import { getService } from 'services/contentful';
Expand All @@ -14,7 +15,6 @@ import qs from 'qs';
import TracksTree from 'components/Contentful/TracksTree/TracksTree';
import LoadingIndicator from 'components/LoadingIndicator';
import TracksFilter from 'components/Contentful/TracksFilter/TracksFilter';
import { Helmet } from 'react-helmet';
// SVGs & Assets
import Dev from 'assets/images/img-development.png';
import Design from 'assets/images/img_design.png';
Expand Down Expand Up @@ -163,18 +163,28 @@ export default class EDUTracks extends React.Component {
taxonomy, query, tree, isShowFilter,
articleCnt, videoCnt, forumCnt,
} = this.state;
const title = 'Topcoder Thrive | Topcoder Community | Topcoder';
const description = 'Thrive is our vault of content that we have been gathering over the years. It is full of tutorials and workshops that matter. Grow with us!';

const metaTags = (
<MetaTags
description={description}
title={title}
/>
);
// This container needs at least those variables
// to be able to render meaningful data
if (!taxonomy) return <LoadingIndicator />;
if (!taxonomy) {
return (
<React.Fragment>
{ metaTags }
<LoadingIndicator />;
</React.Fragment>
);
}
return (
<div className={tracksTheme.container}>
<Helmet>
<title>THRIVE - {`${query.track}`}</title>
<meta name="title" property="og:title" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="description" property="og:description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="description" property="description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
<meta name="twitter:description" content="THRIVE - Grow with us. Tutorials and workshops that matter." />
</Helmet>
{ metaTags }
{/* Banner */}
<div
className={tracksTheme.bannerContainer}
Expand Down
3 changes: 2 additions & 1 deletion src/shared/containers/EDU/styles/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

.container {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
width: 100%;

.bannerContainer {
background-image: linear-gradient(98.81deg, #8b41b0 0%, #ef476f 100%);
Expand Down
3 changes: 2 additions & 1 deletion src/shared/containers/EDU/styles/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

.container {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
width: 100%;

.bannerContainer {
background-color: #2a2a2a;
Expand Down
3 changes: 2 additions & 1 deletion src/shared/containers/EDU/styles/tracks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

.container {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
width: 100%;

.bannerContainer {
min-height: 475px;
Expand Down
8 changes: 7 additions & 1 deletion src/shared/containers/GigsPages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ import Viewport from 'components/Contentful/Viewport';
import { config } from 'topcoder-react-utils';
import RecruitCRMJobDetails from 'containers/Gigs/RecruitCRMJobDetails';
import { Helmet } from 'react-helmet';
import MetaTags from 'components/MetaTags';


export default function GigsPagesContainer(props) {
const { match } = props;
const { id } = match.params;
const isApply = `${config.GIGS_PAGES_PATH}/${id}/apply` === match.url;
const title = 'Gig Work | Topcoder Community | Topcoder';
const description = 'Compete and build up your profiles and skills! Topcoder members become eligible to work on Gig Work projects by first proving themselves in various skill sets through Topcoder competitions.';
return (
<div>
<Helmet>
<title>Topcoder - Gig Work Opportunities</title>
<script type="text/javascript">{`
window._chatlio = window._chatlio||[];
!function(){ var t=document.getElementById("chatlio-widget-embed");if(t&&window.ChatlioReact&&_chatlio.init)return void _chatlio.init(t,ChatlioReact);for(var e=function(t){return function(){_chatlio.push([t].concat(arguments)) }},i=["configure","identify","track","show","hide","isShown","isOnline", "page", "open", "showOrHide"],a=0;a<i.length;a++)_chatlio[i[a]]||(_chatlio[i[a]]=e(i[a]));var n=document.createElement("script"),c=document.getElementsByTagName("script")[0];n.id="chatlio-widget-embed",n.src="https://w.chatlio.com/w.chatlio-widget.js",n.async=!0,n.setAttribute("data-embed-version","2.3");
Expand All @@ -28,6 +30,10 @@ window._chatlio = window._chatlio||[];
`}
</script>
</Helmet>
<MetaTags
description={description}
title={title}
/>
<Header />
{
id ? (
Expand Down
2 changes: 1 addition & 1 deletion src/shared/containers/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import PT from 'prop-types';
import { connect } from 'react-redux';

import { actions } from 'topcoder-react-lib';
import { MetaTags } from 'topcoder-react-utils';
import MetaTags from 'components/MetaTags';
import Error404 from 'components/Error404';
import LoadingIndicator from 'components/LoadingIndicator';
import ProfilePage from 'components/ProfilePage';
Expand Down
Loading