From 7ff1230b300e3e2bbe2b8d105cf0a29043edcae4 Mon Sep 17 00:00:00 2001 From: rashmi73 Date: Wed, 17 Mar 2021 02:48:44 +0530 Subject: [PATCH 01/12] issue 5433 fix --- config/default.js | 1 + config/production.js | 1 + src/shared/components/Settings/Preferences/index.jsx | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/default.js b/config/default.js index ec2de811b4..3fe013f902 100644 --- a/config/default.js +++ b/config/default.js @@ -111,6 +111,7 @@ module.exports = { BLOG_FEED: 'https://www.topcoder.com/blog/feed/', COMMUNITY: 'https://community.topcoder-dev.com', FORUMS: 'https://apps.topcoder-dev.com/forums', + DISCUSSION_FORUM: 'https://discussions.topcoder.com', FORUMS_VANILLA: 'https://vanilla.topcoder-dev.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', SUBMISSION_REVIEW: 'https://submission-review.topcoder-dev.com', diff --git a/config/production.js b/config/production.js index f83da0fbc1..f48acfd915 100644 --- a/config/production.js +++ b/config/production.js @@ -31,6 +31,7 @@ module.exports = { HOME: '/my-dashboard', COMMUNITY: 'https://community.topcoder.com', FORUMS: 'https://apps.topcoder.com/forums', + DISCUSSION_FORUM: 'https://discussions.topcoder.com', FORUMS_VANILLA: 'https://discussions.topcoder.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', SUBMISSION_REVIEW: 'https://submission-review.topcoder.com', diff --git a/src/shared/components/Settings/Preferences/index.jsx b/src/shared/components/Settings/Preferences/index.jsx index 5db18e1be9..72fd95024b 100644 --- a/src/shared/components/Settings/Preferences/index.jsx +++ b/src/shared/components/Settings/Preferences/index.jsx @@ -88,7 +88,7 @@ export default class Preferences extends React.Component { case 'e-mail': return ; case 'forum': - return (window.location.href = `${config.URL.FORUMS}/?module=Settings`) && ; + return (window.location.href = `${config.URL.DISCUSSION_FORUM}/profile/preferences`) && ; case 'payment': return (window.location.href = `${config.URL.COMMUNITY}/tc?module=EditPaymentPreferences`) && ; default: From d4cf9b4c25c3ea1b98c3daadcf3c60db46a172f0 Mon Sep 17 00:00:00 2001 From: draco-malfoy <46344490+draco-malfoy@users.noreply.github.com> Date: Wed, 17 Mar 2021 10:21:08 +0530 Subject: [PATCH 02/12] Update index.jsx --- .../challenge-detail/Specification/SideBar/index.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx index 793278de7d..7c5465c066 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx +++ b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx @@ -432,6 +432,16 @@ export default function SideBar({ + + + Topcoder Templates
repository +
+
{ shareable && (
From b70978a794f1f0ffa8e2cab897dbf3bd82c217c8 Mon Sep 17 00:00:00 2001 From: draco-malfoy <46344490+draco-malfoy@users.noreply.github.com> Date: Wed, 17 Mar 2021 10:21:55 +0530 Subject: [PATCH 03/12] Update default.js --- config/default.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/default.js b/config/default.js index ec2de811b4..161136e9e2 100644 --- a/config/default.js +++ b/config/default.js @@ -140,6 +140,7 @@ module.exports = { HOWTOCOMPETEINMARATHON: 'https://www.topcoder.com/thrive/articles/How%20To%20Compete%20in%20a%20Marathon%20Match', USABLECODEDEV: 'https://www.topcoder.com/thrive/articles/Usable%20Code%20in%20Dev%20Challenges', EXTENSIONVSCODE: 'https://marketplace.visualstudio.com/items?itemName=Topcoder.topcoder-workflow&ssr=false#overview', + TEMPLATES_REPO: 'https://github.com/topcoder-platform-templates', }, IOS: 'https://ios.topcoder-dev.com', From 2bb0ef796f93c754e9f2fa9002749818a047557b Mon Sep 17 00:00:00 2001 From: gets0ul Date: Thu, 18 Mar 2021 21:19:36 +0700 Subject: [PATCH 04/12] fix: "window is not defined" error on accessing winners tab directly --- .../challenge-detail/Winners/Winner/index.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/shared/components/challenge-detail/Winners/Winner/index.jsx b/src/shared/components/challenge-detail/Winners/Winner/index.jsx index 1a28490688..bd545f7808 100644 --- a/src/shared/components/challenge-detail/Winners/Winner/index.jsx +++ b/src/shared/components/challenge-detail/Winners/Winner/index.jsx @@ -1,6 +1,6 @@ import { Avatar } from 'topcoder-react-ui-kit'; import PT from 'prop-types'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; import _ from 'lodash'; import { config } from 'topcoder-react-utils'; @@ -20,6 +20,11 @@ export default function Winner({ viewable, winner, }) { + const [windowOrigin, setWindowOrigin] = useState(); + useEffect(() => { + setWindowOrigin(window.origin); + }, []); + const submissionId = viewable && getId(submissions, winner.placement); let placeStyle = winner.placement < 4 ? `place-${winner.placement}` : ''; @@ -69,9 +74,9 @@ export default function Winner({ />
{winner.handle} From b9147b326a75fcff718e3424142e603718dcee98 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 30 Mar 2021 09:55:59 +0300 Subject: [PATCH 05/12] Implements #5432 --- src/assets/images/minimal-down-white.svg | 19 +++++ .../Contentful/Dropdown/DropdownItem.jsx | 25 ++++--- .../components/Contentful/Dropdown/index.jsx | 18 ++++- .../Contentful/Dropdown/themes/dark.scss | 18 +++++ .../Dropdown/{ => themes}/default.scss | 2 +- .../Contentful/Dropdown/themes/item-dark.scss | 74 +++++++++++++++++++ .../Dropdown/{ => themes}/item.scss | 35 ++++++--- 7 files changed, 166 insertions(+), 25 deletions(-) create mode 100644 src/assets/images/minimal-down-white.svg create mode 100644 src/shared/components/Contentful/Dropdown/themes/dark.scss rename src/shared/components/Contentful/Dropdown/{ => themes}/default.scss (93%) create mode 100644 src/shared/components/Contentful/Dropdown/themes/item-dark.scss rename src/shared/components/Contentful/Dropdown/{ => themes}/item.scss (66%) diff --git a/src/assets/images/minimal-down-white.svg b/src/assets/images/minimal-down-white.svg new file mode 100644 index 0000000000..fa93bcd8db --- /dev/null +++ b/src/assets/images/minimal-down-white.svg @@ -0,0 +1,19 @@ + + + E3888766-86CD-43A6-A78B-A268A3840C86 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/shared/components/Contentful/Dropdown/DropdownItem.jsx b/src/shared/components/Contentful/Dropdown/DropdownItem.jsx index 1c7d36cee9..2b8835e766 100644 --- a/src/shared/components/Contentful/Dropdown/DropdownItem.jsx +++ b/src/shared/components/Contentful/Dropdown/DropdownItem.jsx @@ -5,9 +5,14 @@ import React from 'react'; import PT from 'prop-types'; import MarkdownRenderer from 'components/MarkdownRenderer'; +import { themr } from 'react-css-super-themr'; +import defaultTheme from './themes/item.scss'; +import darkTheme from './themes/item-dark.scss'; -import './item.scss'; - +const THEMES = { + Default: defaultTheme, + 'Dark mode': darkTheme, +}; class DropdownItem extends React.Component { constructor(props) { super(props); @@ -24,24 +29,24 @@ class DropdownItem extends React.Component { } render() { - const { data } = this.props; + const { data, baseTheme } = this.props; const { isActive } = this.state; return ( -
+
(e.key === 'Enter' ? null : null)} - styleName={isActive ? 'question active' : 'question'} + className={isActive ? THEMES[baseTheme]['question-active'] : THEMES[baseTheme].question} onClick={() => this.toggleActive()} > -
+
{data.fields.title}
-
+
@@ -55,6 +60,7 @@ DropdownItem.defaultProps = { spaceName: null, environment: null, isActive: false, + baseTheme: 'Default', }; DropdownItem.propTypes = { @@ -63,6 +69,7 @@ DropdownItem.propTypes = { preview: PT.bool, spaceName: PT.string, environment: PT.string, + baseTheme: PT.string, }; -export default DropdownItem; +export default themr('DropdownItem', defaultTheme)(DropdownItem); diff --git a/src/shared/components/Contentful/Dropdown/index.jsx b/src/shared/components/Contentful/Dropdown/index.jsx index 92d6505fec..02de1f8863 100644 --- a/src/shared/components/Contentful/Dropdown/index.jsx +++ b/src/shared/components/Contentful/Dropdown/index.jsx @@ -10,7 +10,13 @@ import React from 'react'; import { fixStyle } from 'utils/contentful'; import DropdownItem from './DropdownItem'; -import defaultTheme from './default.scss'; +import defaultTheme from './themes/default.scss'; +import darkTheme from './themes/dark.scss'; + +const THEMES = { + Default: defaultTheme, + 'Dark mode': darkTheme, +}; function DropdownItemsLoader(props) { const { @@ -18,6 +24,7 @@ function DropdownItemsLoader(props) { preview, spaceName, environment, + baseTheme, } = props; return ( @@ -34,6 +41,7 @@ function DropdownItemsLoader(props) { spaceName={spaceName} environment={environment} key={item.sys.id} + baseTheme={baseTheme} /> )) )} @@ -53,6 +61,7 @@ DropdownItemsLoader.propTypes = { preview: PT.bool, spaceName: PT.string, environment: PT.string, + baseTheme: PT.string.isRequired, }; /* Loads the dropdown entry. */ @@ -69,13 +78,15 @@ export default function DropdownLoader(props) { render={(data) => { const { fields } = Object.values(data.entries.items)[0]; if (!fields) return null; + let { theme } = fields; + theme = theme || 'Default'; return (
diff --git a/src/shared/components/Contentful/Dropdown/themes/dark.scss b/src/shared/components/Contentful/Dropdown/themes/dark.scss new file mode 100644 index 0000000000..f055fe1816 --- /dev/null +++ b/src/shared/components/Contentful/Dropdown/themes/dark.scss @@ -0,0 +1,18 @@ +@import "~styles/mixins"; + +.container { + padding: 0; + + @include xs-to-sm { + padding: 0 15px; + } +} + +.contentWrapper { + display: flex; + margin: 0 auto; + max-width: $screen-md; + color: #fff; + flex-direction: column; + border-top: 1px solid rgba(212, 212, 212, 0.4); +} diff --git a/src/shared/components/Contentful/Dropdown/default.scss b/src/shared/components/Contentful/Dropdown/themes/default.scss similarity index 93% rename from src/shared/components/Contentful/Dropdown/default.scss rename to src/shared/components/Contentful/Dropdown/themes/default.scss index 9022565a91..f5b53818fc 100644 --- a/src/shared/components/Contentful/Dropdown/default.scss +++ b/src/shared/components/Contentful/Dropdown/themes/default.scss @@ -12,7 +12,7 @@ display: flex; margin: 0 auto; max-width: $screen-md; - color: black; + color: #2a2a2a; flex-direction: column; border-top: 1px solid #d4d4d4; } diff --git a/src/shared/components/Contentful/Dropdown/themes/item-dark.scss b/src/shared/components/Contentful/Dropdown/themes/item-dark.scss new file mode 100644 index 0000000000..f01fbb6373 --- /dev/null +++ b/src/shared/components/Contentful/Dropdown/themes/item-dark.scss @@ -0,0 +1,74 @@ +@import "~styles/mixins"; +@import "~components/Contentful/default"; + +.container { + width: 100%; +} + +.question, +.question-active { + display: flex; + align-items: center; + justify-content: space-between; + height: 82px; + outline: none; + cursor: pointer; + border-bottom: 1px solid rgba(212, 212, 212, 0.4); +} + +.question-active { + border-bottom: none; + height: 81px; +} + +.answer, +.answer-active { + @include gui-kit-content; + @include gui-kit-headers; + + display: none; + padding: 5px 70px 24px 0; + color: #fff; + + @include xs-to-sm { + padding-right: 0; + } + + p { + color: #fff; + } +} + +.answer-active { + display: block; + border-bottom: 1px solid rgba(212, 212, 212, 0.4); +} + +.text { + color: #fff; + font-family: BarlowCondensed, sans-serif; + font-size: 31px; + letter-spacing: 0.2px; + text-transform: uppercase; + font-weight: 500; + + @include xs-to-sm { + max-width: 350px; + flex: 1; + margin-right: 20px; + font-size: 21px; + } +} + +.toggle-arrow, +.toggle-arrow-active { + background-image: url(assets/images/minimal-down-white.svg); + background-repeat: no-repeat; + align-self: right; + width: 24px; + height: 15px; +} + +.toggle-arrow-active { + transform: scale(1, -1); +} diff --git a/src/shared/components/Contentful/Dropdown/item.scss b/src/shared/components/Contentful/Dropdown/themes/item.scss similarity index 66% rename from src/shared/components/Contentful/Dropdown/item.scss rename to src/shared/components/Contentful/Dropdown/themes/item.scss index 7cd898b901..a702b40acd 100644 --- a/src/shared/components/Contentful/Dropdown/item.scss +++ b/src/shared/components/Contentful/Dropdown/themes/item.scss @@ -5,7 +5,8 @@ width: 100%; } -.question { +.question, +.question-active { display: flex; align-items: center; justify-content: space-between; @@ -13,13 +14,15 @@ outline: none; cursor: pointer; border-bottom: 1px solid #d4d4d4; +} - &.active { - border-bottom: none; - } +.question-active { + border-bottom: none; + height: 81px; } -.answer { +.answer, +.answer-active { @include gui-kit-content; @include gui-kit-headers; @@ -27,12 +30,16 @@ padding: 5px 70px 24px 0; color: #2a2a2a; - &.active { - display: block; - border-bottom: 1px solid #d4d4d4; + @include xs-to-sm { + padding-right: 0; } } +.answer-active { + display: block; + border-bottom: 1px solid #d4d4d4; +} + .text { color: #2a2a2a; font-family: BarlowCondensed, sans-serif; @@ -43,17 +50,21 @@ @include xs-to-sm { max-width: 350px; + flex: 1; + margin-right: 20px; + font-size: 21px; } } -.toggle-arrow { +.toggle-arrow, +.toggle-arrow-active { background-image: url(assets/images/minimal-down.svg); background-repeat: no-repeat; align-self: right; width: 24px; height: 13px; +} - &.active { - transform: scale(1, -1); - } +.toggle-arrow-active { + transform: scale(1, -1); } From 14efead58ac31e098bbd7a2b4eebc38b1ac6ab74 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 30 Mar 2021 10:00:51 +0300 Subject: [PATCH 06/12] ci: on test --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d107a6dc6..2aecf63a05 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -283,7 +283,7 @@ workflows: filters: branches: only: - - gig-application-update + - FAQ-theme # This is alternate dev env for parallel testing - "build-qa": context : org-global From f0cc8b0fe63acd3fbab902e5cbe72c69e119ca46 Mon Sep 17 00:00:00 2001 From: rashmi73 Date: Wed, 31 Mar 2021 12:15:28 +0530 Subject: [PATCH 07/12] issue 5433 feedback --- config/default.js | 1 - config/production.js | 1 - src/shared/components/Settings/Preferences/index.jsx | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config/default.js b/config/default.js index 3fe013f902..ec2de811b4 100644 --- a/config/default.js +++ b/config/default.js @@ -111,7 +111,6 @@ module.exports = { BLOG_FEED: 'https://www.topcoder.com/blog/feed/', COMMUNITY: 'https://community.topcoder-dev.com', FORUMS: 'https://apps.topcoder-dev.com/forums', - DISCUSSION_FORUM: 'https://discussions.topcoder.com', FORUMS_VANILLA: 'https://vanilla.topcoder-dev.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', SUBMISSION_REVIEW: 'https://submission-review.topcoder-dev.com', diff --git a/config/production.js b/config/production.js index f48acfd915..f83da0fbc1 100644 --- a/config/production.js +++ b/config/production.js @@ -31,7 +31,6 @@ module.exports = { HOME: '/my-dashboard', COMMUNITY: 'https://community.topcoder.com', FORUMS: 'https://apps.topcoder.com/forums', - DISCUSSION_FORUM: 'https://discussions.topcoder.com', FORUMS_VANILLA: 'https://discussions.topcoder.com', HELP: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', SUBMISSION_REVIEW: 'https://submission-review.topcoder.com', diff --git a/src/shared/components/Settings/Preferences/index.jsx b/src/shared/components/Settings/Preferences/index.jsx index 72fd95024b..ed7c3456d7 100644 --- a/src/shared/components/Settings/Preferences/index.jsx +++ b/src/shared/components/Settings/Preferences/index.jsx @@ -88,7 +88,7 @@ export default class Preferences extends React.Component { case 'e-mail': return ; case 'forum': - return (window.location.href = `${config.URL.DISCUSSION_FORUM}/profile/preferences`) && ; + return (window.location.href = `${config.URL.FORUMS_VANILLA}/profile/preferences`) && ; case 'payment': return (window.location.href = `${config.URL.COMMUNITY}/tc?module=EditPaymentPreferences`) && ; default: From 9a05cb13e8827dafa24bfd6fc7755b6b2ef85109 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 2 Apr 2021 04:42:19 -0300 Subject: [PATCH 08/12] fix; for issue #5312 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28e53ff3ad..5f8a08967c 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,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.7", + "topcoder-react-lib": "1000.27.11", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 1ea27dda7101d6064a5aad7175a11219cf08db5b Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 2 Apr 2021 04:48:05 -0300 Subject: [PATCH 09/12] ci: Deploy bug-bash to QA and BETA env --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d107a6dc6..dedb319811 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -290,14 +290,14 @@ workflows: filters: branches: only: - - free + - bug-bash # This is beta env for production soft releases - "build-prod-beta": context : org-global filters: branches: only: - - develop + - bug-bash # This is stage env for production QA releases - "build-prod-staging": context : org-global From b70de3a5a8f6b92a2fe527d1ba0ad8e8abe9701a Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 2 Apr 2021 05:33:58 -0300 Subject: [PATCH 10/12] hotfix; for issue #5312 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f8a08967c..36934e78d6 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,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": "1000.27.11", + "topcoder-react-lib": "1000.27.12", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From b8b9bb20cfdc54acdb2fde0ce098d6ab460e304b Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Fri, 2 Apr 2021 06:23:39 -0300 Subject: [PATCH 11/12] Revert "hotfix; for issue #5312" This reverts commit b70de3a5a8f6b92a2fe527d1ba0ad8e8abe9701a. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 36934e78d6..5f8a08967c 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,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": "1000.27.12", + "topcoder-react-lib": "1000.27.11", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From ab13059a95404efaefa852cb67d708f01928a181 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Fri, 2 Apr 2021 06:23:54 -0300 Subject: [PATCH 12/12] Revert "fix; for issue #5312" This reverts commit 9a05cb13e8827dafa24bfd6fc7755b6b2ef85109. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f8a08967c..28e53ff3ad 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,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": "1000.27.11", + "topcoder-react-lib": "1.1.7", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2",