Skip to content

Commit

Permalink
✨ (gdocs) add description
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Jan 29, 2024
1 parent 53dc9cb commit 8dc037c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/@ourworldindata/types/src/gdocTypes/Gdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface LinkedIndicator {
dateRange?: string
lastUpdated?: string
attributionUnshortened?: string
descriptionShort?: string
}

export enum OwidGdocType {
Expand Down
1 change: 1 addition & 0 deletions packages/@ourworldindata/utils/src/metadataHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,6 @@ export function grabMetadataForGdocLinkedIndicator(
attributions: getAttributionFragmentsFromVariable(metadata),
origins: metadata.origins ?? [],
}),
descriptionShort: metadata.descriptionShort,
}
}
7 changes: 7 additions & 0 deletions site/gdocs/components/KeyIndicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
color: $blue-90;
}

.description {
@include body-3-medium;
color: $blue-60;
margin-top: 0;
margin-bottom: 16px;
}

.datapage-link {
@include body-3-medium;

Expand Down
5 changes: 5 additions & 0 deletions site/gdocs/components/KeyIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ export default function KeyIndicator({
</div>
)}
</div>
{linkedIndicator.descriptionShort && (
<p className="description">
{linkedIndicator.descriptionShort}
</p>
)}
<a
className="datapage-link datapage-link-desktop"
href={d.datapageUrl}
Expand Down

0 comments on commit 8dc037c

Please sign in to comment.