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

🎉 "new" label for articles on the homepage #4550

Merged
merged 4 commits into from
Feb 13, 2025
Merged

🎉 "new" label for articles on the homepage #4550

merged 4 commits into from
Feb 13, 2025

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Feb 10, 2025

Resolves #3495

Changes:

  1. Adds an isNew property to featured article cards in the homepage-intro component
  2. Adds a util to validate raw boolean properties, and uses it in all relevant locations in rawToEnriched.ts

Preview

image

To test

Copy-paste the homepage-intro component from the OWID Homepage document into your own testing gdoc, and update the type front-matter to homepage. Add isNew: true to as many cards as you'd like.

@ikesau ikesau requested a review from rakyi February 10, 2025 22:52
@owidbot
Copy link
Contributor

owidbot commented Feb 10, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-new-kicker

SVG tester:

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

Edited: 2025-02-10 23:08:25 UTC
Execution time: 1.17 seconds

packages/@ourworldindata/utils/src/Util.ts Outdated Show resolved Hide resolved
@ikesau ikesau merged commit 451e2e5 into master Feb 13, 2025
27 checks passed
@ikesau ikesau deleted the new-kicker branch February 13, 2025 16:52
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.

Add "New" labels in thumbnails for our Featured Work in the homepage
3 participants