diff --git a/.vscode/launch.json b/.vscode/launch.json index 3c970f69a7..935c027c97 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -26,7 +26,7 @@ "--watch" ], "console": "integratedTerminal", - "runtimeExecutable": "/run/user/1000/fnm_multishells/6623_1737371412748/bin/node" + "runtimeExecutable": "/run/user/1000/fnm_multishells/1917_1737561874408/bin/node" // "internalConsoleOptions": "neverOpen" }, { diff --git a/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx b/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx index 5c28c54b48..1b3d6ebdc4 100644 --- a/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/FetchingGrapher.tsx @@ -38,7 +38,6 @@ export function FetchingGrapher( // update grapherState when the config from props changes React.useEffect(() => { - console.log("updating grapherState bounds", props.config?.bounds) if (props.config?.bounds) grapherState.current.externalBounds = props.config.bounds }, [props.config?.bounds]) diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts b/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts index 0ef856f7fc..da249696f3 100755 --- a/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts +++ b/packages/@ourworldindata/grapher/src/core/Grapher.jsdom.test.ts @@ -36,10 +36,7 @@ import { OwidDistinctLinesColorScheme, } from "../color/CustomSchemes" import { latestGrapherConfigSchema } from "./GrapherConstants.js" -import { - legacyToOwidTableAndDimensions, - legacyToOwidTableAndDimensionsWithMandatorySlug, -} from "./LegacyToOwidTable.js" +import { legacyToOwidTableAndDimensionsWithMandatorySlug } from "./LegacyToOwidTable.js" const TestGrapherConfig = (): { table: OwidTable diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index 81a2e29d44..244090a55d 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -150,7 +150,7 @@ import { FullScreen } from "../fullScreen/FullScreen" import { isOnTheMap } from "../mapCharts/EntitiesOnTheMap" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome/index.js" import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons" -import { SettingsMenu, SettingsMenuManager } from "../controls/SettingsMenu" +import { SettingsMenu } from "../controls/SettingsMenu" import { TooltipContainer } from "../tooltip/Tooltip" import { EntitySelectorModal } from "../modal/EntitySelectorModal" import { DownloadModal } from "../modal/DownloadModal" @@ -1880,13 +1880,13 @@ export class GrapherState { } @computed get isEntitySelectorPanelActive(): boolean { - console.log("isEntitySelectorPanelActive", { - hideEntityControls: this.hideEntityControls, - canChangeAddOrHighlightEntities: - this.canChangeAddOrHighlightEntities, - isOnChartTab: this.isOnChartTab, - showEntitySelectorAs: this.showEntitySelectorAs, - }) + // console.log("isEntitySelectorPanelActive", { + // hideEntityControls: this.hideEntityControls, + // canChangeAddOrHighlightEntities: + // this.canChangeAddOrHighlightEntities, + // isOnChartTab: this.isOnChartTab, + // showEntitySelectorAs: this.showEntitySelectorAs, + // }) return ( !this.hideEntityControls && this.canChangeAddOrHighlightEntities && @@ -1899,14 +1899,14 @@ export class GrapherState { private framePaddingVertical = GRAPHER_FRAME_PADDING_VERTICAL @computed get showEntitySelectorAs(): GrapherWindowType { - console.log("showEntitySelectorAs", { - isEmbeddedInAnOwidPage: this.isEmbeddedInAnOwidPage, - isEmbeddedInADataPage: this.isEmbeddedInADataPage, - isSemiNarrow: this.isSemiNarrow, - isInFullScreenMode: this.isInFullScreenMode, - frameBounds: this.frameBounds, - isIFrame: this.isInIFrame, - }) + // console.log("showEntitySelectorAs", { + // isEmbeddedInAnOwidPage: this.isEmbeddedInAnOwidPage, + // isEmbeddedInADataPage: this.isEmbeddedInADataPage, + // isSemiNarrow: this.isSemiNarrow, + // isInFullScreenMode: this.isInFullScreenMode, + // frameBounds: this.frameBounds, + // isIFrame: this.isInIFrame, + // }) if ( //this.frameBounds.width > 940 && // don't use the panel if the grapher is embedded diff --git a/packages/@ourworldindata/grapher/src/dataTable/DataTable.sample.ts b/packages/@ourworldindata/grapher/src/dataTable/DataTable.sample.ts index 1c5666bb56..b808c8557d 100644 --- a/packages/@ourworldindata/grapher/src/dataTable/DataTable.sample.ts +++ b/packages/@ourworldindata/grapher/src/dataTable/DataTable.sample.ts @@ -138,14 +138,19 @@ export const GrapherWithAggregates = ( property: DimensionProperty.y, }, ] + const inputTable = legacyToOwidTableAndDimensionsWithMandatorySlug( + createOwidTestDataset([ + { metadata: childMortalityMetadata, data: childMortalityData }, + ]), + dimensions, + {} + ) return new GrapherState({ tab: GRAPHER_TAB_OPTIONS.table, dimensions, selectedEntityNames: ["Afghanistan", "Iceland", "World"], ...props, - owidDataset: createOwidTestDataset([ - { metadata: childMortalityMetadata, data: childMortalityData }, - ]), + table: inputTable, }) } @@ -182,14 +187,18 @@ export const GrapherWithMultipleVariablesAndMultipleYears = ( { year: 2019, entity: fakeEntities.World, value: 10 }, ], } - + const inputTable = legacyToOwidTableAndDimensionsWithMandatorySlug( + createOwidTestDataset([ + abovePovertyLineDataset, + belowPovertyLineDataset, + ]), + dimensions, + {} + ) return new GrapherState({ tab: GRAPHER_TAB_OPTIONS.table, dimensions, ...props, - owidDataset: createOwidTestDataset([ - abovePovertyLineDataset, - belowPovertyLineDataset, - ]), + table: inputTable, }) } diff --git a/site/GrapherFigureView.tsx b/site/GrapherFigureView.tsx index 0c6f98ea29..abfcde1b7e 100644 --- a/site/GrapherFigureView.tsx +++ b/site/GrapherFigureView.tsx @@ -23,7 +23,6 @@ export function GrapherFigureView(props: GrapherFigureViewProps): JSX.Element { const base = useRef(null) const bounds = useElementBounds(base) - console.log("bounds", bounds) const config: GrapherProgrammaticInterface = { ...props.config,