Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data download handling for multi-dims #4495

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Add data download handling for multi-dims #4495

merged 2 commits into from
Jan 29, 2025

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Jan 28, 2025

Resolves #4457

Copy link
Contributor Author

rakyi commented Jan 28, 2025

@rakyi rakyi requested a review from marcelgerber January 28, 2025 10:51
@rakyi rakyi marked this pull request as ready for review January 28, 2025 10:51
@@ -265,10 +269,10 @@ export function constructReadme(

const downloadDate = formatDate(new Date()) // formats the date as "October 10, 2024"
if (isSingleColumn)
readme = `# ${grapher.title} - Data package
readme = `# ${grapher.displayTitle} - Data package
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grapher.title is undefined for mdims. The title we show in the UI gets set after we fetch the indicator metadata, so we have to use grapher.displayTitle. This should be safe also for normal graphers, since we return grapher.title from grapher.displayTitle, if it exists.

@@ -295,6 +299,9 @@ export const MultiDimDataPageContent = ({
const grapherConfigComputed = useMemo(() => {
const baseConfig: GrapherProgrammaticInterface = {
bounds,
bakedGrapherURL: BAKED_GRAPHER_URL,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this for constructing the URLs we show in the downloads modal.

Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

functions/_common/grapherTools.ts Outdated Show resolved Hide resolved
@owidbot
Copy link
Contributor

owidbot commented Jan 28, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-mdim-data-download

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-01-28 11:06:53 UTC
Execution time: 1.25 seconds

@rakyi rakyi linked an issue Jan 28, 2025 that may be closed by this pull request
Copy link
Contributor Author

rakyi commented Jan 29, 2025

Merge activity

  • Jan 29, 6:09 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 29, 6:12 AM EST: Graphite rebased this pull request as part of a merge.
  • Jan 29, 6:13 AM EST: A user merged this pull request with Graphite.

@rakyi rakyi changed the base branch from mdim-thumbnails to graphite-base/4495 January 29, 2025 11:09
@rakyi rakyi changed the base branch from graphite-base/4495 to master January 29, 2025 11:10
@rakyi rakyi force-pushed the mdim-data-download branch from 080c5e9 to 41f7052 Compare January 29, 2025 11:11
@rakyi rakyi merged commit ed56128 into master Jan 29, 2025
17 of 19 checks passed
@rakyi rakyi deleted the mdim-data-download branch January 29, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data download for multidimensional data page views
3 participants