From bde9b058489631b5d68ed2db82f6794045ad833a Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Fri, 24 Nov 2023 18:49:59 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9D=20Clean=20up=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baker/GrapherBaker.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/baker/GrapherBaker.tsx b/baker/GrapherBaker.tsx index 981f0e8a53c..a6a44055521 100644 --- a/baker/GrapherBaker.tsx +++ b/baker/GrapherBaker.tsx @@ -67,10 +67,6 @@ import { isEmpty } from "lodash" /** * * Render a datapage if available, otherwise render a grapher page. - * - * Rendering a datapage requires a datapage JSON file to be present in the - * owid-content repository, and optionally a companion gdoc to be registered in - * the posts_gdocs table */ export const renderDataPageOrGrapherPage = async ( grapher: GrapherInterface, @@ -78,9 +74,9 @@ export const renderDataPageOrGrapherPage = async ( imageMetadataDictionary?: Record ) => { // If we have a single Y variable and that one has a schema version >= 2, - // meaning it has the metadata to render a datapage, then we show the datapage - // based on this information. Otherwise we see if there is a legacy datapage.json - // available and if all else fails we render a classic Grapher page. + // meaning it has the metadata to render a datapage, AND if the metadata includes + // text for at least one of the description* fields or titlePublic, then we show the datapage + // based on this information. const yVariableIds = grapher .dimensions!.filter((d) => d.property === DimensionProperty.y) .map((d) => d.variableId)