From 4a1f2622ce57a7682c6e17e0571a5b191fcf69c5 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 8 Jun 2021 10:29:27 -0300 Subject: [PATCH 01/12] Run AST to challenge details only --- automated-smoke-test/conf.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated-smoke-test/conf.ts b/automated-smoke-test/conf.ts index 2148d113a8..2cdd06aac8 100644 --- a/automated-smoke-test/conf.ts +++ b/automated-smoke-test/conf.ts @@ -41,8 +41,8 @@ exports.config = { // '../temp/test-suites/tc-header.spec.js', // '../temp/test-suites/tc-footer.spec.js', // '../temp/test-suites/tc-preferences.spec.js', - '../temp/test-suites/tc-challenge-listing.spec.js', - // '../temp/test-suites/tc-challenge-detail.spec.js', + // '../temp/test-suites/tc-challenge-listing.spec.js', + '../temp/test-suites/tc-challenge-detail.spec.js', // '../temp/test-suites/tc-my-dashboard.spec.js', // '../temp/test-suites/tc-member-profile.spec.js', ], From b9cceb273574ee11ca752e8c1c35d8ceb57e2094 Mon Sep 17 00:00:00 2001 From: Dedy Wahyudi Date: Thu, 10 Jun 2021 11:32:51 +0700 Subject: [PATCH 02/12] edgenet icon --- src/assets/images/profile/skills/id-604.svg | 107 ++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 src/assets/images/profile/skills/id-604.svg diff --git a/src/assets/images/profile/skills/id-604.svg b/src/assets/images/profile/skills/id-604.svg new file mode 100644 index 0000000000..c8ae36ba51 --- /dev/null +++ b/src/assets/images/profile/skills/id-604.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 173c555c02dcb9570bd7be3df9c75b6bedc8e409 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 10 Jun 2021 14:17:51 +0300 Subject: [PATCH 03/12] Implement #5564 --- src/server/tc-communities/tco22/metadata.json | 20 +++++++ src/shared/routes/Communities/Routes.jsx | 2 + .../routes/Communities/TCO22/Routes.jsx | 60 +++++++++++++++++++ src/shared/routes/Communities/TCO22/index.jsx | 32 ++++++++++ 4 files changed, 114 insertions(+) create mode 100644 src/server/tc-communities/tco22/metadata.json create mode 100644 src/shared/routes/Communities/TCO22/Routes.jsx create mode 100644 src/shared/routes/Communities/TCO22/index.jsx diff --git a/src/server/tc-communities/tco22/metadata.json b/src/server/tc-communities/tco22/metadata.json new file mode 100644 index 0000000000..8fb39face2 --- /dev/null +++ b/src/server/tc-communities/tco22/metadata.json @@ -0,0 +1,20 @@ +{ + "challengeFilter": { + "events": ["tco22"] + }, + "communityId": "tco22", + "communityName": "TCO22", + "groupIds": [], + "hideSearch": true, + "logos": [{ + "img": "/community-app-assets/themes/tco/TCO22.svg", + "url": "https://tco22.topcoder.com" + }], + "menuItems": [{ + "navigationMenu": "5zZw57ZcKXWfOwwWbk5VnL" + }], + "newsFeed": "http://www.topcoder.com/feed", + "subdomains": ["tco22"], + "description": "2022 Topcoder Open. The Ultimate Programming & Design Tournament", + "image": "tco22.jpg" +} diff --git a/src/shared/routes/Communities/Routes.jsx b/src/shared/routes/Communities/Routes.jsx index 5f3d42ce6f..920791339e 100644 --- a/src/shared/routes/Communities/Routes.jsx +++ b/src/shared/routes/Communities/Routes.jsx @@ -38,6 +38,7 @@ import tco18 from './TCO18'; import tco19 from './TCO19'; import tco20 from './TCO20'; import tco21 from './TCO21'; +import tco22 from './TCO22'; import Mobile from './Mobile'; import Zurich from './Zurich'; import Comcast from './Comcast'; @@ -64,6 +65,7 @@ const TCOs = { tco19, tco20, tco21, + tco22, }; export default function Communities({ diff --git a/src/shared/routes/Communities/TCO22/Routes.jsx b/src/shared/routes/Communities/TCO22/Routes.jsx new file mode 100644 index 0000000000..7bbb11754e --- /dev/null +++ b/src/shared/routes/Communities/TCO22/Routes.jsx @@ -0,0 +1,60 @@ +/** + * Routing of TCO22 Community. + */ + +import Error404 from 'components/Error404'; +import PT from 'prop-types'; +import React from 'react'; +import { Route, Switch } from 'react-router-dom'; +import ContentfulRoute from 'components/Contentful/Route'; +import ContentfulMenu from 'components/Contentful/Menu'; +import Profile from 'routes/Profile'; +import ProfileStats from 'routes/ProfileStats'; +import Settings from 'routes/Settings'; + +export default function TCO22({ base, meta }) { + return ( +
+ { + meta.menuItems ? ( + + ) : null + } + + } + exact + path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} + /> + } + exact + path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} + /> + } + path={`${base}/settings`} + /> + } + id="6Ewcb5fkc67JOMhud6RoBs" + /> + +
+ ); +} + +TCO22.defaultProps = { + base: '', +}; + +TCO22.propTypes = { + base: PT.string, + meta: PT.shape().isRequired, +}; diff --git a/src/shared/routes/Communities/TCO22/index.jsx b/src/shared/routes/Communities/TCO22/index.jsx new file mode 100644 index 0000000000..661df77231 --- /dev/null +++ b/src/shared/routes/Communities/TCO22/index.jsx @@ -0,0 +1,32 @@ +/** + * Loader for the community's code chunks. + */ + +import LoadingIndicator from 'components/LoadingIndicator'; +import path from 'path'; +import PT from 'prop-types'; +import React from 'react'; +import { AppChunk, webpack } from 'topcoder-react-utils'; + +export default function ChunkLoader({ base, meta }) { + return ( + import(/* webpackChunkName: "tco22-community/chunk" */ './Routes') + .then(({ default: Routes }) => ( + + )) + } + renderPlaceholder={() => } + renderServer={() => { + const Routes = webpack.requireWeak(path.resolve(__dirname, './Routes')); + return ; + }} + /> + ); +} + +ChunkLoader.propTypes = { + base: PT.string.isRequired, + meta: PT.shape().isRequired, +}; From 42215729f65001be0a95f03aa24295460de18e48 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 10 Jun 2021 14:25:26 +0300 Subject: [PATCH 04/12] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 968598bb1c..1a653b8721 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -361,7 +361,7 @@ workflows: filters: branches: only: - - thrive-bug-fixes2 + - tco22 # This is stage env for production QA releases - "build-prod-staging": context : org-global From 296980c228c26636c9415669d73ddece6ca1a0e5 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Fri, 11 Jun 2021 15:11:46 +0300 Subject: [PATCH 05/12] Fix #5570 --- src/shared/services/contentful.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shared/services/contentful.js b/src/shared/services/contentful.js index c8509fe9da..289830d0a7 100644 --- a/src/shared/services/contentful.js +++ b/src/shared/services/contentful.js @@ -340,11 +340,7 @@ class Service { } if (track) query['fields.trackCategory'] = track; if (!_.isEmpty(tags)) { - if (tags.length === 1) { - query['fields.tags[match]'] = tags.join(','); - } else { - query.query = tags.join(' '); - } + query['fields.tags[all]'] = tags.join(','); } if (startDate) query['fields.creationDate[gte]'] = startDate; if (endDate) query['fields.creationDate[lte]'] = endDate; From 6cd2cd8497a8c427eb67ef6a16fac9a0c132a446 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Fri, 11 Jun 2021 15:42:30 +0300 Subject: [PATCH 06/12] Fix the dot on f-articles --- src/shared/components/Contentful/ArticleCard/ArticleCard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/Contentful/ArticleCard/ArticleCard.jsx b/src/shared/components/Contentful/ArticleCard/ArticleCard.jsx index 38e99630a3..b627dcab1c 100644 --- a/src/shared/components/Contentful/ArticleCard/ArticleCard.jsx +++ b/src/shared/components/Contentful/ArticleCard/ArticleCard.jsx @@ -250,7 +250,7 @@ class ArticleCard extends React.Component { { showArticleInfo() && (

- {themeName === 'Article large' ?  .  : null} + {themeName === 'Article large' && contentAuthor && contentAuthor.length > 0 ?  .  : null} { contentAuthor && contentAuthor.length > 0 ? ( Date: Fri, 11 Jun 2021 13:04:02 -0300 Subject: [PATCH 07/12] ci: Deploy feature/profile-add-edgenet to QA env --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 99589dd9a2..e3d135b71a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -355,7 +355,7 @@ workflows: filters: branches: only: - - free + - feature/profile-add-edgenet # This is beta env for production soft releases - "build-prod-beta": context : org-global From 4abd37d78773b973233c5db4fd392df4c4ff03e5 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 11 Jun 2021 13:05:45 -0300 Subject: [PATCH 08/12] ci: Deploy feature/profile-add-edgenet to BETA env --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e3d135b71a..02b09a487c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -362,7 +362,7 @@ workflows: filters: branches: only: - - thrive-bug-fixes + - feature/profile-add-edgenet # This is stage env for production QA releases - "build-prod-staging": context : org-global From 734ff696b5b6387793933b81dcb794543cb4f5ad Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 14 Jun 2021 17:29:49 +0300 Subject: [PATCH 09/12] Fix #5571 --- .../Datepicker/__snapshots__/index.jsx.snap | 2 + .../SearchPageFilter/FilterDate/index.jsx | 40 +++++++++------- .../FilterDate/themes/default.scss | 48 ++----------------- .../SearchPageFilter/SearchPageFilter.jsx | 2 +- .../SearchPageFilter/themes/default.scss | 2 +- .../TracksFilter/TracksDate/index.jsx | 4 +- .../components/GUIKit/Datepicker/index.jsx | 22 ++++++++- src/shared/containers/EDU/Search.jsx | 9 ++-- 8 files changed, 58 insertions(+), 71 deletions(-) diff --git a/__tests__/shared/components/GUIKit/Datepicker/__snapshots__/index.jsx.snap b/__tests__/shared/components/GUIKit/Datepicker/__snapshots__/index.jsx.snap index 4d015bc53b..cbf30591eb 100644 --- a/__tests__/shared/components/GUIKit/Datepicker/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/GUIKit/Datepicker/__snapshots__/index.jsx.snap @@ -38,6 +38,8 @@ exports[`Default render 1`] = ` isRTL={false} keepFocusOnInput={false} keepOpenOnDateSelect={false} + maxDate={null} + minDate={null} monthFormat="MMMM YYYY" navNext={ - From - - { onSelectStartDate(date); }} + { + if (date instanceof Date) onSelectStartDate(moment(date)); + }} + size="xs" + isOutsideRange={day => moment().isBefore(day)} + displayFormat="M/DD/YYYY" + hideCustomInputIcon + errorMsg={startDate > endDate ? 'From should be before end' : null} /> - - - { onSelectEndDate(date); }} +

+ { + if (date instanceof Date) onSelectEndDate(moment(date)); + }} + size="xs" + isOutsideRange={day => moment().isSameOrBefore(day)} + displayFormat="M/DD/YYYY" + hideCustomInputIcon />
); diff --git a/src/shared/components/Contentful/SearchPageFilter/FilterDate/themes/default.scss b/src/shared/components/Contentful/SearchPageFilter/FilterDate/themes/default.scss index b143056b1c..b9c53cbabd 100644 --- a/src/shared/components/Contentful/SearchPageFilter/FilterDate/themes/default.scss +++ b/src/shared/components/Contentful/SearchPageFilter/FilterDate/themes/default.scss @@ -2,58 +2,20 @@ $text-black: #2a2a2a; -@mixin ellipsis { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - min-width: 0; -} - .container { @include roboto-regular; display: flex; flex-direction: row; color: $text-black; - background-color: $tc-white; - border-radius: 6px; - border: 1px solid #aaa; position: relative; - width: 100%; - align-items: center; - padding-left: 10px; font-size: 14px; - height: 38px; - max-width: 235px; - - :global { - .SingleDatePicker { - width: 90px; - margin-left: 6px; - } - - input { - height: 21px !important; - margin: 0 !important; - padding: 0 !important; - font-size: 14px !important; - border: none !important; - box-shadow: none !important; - } - } -} - -.title { - position: absolute; - color: #aaa; - font-size: 12px; - background: $tc-white; - padding: 0 7px; - left: 8px; - top: -7px; } .separator { - margin-left: 3px; - margin-right: 3px; + margin: 0 6px; + width: 6px; + height: 1px; + background-color: $text-black; + margin-top: 20px; } diff --git a/src/shared/components/Contentful/SearchPageFilter/SearchPageFilter.jsx b/src/shared/components/Contentful/SearchPageFilter/SearchPageFilter.jsx index b7978b243a..2a1e53b739 100644 --- a/src/shared/components/Contentful/SearchPageFilter/SearchPageFilter.jsx +++ b/src/shared/components/Contentful/SearchPageFilter/SearchPageFilter.jsx @@ -201,7 +201,7 @@ SearchPageFilterInner.defaultProps = { onApply: () => { }, selectedAuthor: DEF_SELECTED_AUTHOR, authorList: [DEF_SELECTED_AUTHOR], - startDate: moment('2001-01-02'), + startDate: moment('2001-01-01'), endDate: moment(), tags: [], selectedCategory: '', diff --git a/src/shared/components/Contentful/SearchPageFilter/themes/default.scss b/src/shared/components/Contentful/SearchPageFilter/themes/default.scss index fdf55054c5..82c931c883 100644 --- a/src/shared/components/Contentful/SearchPageFilter/themes/default.scss +++ b/src/shared/components/Contentful/SearchPageFilter/themes/default.scss @@ -30,7 +30,7 @@ $green-color: #137d60; } .track-date-container { - margin-top: 27px; + margin-top: 43px; } .author-container { diff --git a/src/shared/components/Contentful/TracksFilter/TracksDate/index.jsx b/src/shared/components/Contentful/TracksFilter/TracksDate/index.jsx index bbf0eacb0c..9a17208c53 100644 --- a/src/shared/components/Contentful/TracksFilter/TracksDate/index.jsx +++ b/src/shared/components/Contentful/TracksFilter/TracksDate/index.jsx @@ -24,7 +24,7 @@ export function TracksDateInner(props) { { onSelectStartDate(date); }} + onChange={(date) => { if (date instanceof Date) onSelectStartDate(date); }} size="xs" isOutsideRange={day => moment().isSameOrBefore(day)} /> @@ -32,7 +32,7 @@ export function TracksDateInner(props) { { onSelectEndDate(date); }} + onChange={(date) => { if (date instanceof Date) onSelectEndDate(date); }} size="xs" isOutsideRange={day => moment().isSameOrBefore(day)} /> diff --git a/src/shared/components/GUIKit/Datepicker/index.jsx b/src/shared/components/GUIKit/Datepicker/index.jsx index 3ac949e4c7..93ee05bb66 100644 --- a/src/shared/components/GUIKit/Datepicker/index.jsx +++ b/src/shared/components/GUIKit/Datepicker/index.jsx @@ -27,6 +27,11 @@ function Datepicker({ required, size, isOutsideRange, + hideCustomInputIcon, + isDayBlocked, + displayFormat, + minDate, + maxDate, }) { const sizeStyle = size === 'lg' ? 'lgSize' : 'xsSize'; const [date, setDate] = useState(value ? moment(value) : null); @@ -43,7 +48,7 @@ function Datepicker({ > } + customInputIcon={hideCustomInputIcon ? null : } date={date} onDateChange={(changedDate) => { setDate(changedDate); @@ -58,13 +63,16 @@ function Datepicker({ numberOfMonths={1} navPrev={} navNext={} - displayFormat="MMM DD, YYYY" + displayFormat={displayFormat} daySize={width > 600 ? 47 : 35} renderDayContents={d => (
{d.date ? d.date() : ''}
)} enableOutsideDays firstDayOfWeek={1} weekDayFormat="ddd" isOutsideRange={isOutsideRange} + isDayBlocked={isDayBlocked} + minDate={minDate} + maxDate={maxDate} /> {label ? ( @@ -86,6 +94,11 @@ Datepicker.defaultProps = { required: false, size: 'lg', isOutsideRange: day => moment().isSameOrAfter(day), + hideCustomInputIcon: false, + isDayBlocked: () => false, + displayFormat: 'MMM DD, YYYY', + minDate: null, + maxDate: null, }; Datepicker.propTypes = { @@ -97,6 +110,11 @@ Datepicker.propTypes = { required: PT.bool, size: PT.oneOf(['xs', 'lg']), isOutsideRange: PT.func, + hideCustomInputIcon: PT.bool, + isDayBlocked: PT.func, + displayFormat: PT.string, + minDate: PT.instanceOf(moment), + maxDate: PT.instanceOf(moment), }; export default Datepicker; diff --git a/src/shared/containers/EDU/Search.jsx b/src/shared/containers/EDU/Search.jsx index b16fcfdf12..7218cc350e 100644 --- a/src/shared/containers/EDU/Search.jsx +++ b/src/shared/containers/EDU/Search.jsx @@ -2,7 +2,6 @@ * Container for EDU Portal search page. */ import _ from 'lodash'; -import moment from 'moment'; import React from 'react'; import { config, isomorphy } from 'topcoder-react-utils'; import MetaTags from 'components/MetaTags'; @@ -67,8 +66,8 @@ export default class EDUSearch extends React.Component { const queryUpdate = { author: filterState.selectedAuthor, tags: filterState.tags, - startDate: filterState.startDate.format(), - endDate: filterState.endDate.format(), + startDate: filterState.startDate.format('YYYY-MM-DD'), + endDate: filterState.endDate.format('YYYY-MM-DD'), track: filterState.selectedCategory ? filterState.selectedCategory.title : null, tax: filterState.selectedCategory ? _.map( _.filter(filterState.selectedCategory.items, item => item.selected), @@ -125,8 +124,8 @@ export default class EDUSearch extends React.Component { onApply={this.onApplyFilter} selectedAuthor={query.author} tags={query.tags} - startDate={query.startDate ? moment(query.startDate) : undefined} - endDate={query.endDate ? moment(query.endDate) : undefined} + startDate={query.startDate ? query.startDate : undefined} + endDate={query.endDate ? query.endDate : undefined} selectedCategory={query.track} categories={tree} /> From 05192bf448e17ff1a7ce8a1e95e9741f07c4222e Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Tue, 15 Jun 2021 02:03:16 -0300 Subject: [PATCH 10/12] ci: Deploy feature/profile-add-edgenet to Stag env --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 02b09a487c..0a4a930ab2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -355,14 +355,14 @@ workflows: filters: branches: only: - - feature/profile-add-edgenet + - free # This is beta env for production soft releases - "build-prod-beta": context : org-global filters: branches: only: - - feature/profile-add-edgenet + - free # This is stage env for production QA releases - "build-prod-staging": context : org-global @@ -370,7 +370,7 @@ workflows: branches: only: - develop - - topgear-app + - feature/profile-add-edgenet # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 657ce1371157fac01717fb1c015bae95e85dea62 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 22 Jun 2021 10:14:06 +0300 Subject: [PATCH 11/12] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 968598bb1c..e705e3c6a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -361,7 +361,7 @@ workflows: filters: branches: only: - - thrive-bug-fixes2 + - thrive-bug-fixes3 # This is stage env for production QA releases - "build-prod-staging": context : org-global From 360e52c684350eeef954635f3acc987da8bcf56c Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Tue, 22 Jun 2021 10:36:21 -0300 Subject: [PATCH 12/12] ast: update specs --- automated-smoke-test/conf.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated-smoke-test/conf.ts b/automated-smoke-test/conf.ts index 2cdd06aac8..c283b6375b 100644 --- a/automated-smoke-test/conf.ts +++ b/automated-smoke-test/conf.ts @@ -41,7 +41,7 @@ exports.config = { // '../temp/test-suites/tc-header.spec.js', // '../temp/test-suites/tc-footer.spec.js', // '../temp/test-suites/tc-preferences.spec.js', - // '../temp/test-suites/tc-challenge-listing.spec.js', + '../temp/test-suites/tc-challenge-listing.spec.js', '../temp/test-suites/tc-challenge-detail.spec.js', // '../temp/test-suites/tc-my-dashboard.spec.js', // '../temp/test-suites/tc-member-profile.spec.js',