From ac62f0e2feced50bb045f2a14d5dc0525189f8aa Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Thu, 19 Dec 2024 20:52:18 +0100 Subject: [PATCH] enhance: enable narrative charts on staging server --- adminSiteClient/ChartViewEditor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adminSiteClient/ChartViewEditor.ts b/adminSiteClient/ChartViewEditor.ts index 982f967b83a..578ec7028c3 100644 --- a/adminSiteClient/ChartViewEditor.ts +++ b/adminSiteClient/ChartViewEditor.ts @@ -5,7 +5,7 @@ import { References, type EditorTab, } from "./AbstractChartEditor.js" -import { ENV } from "../settings/clientSettings.js" +import { BAKED_BASE_URL, ENV } from "../settings/clientSettings.js" import { CHART_VIEW_PROPS_TO_OMIT, CHART_VIEW_PROPS_TO_PERSIST, @@ -16,7 +16,8 @@ import { diffGrapherConfigs, omit, pick } from "@ourworldindata/utils" // Don't yet show chart views in the admin interface // This is low-stakes - if it shows up anyhow (e.g. on staging servers), it's not a big deal. // TODO: Remove this flag once we're launching this feature -export const chartViewsFeatureEnabled = ENV === "development" +export const chartViewsFeatureEnabled = + ENV === "development" || BAKED_BASE_URL.includes("narrative-") export interface Chart { id: number