From 350fad86c0875433261e4146b5e1f793cd0cf93c Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 14 Dec 2023 20:54:50 +0200 Subject: [PATCH 1/4] fix dashboard flag check --- .../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 557a5ebbb..81f44a0f4 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -46,7 +46,7 @@ export default function ChallengeViewSelector(props) { const { type, tags, metadata } = challenge; const dashboardMetadata = _.find(metadata, { name: 'show_data_dashboard' }); if (dashboardMetadata) { - showDashboard = dashboardMetadata.value; + showDashboard = dashboardMetadata.value === 'true'; } const [currentSelected, setCurrentSelected] = useState('Details'); From f46dc43a2eb58ebdecc5a68114a4f67918642a3b Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 14 Dec 2023 20:55:36 +0200 Subject: [PATCH 2/4] 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 4b55743ad..ae6e4084a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -363,7 +363,7 @@ workflows: filters: branches: only: - - IC-13 + - metadata-fix # This is alternate dev env for parallel testing - "build-qa": context : org-global From d2f942c9d472627c3d0582243cada2ff2beb0aad Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Dec 2023 07:24:53 +1100 Subject: [PATCH 3/4] Additional tweak to handle string _or_ boolean, for past challenges --- .../challenge-detail/Header/TabSelector/index.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 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 81f44a0f4..0ece67243 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -46,7 +46,12 @@ export default function ChallengeViewSelector(props) { const { type, tags, metadata } = challenge; const dashboardMetadata = _.find(metadata, { name: 'show_data_dashboard' }); if (dashboardMetadata) { - showDashboard = dashboardMetadata.value === 'true'; + if(_.isString(dashboardMetadata.value)) { + showDashboard = dashboardMetadata.value === 'true'; + } + else if(_.isBoolean(dashboardMetadata.value)) { + showDashboard = dashboardMetadata.value + } } const [currentSelected, setCurrentSelected] = useState('Details'); From d0969f60d40ea9ed91f9b135c27c27b2faa56eb8 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 15 Dec 2023 07:31:11 +1100 Subject: [PATCH 4/4] Lint --- .../challenge-detail/Header/TabSelector/index.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx index 0ece67243..a2fd9bf2f 100644 --- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx +++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx @@ -46,11 +46,10 @@ export default function ChallengeViewSelector(props) { const { type, tags, metadata } = challenge; const dashboardMetadata = _.find(metadata, { name: 'show_data_dashboard' }); if (dashboardMetadata) { - if(_.isString(dashboardMetadata.value)) { + if (_.isString(dashboardMetadata.value)) { showDashboard = dashboardMetadata.value === 'true'; - } - else if(_.isBoolean(dashboardMetadata.value)) { - showDashboard = dashboardMetadata.value + } else if (_.isBoolean(dashboardMetadata.value)) { + showDashboard = dashboardMetadata.value; } }