Skip to content

Release v1.14.6 #5914

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 66 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c381f24
Enable Clear Date Input (#5809)
fikzzzy Nov 16, 2021
95e904b
Validate Non Valid Input Characters (#5810)
fikzzzy Nov 16, 2021
70dc4cf
ci:deploying
LieutenantRoger Nov 16, 2021
82552a8
fix: issue #5807 (#5811)
yoution Nov 17, 2021
665a385
fix: issue #5802 (#5812)
yoution Nov 17, 2021
b72fc3b
fix: issue #5796 (#5813)
yoution Nov 17, 2021
9f349ca
fix: #5798 (#5814)
shivam-51 Nov 18, 2021
2aa8c51
fix:5798-2
LieutenantRoger Nov 18, 2021
1d5a575
fix: test
LieutenantRoger Nov 18, 2021
d6c1225
fix: issue #5800 (#5816)
yoution Nov 18, 2021
8b4dc0b
fix: issue #5786 (#5815)
yoution Nov 18, 2021
aa9e173
fix: issue #5802 (#5823)
yoution Nov 19, 2021
55b5780
merge develop
LieutenantRoger Nov 19, 2021
33edc06
deploying ca-branch
LieutenantRoger Nov 19, 2021
a74ef92
revert ci
LieutenantRoger Nov 19, 2021
22885f3
revert device checking
LieutenantRoger Nov 22, 2021
7d1a129
merge develop
LieutenantRoger Nov 22, 2021
8f982db
patch: 5783
LieutenantRoger Nov 22, 2021
c4f60f4
Merge branch 'develop' into ca-profile-bug-bash
LieutenantRoger Nov 22, 2021
85d3cfd
Merge branch 'develop' into ca-profile-bug-bash
LieutenantRoger Nov 22, 2021
ceb5df6
fix: test
LieutenantRoger Nov 22, 2021
d51680d
fix: #5781 (#5824)
shivam-51 Nov 22, 2021
edba0cd
Merge branch 'develop' into ca-profile-bug-bash
LieutenantRoger Nov 23, 2021
529ade4
ci:deploying bug bash to test
LieutenantRoger Nov 23, 2021
3459429
fix: #5795 (#5837)
shivam-51 Nov 26, 2021
91da96b
refix
LieutenantRoger Nov 29, 2021
62c7f96
merge develop
LieutenantRoger Nov 29, 2021
7c72a2b
fix: safely parse input value for regex
CDharmateja Dec 1, 2021
044b68a
fix: issue #5885 (#5894)
gets0ul Dec 1, 2021
52fd7a6
update lint
LieutenantRoger Dec 1, 2021
55c3bb5
Merge branch 'review_5883' into ca-profile-bug-bash
LieutenantRoger Dec 1, 2021
5346e4d
fix: click on input down arrow (#5895)
CDharmateja Dec 1, 2021
9624b46
fix: issue #5874 - keep the order of existing languages after done ed…
gets0ul Dec 1, 2021
5aaf369
update: 5877
LieutenantRoger Dec 1, 2021
f4fca8c
update: 5875
LieutenantRoger Dec 1, 2021
978245e
Issue #5878 (#5893)
gets0ul Dec 1, 2021
36d36a7
update: 5899
LieutenantRoger Dec 1, 2021
4ee7fb5
update: 5868
LieutenantRoger Dec 1, 2021
a054043
update: 5867
LieutenantRoger Dec 1, 2021
9f6dbda
fix: make select clearable for spoken and written languages (#5898)
CDharmateja Dec 1, 2021
bfba9d7
Enable to Clear Date
fikzzzy Dec 2, 2021
8db9beb
Merge branch 'ca-profile-bug-bash' into review_5864
LieutenantRoger Dec 2, 2021
ce0eb0f
update lint
LieutenantRoger Dec 2, 2021
a1aac2e
Merge branch 'develop' into ca-profile-bug-bash
LieutenantRoger Dec 2, 2021
a80ecf3
fix: #5886 (#5901)
shivam-51 Dec 3, 2021
7f46f4b
refine
LieutenantRoger Dec 3, 2021
b521370
theme update
kkartunov Dec 3, 2021
26b7da3
ci: on beta
kkartunov Dec 3, 2021
ab39616
fixed rating colors
kkartunov Dec 3, 2021
5fe4983
fixed rating prop
kkartunov Dec 3, 2021
3629630
mobile fixes resp
kkartunov Dec 3, 2021
e067131
fixes rating & mobile resp
kkartunov Dec 4, 2021
4f65285
only fetch rating dor top 10
kkartunov Dec 4, 2021
2fde8b7
update toggle item
LieutenantRoger Dec 4, 2021
fa2590f
debounce multiple switch
LieutenantRoger Dec 5, 2021
f2fe8da
sorting fix
kkartunov Dec 6, 2021
d0269d4
sort by score than by date
kkartunov Dec 6, 2021
00fa0fa
init code
kkartunov Dec 6, 2021
ed6aec5
ci: on staging
kkartunov Dec 6, 2021
f8eacad
url feed meta updates
kkartunov Dec 6, 2021
eaabe32
ci: deploy thrive-rss to QA env
luizrrodrigues Dec 6, 2021
dd3826e
Merge pull request #5912 from topcoder-platform/thrive-rss
luizrrodrigues Dec 7, 2021
50d2fbf
Merge pull request #5904 from topcoder-platform/ca-profile-bug-bash
luizrrodrigues Dec 7, 2021
1366b6a
AST - Fix challenge timeline from sample challenge
luizrrodrigues Dec 8, 2021
756d512
ci: deploy ast-timeline-fix to Stag env
luizrrodrigues Dec 8, 2021
23e89c5
Merge pull request #5916 from topcoder-platform/ast-timeline-fix
luizrrodrigues Dec 8, 2021
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
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,22 +357,22 @@ workflows:
filters:
branches:
only:
- free
- thrive-rss
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
filters:
branches:
only:
- free
- mm-leaderboard-theme
# This is stage env for production QA releases
- "build-prod-staging":
context : org-global
filters: &filters-staging
branches:
only:
- develop
- feature/recommended-challenges-update
- ast-timeline-fix
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ export class ChallengeDetailPageHelper {
'Started',
'Registration',
'Submission',
'Review',
'Winners',
];
for (let i = 0; i < childDivs.length; i++) {
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module.exports = {
HOME: '/home',
BLOG: 'https://www.topcoder-dev.com/blog',
BLOG_FEED: 'https://www.topcoder.com/blog/feed/',
THRIVE_FEED: 'https://topcoder-dev.com/api/feeds/thrive',
COMMUNITY: 'https://community.topcoder-dev.com',
FORUMS: 'https://apps.topcoder-dev.com/forums',
FORUMS_VANILLA: 'https://vanilla.topcoder-dev.com',
Expand Down
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module.exports = {
CS: 'https://cs.topcoder.com',
},
EMAIL_VERIFY_URL: 'http://www.topcoder.com/settings/account/changeEmail',
THRIVE_FEED: 'https://topcoder.com/api/feeds/thrive',
},
/* Filestack configuration for uploading Submissions
* These are for the production back end */
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"redux-promise": "^0.6.0",
"request-ip": "^2.0.2",
"require-context": "^1.1.0",
"rss": "^1.2.2",
"rss-parser": "^3.12.0",
"serialize-javascript": "^2.1.1",
"serve-favicon": "^2.5.0",
Expand Down
2 changes: 2 additions & 0 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import mmLeaderboardRouter from './routes/mmLeaderboard';
import growsurfRouter from './routes/growsurf';
import gSheetsRouter from './routes/gSheet';
import blogRouter from './routes/blog';
import feedsRouter from './routes/feeds';

/* Dome API for topcoder communities */
import tcCommunitiesDemoApi from './tc-communities';
Expand Down Expand Up @@ -143,6 +144,7 @@ async function onExpressJsSetup(server) {
server.use('/api/growsurf', growsurfRouter);
server.use('/api/gsheets', gSheetsRouter);
server.use('/api/blog', blogRouter);
server.use('/api/feeds', feedsRouter);

// serve demo api
server.use(
Expand Down
62 changes: 62 additions & 0 deletions src/server/routes/feeds.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* The routes that expose assets and content from Contentful CMS to the CDN.
*/

import express from 'express';
import RSS from 'rss';
import ReactDOMServer from 'react-dom/server';
import md from 'utils/markdown';
import {
getService,
} from '../services/contentful';

const cors = require('cors');

const routes = express.Router();

// Enables CORS on those routes according config above
// ToDo configure CORS for set of our trusted domains
routes.use(cors());
routes.options('*', cors());

routes.get('/thrive', async (req, res, next) => {
try {
const data = await getService('EDU', 'master', true).queryEntries({
content_type: 'article',
limit: 20,
order: '-sys.createdAt',
include: 2,
});
const feed = new RSS({
title: 'Topcoder Thrive',
description: 'Tutorials And Workshops That Matter | Thrive | Topcoder',
feed_url: 'https://topcoder.com/api/feeds/thrive',
site_url: 'https://topcoder.com/thrive',
image_url: 'https://www.topcoder.com/wp-content/uploads/2020/05/cropped-TC-Icon-32x32.png',
docs: 'https://www.topcoder.com/thrive/tracks?track=Topcoder',
webMaster: '<[email protected]> Kiril Kartunov',
copyright: '2021 - today, Topcoder',
language: 'en',
categories: ['Competitive Programming', 'Data Science', 'Design', 'Development', 'QA', 'Gig work', 'Topcoder'],
ttl: '60',
});
if (data && data.total) {
data.items.forEach((entry) => {
feed.item({
title: entry.fields.title,
description: ReactDOMServer.renderToString(md(entry.fields.content)),
url: `https://topcoder.com/thrive/articles/${entry.fields.slug || encodeURIComponent(entry.fields.title)}?utm_source=community&utm_campaign=thrive-feed&utm_medium=promotion`,
date: entry.fields.creationDate,
categories: entry.fields.tags,
author: entry.fields.contentAuthor[0].fields.name,
});
});
}
res.set('Content-Type', 'application/rss+xml');
res.send(feed.xml({ indent: true }));
} catch (e) {
next(e);
}
});

export default routes;
16 changes: 14 additions & 2 deletions src/shared/actions/mmLeaderboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { redux } from 'topcoder-react-utils';
import { redux, config } from 'topcoder-react-utils';
import Service from 'services/mmLeaderboard';
import _ from 'lodash';


/**
* Fetch init
*/
Expand Down Expand Up @@ -34,11 +35,22 @@ async function getMMLeaderboardDone(id) {
score: scores && scores.length ? scores[0].score : '...',
});
});
data = _.orderBy(data, [d => (Number(d.score) ? Number(d.score) : 0)], ['desc']).map((r, i) => ({
data = _.orderBy(data, [d => (Number(d.score) ? Number(d.score) : 0), d => new Date(d.updated) - new Date()], ['desc']).map((r, i) => ({
...r,
rank: i + 1,
score: r.score % 1 ? Number(r.score).toFixed(5) : r.score,
}));
// Fetch member photos and rating for top 10
const results = await Promise.all(
_.take(data, 10).map(d => fetch(`${config.API.V5}/members/${d.createdBy}`)),
);
const memberData = await Promise.all(results.map(r => r.json()));
// merge with data
// eslint-disable-next-line array-callback-return
memberData.map((member, indx) => {
data[indx].photoUrl = member.photoURL;
data[indx].rating = member.maxRating && member.maxRating.rating;
});
}
return {
id,
Expand Down
10 changes: 7 additions & 3 deletions src/shared/components/InputSelect/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class InputSelect extends Component {
let i = 0;
let node = e.target;
const REG = new RegExp(_id);
while (node && i < 5) {
while (node && i < 20) {
if (REG.test(node.className)) {
return true;
}
Expand All @@ -131,6 +131,7 @@ export default class InputSelect extends Component {
placeholder,
labelKey,
options,
onKeyPress,
} = this.props;

const {
Expand All @@ -139,9 +140,10 @@ export default class InputSelect extends Component {
filterVal,
} = this.state;

const escapeRegExp = stringToGoIntoTheRegex => stringToGoIntoTheRegex.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); /* eslint-disable-line no-useless-escape */
let fiterList = options;
if (filterVal) {
const REG = new RegExp(filterVal, 'i');
const REG = new RegExp(escapeRegExp(filterVal), 'i');
fiterList = filter(options, o => REG.test(o[labelKey]));
}
const list = map(fiterList, o => (
Expand Down Expand Up @@ -171,7 +173,7 @@ export default class InputSelect extends Component {
<div styleName="modal">
<div styleName="modal-input-container">

<input type="text" onChange={this.onFilterChange} placeholder="Search" />
<input type="text" onChange={this.onFilterChange} placeholder="Search" onKeyPress={onKeyPress} />
</div>
<div styleName="modal-list-container" onScroll={this.onLoadMore}>
{list}
Expand All @@ -195,6 +197,7 @@ InputSelect.defaultProps = {
isLoading: false,
onChange: () => {},
onLoadMore: () => {},
onKeyPress: () => {},
};

InputSelect.propTypes = {
Expand All @@ -205,6 +208,7 @@ InputSelect.propTypes = {
placeholder: PT.string,
onChange: PT.func,
onLoadMore: PT.func,
onKeyPress: PT.func,
hasMore: PT.bool,
isLoading: PT.bool,
disabled: PT.bool,
Expand Down
Loading