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

✨ Data catalog client #3858

Merged
merged 85 commits into from
Sep 19, 2024
Merged

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Aug 7, 2024

Staging
Figma

image

Changes

  • Removes the /charts page
  • Adds a redirect from /charts to /data
  • Adds a DataCatalog page and DataCatalog component
  • Increases the owid.css bundlewatch limit to 250KB
  • Adds new analytics events for datacatalog navigation and result selection
  • Adds a useFocusTrap hook

@owidbot
Copy link
Contributor

owidbot commented Aug 7, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-data-catalog-algolia-client

SVG tester:

Number of differences (default views): 4523 (f7dd60) ❌
Number of differences (all views): 1622 (93acd2) ❌

Edited: 2024-09-17 23:09:56 UTC
Execution time: 1.24 seconds

Copy link

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added stale and removed stale labels Aug 22, 2024
@ikesau ikesau force-pushed the data-catalog-algolia-client branch 3 times, most recently from f571a36 to 9fd41fd Compare September 11, 2024 19:31
@ikesau ikesau marked this pull request as ready for review September 11, 2024 20:00
@ikesau ikesau requested a review from rakyi September 11, 2024 20:00
@rakyi
Copy link
Contributor

rakyi commented Sep 12, 2024

@ikesau
Copy link
Member Author

ikesau commented Sep 12, 2024

Oh, weird! Maybe because the bake failed? Lemme try again..

Copy link
Contributor

@rakyi rakyi left a comment

Choose a reason for hiding this comment

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

Great job! I don't see any major problems, but I left a few comments for possible small improvements we might still do.

Also, could you add docs on how to run the catalog locally?

Areas of possible improvements/potential follow-ups (some of which we already discussed) for the future:

  • Handling out-of-order/slow requests and request cancellation when fetching data - I'm mostly worried about this, but I'm not sure if it's gonna really be a problem in practice
  • Ordering query params when creating the cache key, so their order won't matter, and they'd use a single cache key
  • Reusing existing checkbox component
  • Storing search state in the URL only, instead of syncing between URL and React state

Possible 3rd party solutions to some of these problems:

  • React Router hooks to use URL for state and relatedly avoid handling mutable global history state + global event listeners
  • react-query for data fetching, cache, request cancellation etc.

packages/@ourworldindata/utils/src/Util.ts Show resolved Hide resolved
baker/siteRenderers.tsx Show resolved Hide resolved
site/DataCatalog/DataCatalogUtils.ts Outdated Show resolved Hide resolved
site/DataCatalog/DataCatalogUtils.ts Outdated Show resolved Hide resolved
site/DataCatalog/DataCatalog.tsx Outdated Show resolved Hide resolved
site/DataCatalog/DataCatalog.scss Show resolved Hide resolved
import React from "react"
import cx from "classnames"

// 💀 Beware! Spooky skeletons for the data catalog 💀
Copy link
Contributor

Choose a reason for hiding this comment

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

This made me smile 😄

@ikesau ikesau merged commit 464d583 into data-catalog-algolia Sep 19, 2024
13 of 15 checks passed
@ikesau ikesau deleted the data-catalog-algolia-client branch September 19, 2024 13:27
@ikesau ikesau mentioned this pull request Sep 19, 2024
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.

3 participants