Skip to content

Release 2020-09-15 #4923

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 57 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ec4094c
Merge pull request #4872 from topcoder-platform/gig-work-fix
sushilshinde Sep 8, 2020
5253682
Merge pull request #4877 from topcoder-platform/gig-work-fix
kkartunov Sep 9, 2020
83e322a
Merge pull request #4878 from topcoder-platform/gig-work-fix
kkartunov Sep 9, 2020
545b36b
Merge pull request #4879 from topcoder-platform/gig-work-fix
kkartunov Sep 9, 2020
507901f
Merge pull request #4880 from topcoder-platform/gig-work-fix
kkartunov Sep 9, 2020
37fc93e
Merge pull request #4881 from topcoder-platform/gig-work-fix
kkartunov Sep 9, 2020
774f8c7
Update FilterPanel.jsx
rashmi73 Sep 9, 2020
8227ebd
Update ChallengeFilters.jsx
rashmi73 Sep 10, 2020
fe9e708
Update index.jsx
rashmi73 Sep 10, 2020
01405d9
Update FilterPanel.jsx
rashmi73 Sep 10, 2020
1310b69
Update ChallengeFilters.jsx
rashmi73 Sep 10, 2020
ed9025e
Update ChallengeFilters.jsx
rashmi73 Sep 10, 2020
f22bd8b
fix: for issue #2069
narekcat Sep 10, 2020
b46b000
Fix for #4347 - Open blog page in new, separate tab
gets0ul Sep 11, 2020
4be833a
Update index.jsx
rashmi73 Sep 11, 2020
a6a68d6
Update index.jsx
rashmi73 Sep 11, 2020
ea282e2
Update index.jsx.snap
rashmi73 Sep 11, 2020
7b542d6
Update index.jsx
Gauravseta Sep 12, 2020
1c91948
fix: for issue #2069
luizrrodrigues Sep 13, 2020
f0af65d
Merge pull request #4893 from narekcat/issue-2069
luizrrodrigues Sep 13, 2020
09f4c8b
Hide RSS feature from front-end
luizrrodrigues Sep 13, 2020
e1822d4
Merge pull request #4904 from topcoder-platform/issue-4898
luizrrodrigues Sep 13, 2020
1371d6d
Merge branch 'milestone-20200917' into milestone-20200910
luizrrodrigues Sep 13, 2020
55f67d1
Merge pull request #4905 from topcoder-platform/milestone-20200910
luizrrodrigues Sep 13, 2020
5b5bb81
Deploy milestone-20200917 to Dev and Stag
luizrrodrigues Sep 13, 2020
2d6649a
Merge pull request #4882 from rashmi73/issue_4874
luizrrodrigues Sep 13, 2020
48d1bf5
Merge pull request #4900 from gets0ul/issue-4347
luizrrodrigues Sep 13, 2020
77ea494
fix: for issue #2069
luizrrodrigues Sep 14, 2020
ff38813
fix: for #4745
luizrrodrigues Sep 14, 2020
1f09579
Merge pull request #4901 from Gauravseta/issue_4895
luizrrodrigues Sep 14, 2020
bdf5163
Merge pull request #4899 from rashmi73/issue_4687
luizrrodrigues Sep 14, 2020
3fba920
ChallengeTile: Fix MM link to Challenge details page
luizrrodrigues Sep 14, 2020
8ac5916
Merge pull request #4907 from topcoder-platform/issue-2069
luizrrodrigues Sep 14, 2020
227c600
Fixes for #4887
kkartunov Sep 14, 2020
cbe66c8
Fixes for #4888
kkartunov Sep 14, 2020
8a80704
Profile Stats Challenges : Fix loading icon
luizrrodrigues Sep 14, 2020
b833932
Fix #4896
kkartunov Sep 14, 2020
beaf57a
Merge pull request #4908 from topcoder-platform/issue-2069
luizrrodrigues Sep 14, 2020
22a2677
Deploy milestone-20200924 to Dev and Stag
luizrrodrigues Sep 14, 2020
21576ee
Fix #4889
kkartunov Sep 14, 2020
ac8ec03
Merge pull request #4909 from topcoder-platform/thrive-fixes-sep20
kkartunov Sep 14, 2020
08fb3c3
Added validation before call phaseEndDate and phaseStartDate
luizrrodrigues Sep 14, 2020
2ffaeec
ci: on staging
kkartunov Sep 14, 2020
d6a9f3c
Merge pull request #4911 from topcoder-platform/kkartunov-patch-1
kkartunov Sep 14, 2020
ed0044a
Implements #4912
kkartunov Sep 14, 2020
8e8d071
Added !isEmpty check before call phaseStartDate and phaseEndDate
luizrrodrigues Sep 14, 2020
418fa85
Merge pull request #4915 from topcoder-platform/issue-4910
luizrrodrigues Sep 14, 2020
43786c4
ci: Deploy hot-fix-ad-code to Test env
luizrrodrigues Sep 15, 2020
52dd617
Merge pull request #4886 from topcoder-platform/feature-contentful
luizrrodrigues Sep 15, 2020
0f91bf0
Merge branch 'develop' into milestone-20200917
luizrrodrigues Sep 15, 2020
4d453d8
Merge pull request #4918 from topcoder-platform/milestone-20200917
luizrrodrigues Sep 15, 2020
f3e8601
fix: smoke release
luizrrodrigues Sep 15, 2020
c7e17cf
Merge branch 'develop' into milestone-20200924
luizrrodrigues Sep 15, 2020
fc42d37
Merge pull request #4919 from topcoder-platform/milestone-20200924
luizrrodrigues Sep 15, 2020
c6fed95
fix: smoke release
luizrrodrigues Sep 15, 2020
20c22d4
Merge pull request #4914 from topcoder-platform/hot-fix-ad-code
luizrrodrigues Sep 15, 2020
27118ee
release: v1.2.1
sushilshinde Sep 15, 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
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ workflows:
filters:
branches:
only:
- milestone-20200917
- milestone-20200924
- develop
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
filters:
branches:
only:
- hot-fix-ad-code
- feature-contentful
# This is alternate dev env for parallel testing
- "build-qa":
Expand Down
8 changes: 8 additions & 0 deletions __tests__/shared/__snapshots__/index.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ exports[`Snapshot match 1`] = `
href="/challenges/manifest.json"
rel="manifest"
/>
<script
async={true}
src="https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com"
/>
</HelmetWrapper>
<withRouter(Connect(Routes)) />
<Connect(ErrorMessageContainer) />
Expand Down Expand Up @@ -53,6 +57,10 @@ exports[`Snapshot match 2`] = `
href="/challenges/manifest.json"
rel="manifest"
/>
<script
async={true}
src="https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com"
/>
</HelmetWrapper>
<withRouter(Connect(Routes)) />
<Connect(ErrorMessageContainer) />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,15 @@ exports[`renders marathon 1`] = `
className="src-shared-components-ChallengeTile-___style__completed-challenge___3w5tT"
>
<header>
<a
<Link
className="src-shared-components-ChallengeTile-___style__name___1jF7j"
href="https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=17153"
replace={false}
to="/challenges/15404"
>
2018 TCO Marathon
</a>
<span>
2018 TCO Marathon
</span>
</Link>
<p
className="src-shared-components-ChallengeTile-___style__subtrack-color___2AJaw"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ exports[`Default render 1`] = `
},
Object {
"href": "https://www.topcoder-dev.com/blog",
"openNewTab": true,
"title": "Blog",
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = `
}
onShowBadges={[Function]}
showBadgesButton={true}
wins={3}
wins={0}
/>
</div>
</Sticky>
Expand Down
2 changes: 2 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ module.exports = {
COMMUNITY_API: 'http://localhost:8000',
COMMUNITY_APP_GITHUB_ISSUES: 'https://github.com/topcoder-platform/community-app/issues',
EMAIL_VERIFY_URL: 'http://www.topcoder-dev.com/settings/account/changeEmail',
ABANDONMENT_EMBED: 'https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com',
},

/* Information about Topcoder user groups can be cached in various places.
Expand Down Expand Up @@ -370,6 +371,7 @@ module.exports = {
{
title: 'Blog',
href: 'https://www.topcoder-dev.com/blog',
openNewTab: true,
},
{
title: 'Thrive',
Expand Down
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ module.exports = {
{
title: 'Blog',
href: 'https://www.topcoder.com/blog',
openNewTab: true,
},
{
title: 'Thrive',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
"tc-ui": "^1.0.12",
"topcoder-react-lib": "1.0.4",
"topcoder-react-ui-kit": "2.0.0",
"topcoder-react-lib": "1.0.5",
"topcoder-react-ui-kit": "2.0.1",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
"url-parse": "^1.4.1",
Expand Down
3 changes: 2 additions & 1 deletion src/shared/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Routes from 'routes';
import ErrorMessage from 'containers/ErrorMessage';
import ErrorIcons from 'containers/ErrorIcons';

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

import ExtendedReduxToastr from 'containers/toastr';

Expand All @@ -37,6 +37,7 @@ export default function App() {
<Helmet htmlAttributes={{ lang: 'en' }}>
<meta name="theme-color" content="#FFFFFF" />
<link rel="manifest" href="/challenges/manifest.json" />
<script src={config.URL.ABANDONMENT_EMBED} async />
</Helmet>
<Routes />
<ErrorMessage />
Expand Down
18 changes: 4 additions & 14 deletions src/shared/components/ChallengeTile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Challenge tile.
*/
/* eslint-env browser */
import _ from 'lodash';
import React from 'react';
import PT from 'prop-types';
import { Link } from 'react-router-dom';
Expand Down Expand Up @@ -83,36 +82,27 @@ class ChallengeTile extends React.Component {
margin: '10px 5px',
};

const isDataScience = track === COMPETITION_TRACKS.DATA_SCIENCE;
const isDevelopment = track === COMPETITION_TRACKS.DEVELOP;
const isDesign = track === COMPETITION_TRACKS.DESIGN;

const roundId = isDataScience ? _.get(challenge, 'rounds.0.id') : 0;

return (
<div styleName="challenge tile" style={extraStyle}>
<div styleName={outStyleName}>
<div styleName="completed-challenge">
<header>
{ !isDataScience && (!challenge.isPrivate
{ !challenge.isPrivate
? (
<Link to={`/challenges/${challenge.id}`} styleName="name">
<span>
{ challenge.name }
</span>
</Link>
) : (
)
: (
<span>
{ challenge.name }
</span>
)) }

{ isDataScience
&& (
<a styleName="name" href={`https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=${roundId}`}>
{ challenge.name }
</a>
) }
)}

<p styleName="subtrack-color">
{underscoreReplace(type)}
Expand Down
23 changes: 22 additions & 1 deletion src/shared/components/Contentful/Article/Article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import LoadingIndicator from 'components/LoadingIndicator';
import YouTubeVideo from 'components/YouTubeVideo';
import moment from 'moment';
import localStorage from 'localStorage';
import { config, Link, isomorphy } from 'topcoder-react-utils';
import { Helmet } from 'react-helmet';
import {
config, Link, isomorphy,
} from 'topcoder-react-utils';
import qs from 'qs';
// SVGs and assets
import GestureIcon from 'assets/images/icon-gesture.svg';
Expand Down Expand Up @@ -110,9 +113,27 @@ export default class Article extends React.Component {
if (isomorphy.isClientSide()) {
shareUrl = encodeURIComponent(window.location.href);
}
const description = htmlToText.fromString(
ReactDOMServer.renderToString(markdown(fields.content)),
{
ignoreHref: true,
ignoreImage: true,
singleNewLineParagraphs: true,
uppercaseHeadings: false,
},
).substring(0, CONTENT_PREVIEW_LENGTH);

return (
<React.Fragment>
<Helmet>
<title>{fields.title}</title>
<meta name="title" property="og:title" content={fields.title} />
<meta name="description" property="og:description" content={description} />
<meta name="description" property="description" content={description} />
<meta name="twitter:description" content={description} />
<meta name="image" property="og:image" content={fields.featuredImage ? `https:${subData.assets.items[fields.featuredImage.sys.id].fields.file.url}` : null} />
<meta name="twitter:image" content={fields.featuredImage ? `https:${subData.assets.items[fields.featuredImage.sys.id].fields.file.url}` : null} />
</Helmet>
{/* Banner */}
{
fields.featuredImage ? (
Expand Down
48 changes: 43 additions & 5 deletions src/shared/components/Contentful/SearchBar/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class SearchBarInner extends Component {
this.getSuggestionList = this.getSuggestionList.bind(this);
this.handleSearchChange = this.handleSearchChange.bind(this);
this.handleClickOutside = this.handleClickOutside.bind(this);
this.onKeyDown = this.onKeyDown.bind(this);
// using debounce to avoid processing or requesting too much
this.updateSuggestionListWithNewSearch = _.debounce(
this.updateSuggestionListWithNewSearch.bind(this), 400,
Expand All @@ -71,6 +72,29 @@ export class SearchBarInner extends Component {
document.removeEventListener('mousedown', this.handleClickOutside);
}

onKeyDown(e) {
const { inputlVal, selectedFilter } = this.state;
if (inputlVal && e.which === 13) {
const searchQuery = {};
if (this.searchFieldRef && this.searchFieldRef.value) {
if (selectedFilter.name === 'Tags') {
searchQuery.tags = [this.searchFieldRef.value];
}
if (selectedFilter.name === 'All') {
searchQuery.phrase = this.searchFieldRef.value;
}
if (selectedFilter.name === 'Title') {
searchQuery.title = this.searchFieldRef.value;
}
}
if (selectedFilter.name !== 'Author') {
window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?${qs.stringify(searchQuery)}`;
} else {
window.location.href = `${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?author=${inputlVal}`;
}
}
}

/**
* Set the search field ref
*/
Expand Down Expand Up @@ -136,6 +160,7 @@ export class SearchBarInner extends Component {
isShowSuggestion,
suggestionList,
selectedFilter,
noResults,
} = this.state;

const searchQuery = {};
Expand All @@ -151,7 +176,8 @@ export class SearchBarInner extends Component {
}
}

return (suggestionList && !_.isEmpty(suggestionList) && isShowSuggestion && (
// eslint-disable-next-line no-nested-ternary
return suggestionList && !_.isEmpty(suggestionList) && isShowSuggestion ? (
<div
className={theme['popup-search-result']}
ref={this.setPopupSearchResultRef}
Expand Down Expand Up @@ -319,7 +345,14 @@ export class SearchBarInner extends Component {
) : null
}
</div>
));
) : noResults ? (
<div
className={theme['popup-search-result']}
ref={this.setPopupSearchResultRef}
>
<span>No Results</span>
</div>
) : null;
}

handleClickOutside(e) {
Expand Down Expand Up @@ -379,23 +412,26 @@ export class SearchBarInner extends Component {
.then((results) => {
// Nothing found?
if (!results.total) {
this.setState({ suggestionList: {} });
this.setState({
suggestionList: {},
noResults: true,
});
return;
}
// Author query?
if (selectedFilter.name === 'Author') {
const suggestionList = {
Author: _.map(results.items, item => ({ ...item.fields })),
};
this.setState({ suggestionList });
this.setState({ suggestionList, noResults: false });
return;
}
// ALL && Tags
const suggestionList = this.groupResults(results);
this.setState({ suggestionList });
});
} else {
this.setState({ suggestionList: {} });
this.setState({ suggestionList: {}, noResults: false });
}
}

Expand All @@ -419,6 +455,7 @@ export class SearchBarInner extends Component {
contentAuthor: contentAuthor.fields,
externalArticle: fields.externalArticle,
contentUrl: fields.contentUrl,
slug: fields.slug,
};
}),
'type',
Expand Down Expand Up @@ -471,6 +508,7 @@ export class SearchBarInner extends Component {
document.addEventListener('mousedown', this.handleClickOutside);
}}
onChange={this.handleSearchChange}
onKeyDown={this.onKeyDown}
/>
<div className={theme.dropdown}>
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ $link-color: #0d61bf;
overflow-y: auto;
box-shadow: 0 25px 50px 0 rgba(0, 0, 0, 0.15);
z-index: 999;

> span {
margin-left: 15px;
}
}

.icon-search {
Expand Down
Loading