Skip to content

Commit 2e94801

Browse files
authored
Merge pull request #664 from castrojo/feat/changelog-layout-improvements
feat(changelogs): redesign changelog page with combined feed and commit view
2 parents 9083f50 + be5900b commit 2e94801

File tree

6 files changed

+444
-184
lines changed

6 files changed

+444
-184
lines changed

scripts/lib/build-metrics.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const TRACKED_WORKFLOWS = [
2121
repo: "ublue-os/bluefin",
2222
workflowId: 125772764,
2323
},
24-
{ name: "bluefin:gts", repo: "ublue-os/bluefin", workflowId: 125772761 },
2524
{ name: "bluefin:latest", repo: "ublue-os/bluefin", workflowId: 146755607 },
2625

2726
// ublue-os/bluefin-lts workflows

scripts/update-driver-versions.js

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function fetchGitHub(url) {
271271
}
272272

273273
/**
274-
* Get latest release for each stream (stable, gts, lts)
274+
* Get latest release for each stream (stable, lts)
275275
*/
276276
async function getLatestReleases() {
277277
console.log("Fetching latest releases from GitHub...");
@@ -297,15 +297,11 @@ async function getLatestReleases() {
297297
r.tag_name.startsWith("stable-"),
298298
);
299299

300-
// Find latest GTS release
301-
const latestGts = bluefinReleases.find((r) => r.tag_name.startsWith("gts-"));
302-
303300
// Find latest LTS release
304301
const latestLts = bluefinLtsReleases[0]; // LTS releases all start with "lts."
305302

306303
return {
307304
stable: latestStable,
308-
gts: latestGts,
309305
lts: latestLts,
310306
};
311307
}
@@ -434,17 +430,15 @@ async function updateDocument() {
434430
const releases = await getLatestReleases();
435431

436432
// Validate releases were found
437-
if (!releases.stable || !releases.gts || !releases.lts) {
433+
if (!releases.stable || !releases.lts) {
438434
console.error("❌ Failed to fetch all required releases");
439435
console.error(" Stable:", releases.stable?.tag_name || "NOT FOUND");
440-
console.error(" GTS:", releases.gts?.tag_name || "NOT FOUND");
441436
console.error(" LTS:", releases.lts?.tag_name || "NOT FOUND");
442437
process.exit(1);
443438
}
444439

445440
console.log("Latest releases:");
446441
console.log("- Stable:", releases.stable.tag_name);
447-
console.log("- GTS:", releases.gts.tag_name);
448442
console.log("- LTS:", releases.lts.tag_name);
449443

450444
// Find the table sections and insert new rows
@@ -500,49 +494,6 @@ async function updateDocument() {
500494
i++;
501495
}
502496
continue;
503-
} else if (line === "## Bluefin GTS") {
504-
// Copy section header
505-
newContent += line + "\n";
506-
i++;
507-
// Skip any blank lines after the section header
508-
while (i < lines.length && lines[i].trim() === "") {
509-
newContent += lines[i] + "\n";
510-
i++;
511-
}
512-
// Copy table header rows
513-
newContent += lines[i] + "\n"; // Table header row 1
514-
i++;
515-
newContent += lines[i] + "\n"; // Table header row 2
516-
i++;
517-
// Check if the first row is already the latest GTS
518-
let firstRowTag = null;
519-
if (i < lines.length && lines[i].startsWith("|")) {
520-
firstRowTag = lines[i].match(/\|\s*\*\*([^*]+)\*\*/)?.[1];
521-
}
522-
if (firstRowTag !== releases.gts.tag_name) {
523-
// Insert new row at the top
524-
const newRow = await formatTableRow(releases.gts, "gts");
525-
newContent += newRow + "\n";
526-
console.log(`✅ Added new GTS release: ${releases.gts.tag_name}`);
527-
} else {
528-
console.log(
529-
`ℹ️ GTS release ${releases.gts.tag_name} already exists at top`,
530-
);
531-
}
532-
533-
// Continue with existing rows, deduplicating by tag name
534-
const seenGtsTags = new Set([releases.gts.tag_name]);
535-
while (i < lines.length && lines[i].startsWith("|")) {
536-
const rowTag = lines[i].match(/\|\s*\*\*([^*]+)\*\*/)?.[1];
537-
if (!rowTag || !seenGtsTags.has(rowTag)) {
538-
if (rowTag) seenGtsTags.add(rowTag);
539-
newContent += lines[i] + "\n";
540-
} else {
541-
console.log(`ℹ️ Skipping duplicate row: ${rowTag}`);
542-
}
543-
i++;
544-
}
545-
continue;
546497
} else if (line === "## Bluefin LTS") {
547498
// Copy section header
548499
newContent += line + "\n";

src/components/CommunityFeeds.module.css

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
.packageSummaryGrid {
2121
display: grid;
22-
grid-template-columns: 1fr 1fr 1fr;
22+
grid-template-columns: repeat(2, minmax(0, 420px));
2323
gap: 2rem;
2424
margin-bottom: 3rem;
25+
justify-content: center;
2526
}
2627

2728
.feedGrid {
28-
display: grid;
29-
grid-template-columns: 1fr 1fr 1fr;
30-
gap: 2rem;
3129
margin-bottom: 3rem;
3230
}
3331

@@ -114,18 +112,13 @@
114112

115113
/* Responsive design */
116114
@media (max-width: 996px) {
117-
.feedGrid {
118-
grid-template-columns: 1fr 1fr;
119-
gap: 1.5rem;
120-
}
121-
122115
.additionalFeedsGrid {
123116
grid-template-columns: 1fr 1fr;
124117
gap: 1.5rem;
125118
}
126119

127120
.packageSummaryGrid {
128-
grid-template-columns: 1fr 1fr;
121+
grid-template-columns: repeat(2, minmax(0, 420px));
129122
gap: 1.5rem;
130123
}
131124

@@ -147,11 +140,6 @@
147140
font-size: 1.75rem;
148141
}
149142

150-
.feedGrid {
151-
grid-template-columns: 1fr;
152-
gap: 1rem;
153-
}
154-
155143
.additionalFeedsGrid {
156144
grid-template-columns: 1fr;
157145
gap: 1rem;

src/components/CommunityFeeds.tsx

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import Layout from "@theme/Layout";
33
import FeedItems from "../components/FeedItems";
4+
import { CombinedFeedItems } from "../components/FeedItems";
45
import PackageSummary from "../components/PackageSummary";
56
import styles from "./CommunityFeeds.module.css";
67

@@ -25,38 +26,27 @@ const CommunityFeeds: React.FC = () => {
2526

2627
{/* Package Summary Boxes */}
2728
<div className={styles.packageSummaryGrid}>
29+
<PackageSummary feedKey="bluefinLtsReleases" title="Bluefin LTS" />
2830
<PackageSummary
2931
feedKey="bluefinReleases"
3032
title="Bluefin"
3133
filter={(item) => item.title.startsWith("stable-")}
3234
/>
33-
<PackageSummary feedKey="bluefinLtsReleases" title="Bluefin LTS" />
3435
</div>
3536

3637
<div className={styles.feedGrid}>
37-
<div className={styles.feedColumn}>
38-
<FeedItems
39-
feedId="bluefinReleases"
40-
title="Bluefin"
41-
maxItems={10}
42-
showDescription={false}
43-
filter={(item) => item.title.startsWith("stable-")}
44-
/>
45-
<p className={styles.sectionByline}>
46-
<em>Utahraptor ostrommaysi</em>
47-
</p>
48-
</div>
49-
<div className={styles.feedColumn}>
50-
<FeedItems
51-
feedId="bluefinLtsReleases"
52-
title="Bluefin LTS"
53-
maxItems={10}
54-
showDescription={false}
55-
/>
56-
<p className={styles.sectionByline}>
57-
<em>Achillobator giganticus</em>
58-
</p>
59-
</div>
38+
<CombinedFeedItems
39+
title="Release Changelogs"
40+
feeds={[
41+
{ feedId: "bluefinLtsReleases", label: "Bluefin LTS" },
42+
{
43+
feedId: "bluefinReleases",
44+
label: "Bluefin",
45+
filter: (item) => item.title.startsWith("stable-"),
46+
},
47+
]}
48+
maxItems={20}
49+
/>
6050
</div>
6151

6252
<div className={styles.additionalFeedsGrid}>

src/components/FeedItems.module.css

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,66 @@
6464
gap: 0.5rem;
6565
}
6666

67+
.feedItemHeader {
68+
display: flex;
69+
align-items: baseline;
70+
gap: 0.6rem;
71+
flex-wrap: wrap;
72+
}
73+
74+
.feedLabel {
75+
display: inline-block;
76+
font-size: 0.7rem;
77+
font-weight: 700;
78+
text-transform: uppercase;
79+
letter-spacing: 0.05em;
80+
padding: 0.2em 0.55em;
81+
border-radius: 3px;
82+
white-space: nowrap;
83+
flex-shrink: 0;
84+
}
85+
86+
.feedLabelBluefin {
87+
background: #0057b8;
88+
color: #ffffff;
89+
}
90+
91+
.feedLabelLts {
92+
background: #5c3d1e;
93+
color: #ffffff;
94+
}
95+
96+
.copyButton {
97+
display: inline-flex;
98+
align-items: center;
99+
justify-content: center;
100+
background: none;
101+
border: 1px solid var(--ifm-color-emphasis-300);
102+
border-radius: 4px;
103+
padding: 0.1em 0.4em;
104+
font-size: 0.8rem;
105+
color: var(--ifm-color-emphasis-500);
106+
cursor: pointer;
107+
opacity: 0;
108+
transition:
109+
opacity 0.15s ease,
110+
color 0.15s ease,
111+
border-color 0.15s ease;
112+
flex-shrink: 0;
113+
line-height: 1;
114+
vertical-align: middle;
115+
}
116+
117+
.feedItem:hover .copyButton {
118+
opacity: 1;
119+
}
120+
121+
.copyButton:hover {
122+
color: var(--ifm-color-primary);
123+
border-color: var(--ifm-color-primary);
124+
background: none;
125+
}
126+
67127
.feedItemTitle {
68128
margin: 0;
69129
font-size: 1.25rem;
@@ -141,6 +201,58 @@
141201
font-weight: 500;
142202
}
143203

204+
.commitList {
205+
display: flex;
206+
flex-direction: column;
207+
gap: 0.25rem;
208+
font-size: 0.82rem;
209+
font-family: var(--ifm-font-family-monospace);
210+
background: var(--ifm-color-emphasis-100);
211+
border-left: 3px solid var(--ifm-color-emphasis-300);
212+
border-radius: 0 4px 4px 0;
213+
padding: 0.4rem 0.6rem;
214+
}
215+
216+
.commitRow {
217+
display: flex;
218+
align-items: baseline;
219+
gap: 0.5rem;
220+
flex-wrap: wrap;
221+
line-height: 1.4;
222+
}
223+
224+
.commitHash {
225+
font-weight: 600;
226+
color: var(--ifm-color-primary);
227+
white-space: nowrap;
228+
flex-shrink: 0;
229+
text-decoration: none;
230+
}
231+
232+
.commitHash:hover {
233+
text-decoration: underline;
234+
}
235+
236+
.commitSubject {
237+
color: var(--ifm-color-emphasis-800);
238+
flex: 1;
239+
min-width: 0;
240+
font-family: var(--ifm-font-family-base);
241+
font-size: 0.82rem;
242+
}
243+
244+
.commitSubject a {
245+
color: var(--ifm-color-primary);
246+
}
247+
248+
.commitAuthor {
249+
color: var(--ifm-color-emphasis-500);
250+
white-space: nowrap;
251+
flex-shrink: 0;
252+
font-family: var(--ifm-font-family-base);
253+
font-size: 0.78rem;
254+
}
255+
144256
/* Responsive design */
145257
@media (max-width: 768px) {
146258
.feedContainer {

0 commit comments

Comments
 (0)