-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
✨ all-charts block updates #4514
Conversation
17e1039
to
36da2f2
Compare
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2025-01-31 23:00:50 UTC |
baker/siteRenderers.tsx
Outdated
@@ -414,6 +414,7 @@ ${dataInsights | |||
homepageMetadata: get(post, "homepageMetadata", {}), | |||
latestWorkLinks: get(post, "latestWorkLinks", []), | |||
linkedChartViews: get(post, "linkedChartViews", {}), | |||
tags: get(post, "tags", []) ?? [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already pass the default value ([]
) to get
, so we don't need the ?? []
.
site/gdocs/OwidGdoc.tsx
Outdated
@@ -94,6 +94,7 @@ export function OwidGdoc({ | |||
homepageMetadata: get(props, "homepageMetadata", {}), | |||
latestWorkLinks: get(props, "latestWorkLinks", []), | |||
linkedChartViews: get(props, "linkedChartViews", {}), | |||
tags: get(props, "tags", []) ?? [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already pass the default value ([]
) to get
, so we don't need the ?? []
.
site/gdocs/components/AllCharts.scss
Outdated
// Any value smaller than -16 causes the h1 to wrap in Firefox | ||
margin-left: -16px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I played with this in Firefox and the negative margin seems unnecessary. Are you sure we need it?
site/gdocs/components/AllCharts.tsx
Outdated
<a | ||
className="deep-link" | ||
aria-labelledby={ALL_CHARTS_ID} | ||
href={`#${ALL_CHARTS_ID}`} | ||
/> | ||
</h1> | ||
<a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the existing Button
component here?
@@ -414,7 +414,8 @@ ${dataInsights | |||
homepageMetadata: get(post, "homepageMetadata", {}), | |||
latestWorkLinks: get(post, "latestWorkLinks", []), | |||
linkedChartViews: get(post, "linkedChartViews", {}), | |||
tags: get(post, "tags", []) ?? [], | |||
// lodash doesn't use fallback when value is null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this was confusing.
Resolves #4426
Changes
tags
to the gdoc AttachmentsContextall.charts.demo.mp4