Skip to content

Commit

Permalink
🐝 Clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 authored and sophiamersmann committed Nov 24, 2023
1 parent 020101c commit bde9b05
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions baker/GrapherBaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,16 @@ 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,
publishedExplorersBySlug?: Record<string, ExplorerProgram>,
imageMetadataDictionary?: Record<string, Image>
) => {
// 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)
Expand Down

0 comments on commit bde9b05

Please sign in to comment.