diff --git a/src/components/changelog/Card.astro b/src/components/changelog/Card.astro index a637d326..0261f7a6 100644 --- a/src/components/changelog/Card.astro +++ b/src/components/changelog/Card.astro @@ -19,6 +19,14 @@ function embedGithubVideos(html: string): string { `` ); } + +type EntryTag = { name: string; description?: string }; + +// The description (product name) leads the tag list, ahead of the type tags. +function entryTags(entry: ChangelogProps): EntryTag[] { + const labels = entry.labels?.nodes ?? []; + return entry.product ? [{ name: entry.product }, ...labels] : labels; +} ---
@@ -69,35 +77,30 @@ function embedGithubVideos(html: string): string {
- {entry.product && {entry.product}} +

{entry.title}

-
- - {entry.labels && entry.labels.nodes.length > 0 && ( -
- {entry.labels.nodes.map((label) => ( -
- - {label.name} - - {label.description && ( - - {label.description} - - )} -
- ))} -
- )} -
+ {entryTags(entry).length > 0 && ( +
+ {entryTags(entry).map((label) => ( +
+ + {label.name} + + {label.description && ( + {label.description} + )} +
+ ))} +
+ )}
diff --git a/src/static/styles/components-changelog.css b/src/static/styles/components-changelog.css index e15ca460..81ea870e 100644 --- a/src/static/styles/components-changelog.css +++ b/src/static/styles/components-changelog.css @@ -144,21 +144,13 @@ @apply flex min-w-0 flex-col gap-4; } - /* Product eyebrow above the title; -mb-2 tightens the nav-content gap to pair it with the title */ - .changelog-entry-nav-product { - @apply datum-text-smallcaps text-canyon-clay -mb-2 uppercase; - } - .changelog-entry-nav-title { @apply text-midnight-fjord m-0 font-semibold xl:text-(length:--30px) xl:leading-(--42px); } - .changelog-entry-nav-date-row { - @apply flex flex-col gap-2; - } - + /* Date as the kicker above the title; -mb-2 tightens the nav-content gap to pair it with the title */ .changelog-entry-nav-date { - @apply datum-text-smallcaps text-app---dark---utility-3 uppercase; + @apply datum-text-smallcaps text-canyon-clay -mb-2 uppercase; } .changelog-entry-card { @@ -176,12 +168,12 @@ .changelog-entry-card-body { @apply datum-prose-longform text-midnight-fjord min-w-0; + & > :first-child { + @apply mt-0; + } + h2 { @apply datum-text-2xl mt-8 mb-5 font-semibold; - - &:first-child { - @apply mt-0; - } } h3 {