Skip to content

Commit

Permalink
✨ removing static exports PR improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesau committed Jan 23, 2025
1 parent 43b8c80 commit 14a3108
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion baker/formatWordpressPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const formatWordpressPost = async (
ReactDOMServer.renderToStaticMarkup(
<figure data-explorer-src={src} className={cssClass}>
<img
src={`${EXPLORER_DYNAMIC_THUMBNAIL_URL}/${url.slug}.png`}
src={`${EXPLORER_DYNAMIC_THUMBNAIL_URL}/${url.slug}.png${url.queryStr}`}
/>
</figure>
)
Expand Down
3 changes: 2 additions & 1 deletion ops/buildkite/deploy-content
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 0 additions & 3 deletions site/multiembedder/MultiEmbedder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 3 additions & 5 deletions site/search/ChartHit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 14a3108

Please sign in to comment.