From b8fd92d511d12d470cfb398aa19952ee8e58d599 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Wed, 28 Sep 2022 11:09:49 +1000 Subject: [PATCH 1/7] Deploy this branch --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57c0822d50..f0af99feb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -349,6 +349,7 @@ workflows: filters: branches: only: + - enable_dashboard_on_data_science - free # This is alternate dev env for parallel testing - "build-test": From 5403d52923746041431d64bd04c1466efca2ab8a Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Wed, 28 Sep 2022 13:46:57 +1000 Subject: [PATCH 2/7] Enable toggle for dashboard on data science https://topcoder.atlassian.net/browse/PROD-2955 --- .../challenge-detail/Header/TabSelector/index.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx index 14175c3264..50115506b6 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -42,7 +42,12 @@ export default function ChallengeViewSelector(props) { viewAsTable, } = props; - const { type, tags } = challenge; + let showDashboard; + const { type, tags, metadata } = challenge; + const dashboardMetadata = _.find(metadata, { name: 'show_data_dashboard' }); + if (dashboardMetadata) { + showDashboard = dashboardMetadata.value; + } const [currentSelected, setCurrentSelected] = useState('Details'); const [isTabClosed, setIsTabClosed] = useState(true); @@ -300,7 +305,7 @@ export default function ChallengeViewSelector(props) { return ''; })()} { - (isMM || challenge.track.toLowerCase() === 'data science') && ( + (isMM || (challenge.track.toLowerCase() === 'data science' && showDashboard)) && ( Date: Fri, 30 Sep 2022 08:17:52 +1000 Subject: [PATCH 3/7] Honor the toggle for all data science challenge types --- .../components/challenge-detail/Header/TabSelector/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx index 50115506b6..dcdc49f122 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -305,7 +305,7 @@ export default function ChallengeViewSelector(props) { return ''; })()} { - (isMM || (challenge.track.toLowerCase() === 'data science' && showDashboard)) && ( + (challenge.track.toLowerCase() === 'data science' && showDashboard) && ( Date: Fri, 7 Oct 2022 13:43:10 +0300 Subject: [PATCH 4/7] Add "Learn" to top navi --- .../shared/components/Header/__snapshots__/index.jsx.snap | 5 +++++ config/default.js | 5 +++++ config/production.js | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/__tests__/shared/components/Header/__snapshots__/index.jsx.snap b/__tests__/shared/components/Header/__snapshots__/index.jsx.snap index 57529344d8..4379a704c9 100644 --- a/__tests__/shared/components/Header/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/Header/__snapshots__/index.jsx.snap @@ -136,6 +136,11 @@ exports[`Default render 1`] = ` "openNewTab": true, "title": "Discord", }, + Object { + "href": "https://platform-ui.topcoder-dev.com/learn", + "openNewTab": true, + "title": "Learn", + }, ], "title": "COMMUNITY", }, diff --git a/config/default.js b/config/default.js index fc8f5da39b..e7058e0ccb 100644 --- a/config/default.js +++ b/config/default.js @@ -410,6 +410,11 @@ module.exports = { href: 'https://discord.gg/topcoder', openNewTab: true, }, + { + title: 'Learn', + href: 'https://platform-ui.topcoder-dev.com/learn', + openNewTab: true, + }, ], }, ], diff --git a/config/production.js b/config/production.js index a97b9b3cb3..528760c7d9 100644 --- a/config/production.js +++ b/config/production.js @@ -194,6 +194,11 @@ module.exports = { href: 'https://discord.gg/topcoder?ref=nav', openNewTab: true, }, + { + title: 'Learn', + href: 'https://platform-ui.topcoder.com/learn', + openNewTab: true, + }, ], }, ], From a429c8adde2f499206b6ac9354754d842c48cd99 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Fri, 7 Oct 2022 13:43:44 +0300 Subject: [PATCH 5/7] 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 5b87843434..b6134467e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -356,7 +356,7 @@ workflows: filters: branches: only: - - free + - TCA-484 # This is alternate dev env for parallel testing - "build-qa": context : org-global From fb06b92666c29966a8feee3f3b3b9baf7c698f42 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Fri, 7 Oct 2022 14:09:35 +0300 Subject: [PATCH 6/7] adds convert script --- __tests__/shared/__snapshots__/index.jsx.snap | 8 ++++++++ src/shared/app.jsx | 1 + src/shared/components/Dashboard/TCOLeaderboards/index.jsx | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/__tests__/shared/__snapshots__/index.jsx.snap b/__tests__/shared/__snapshots__/index.jsx.snap index 0304c1a0a5..2069cbf96f 100644 --- a/__tests__/shared/__snapshots__/index.jsx.snap +++ b/__tests__/shared/__snapshots__/index.jsx.snap @@ -23,6 +23,10 @@ exports[`Snapshot match 1`] = ` async={true} src="https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com" /> +