From 14a310808018fcc4ade02b283e23c034e7439f81 Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Thu, 23 Jan 2025 15:43:59 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20removing=20static=20exports=20PR=20?= =?UTF-8?q?improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baker/formatWordpressPost.tsx | 2 +- ops/buildkite/deploy-content | 3 ++- site/multiembedder/MultiEmbedder.tsx | 3 --- site/search/ChartHit.tsx | 8 +++----- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/baker/formatWordpressPost.tsx b/baker/formatWordpressPost.tsx index cc4d190a5b..f584e9f30f 100644 --- a/baker/formatWordpressPost.tsx +++ b/baker/formatWordpressPost.tsx @@ -213,7 +213,7 @@ export const formatWordpressPost = async ( ReactDOMServer.renderToStaticMarkup(
) diff --git a/ops/buildkite/deploy-content b/ops/buildkite/deploy-content index d9bd10dbf4..609a1c64ab 100755 --- a/ops/buildkite/deploy-content +++ b/ops/buildkite/deploy-content @@ -98,7 +98,8 @@ deploy_to_cloudflare() { create_dist() { echo '--- Creating dist/ folder' # Define a list of excluded directories for rsync - EXCLUDES=(grapher/data/variables/ .git/ exports/ uploads/ assets-admin/) + # grapher/exports/ should be removed once #4464 is merged and we've deleted the static exports folder + EXCLUDES=(grapher/data/variables/ .git/ grapher/exports/ exports/ uploads/ assets-admin/) # Build rsync command with excluded directories RSYNC_COMMAND=("rsync" "-havzq" "--delete") diff --git a/site/multiembedder/MultiEmbedder.tsx b/site/multiembedder/MultiEmbedder.tsx index cbb96c4b63..d0125fa9e8 100644 --- a/site/multiembedder/MultiEmbedder.tsx +++ b/site/multiembedder/MultiEmbedder.tsx @@ -299,9 +299,6 @@ class MultiEmbedder { ? "chartView" : "grapher" - const hasPreview = isExplorer ? false : !!figure.querySelector("img") - if (hasPreview) return - // Stop observing visibility as soon as possible this.figuresObserver?.unobserve(figure) diff --git a/site/search/ChartHit.tsx b/site/search/ChartHit.tsx index 0a1a5fdc45..ba1108721e 100644 --- a/site/search/ChartHit.tsx +++ b/site/search/ChartHit.tsx @@ -67,15 +67,13 @@ export function ChartHit({ slug: string, fullQueryParams: string ): string { - return `${EXPLORER_DYNAMIC_THUMBNAIL_URL}/${slug}.svg${fullQueryParams}` + return `${EXPLORER_DYNAMIC_THUMBNAIL_URL}/${slug}.png${fullQueryParams}` } function createGrapherThumbnailUrl( slug: string, - fullQueryParams?: string + fullQueryParams = "" ): string { - return fullQueryParams - ? `${GRAPHER_DYNAMIC_THUMBNAIL_URL}/${slug}.svg${fullQueryParams}` - : `${GRAPHER_DYNAMIC_THUMBNAIL_URL}/${slug}.svg` + return `${GRAPHER_DYNAMIC_THUMBNAIL_URL}/${slug}.png${fullQueryParams}` } const previewUrl = isExplorerView ? createExplorerViewThumbnailUrl(hit.slug, fullQueryParams)