From 6e2c415ad394c5955654722571342a8bd5e18db0 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Wed, 17 Sep 2025 08:12:49 -0500 Subject: [PATCH] [Changelog] Fix multi-product entries bug --- .vscode/settings.json | 8 +++++++- src/pages/changelog/index.astro | 15 +++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 495133435f0f92a..fda2ba223569fd0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,11 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "typescript.tsdk": "node_modules/typescript/lib", "cSpell.enableFiletypes": ["mdx"], - "files.associations": { "__redirects": "plaintext", "_headers": "plaintext" } + "files.associations": { + "__redirects": "plaintext", + "_headers": "plaintext" + }, + "[astro]": { + "editor.defaultFormatter": "astro-build.astro-vscode" + } } diff --git a/src/pages/changelog/index.astro b/src/pages/changelog/index.astro index 72fc6fd20650527..7c75e4665184615 100644 --- a/src/pages/changelog/index.astro +++ b/src/pages/changelog/index.astro @@ -22,13 +22,16 @@ const seen = new Map(); notes = notes.flatMap((note) => { const products = note.data.products.map((product) => product.id); - for (const product of products) { - const previous = seen.get(product) || 0; + // PCX-19256 - We only want to count dedicated entries against the product length, otherwise specific entries can get obscured + if (products.length === 1) { + for (const product of products) { + const previous = seen.get(product) || 0; - seen.set(product, previous + 1); + seen.set(product, previous + 1); - if (previous >= 5) { - return []; + if (previous >= 5) { + return []; + } } } @@ -152,7 +155,7 @@ const props = { const filtered = entries .filter((e) => filterByProduct(e, value)) - .slice(0, 5); + .slice(0, 10); for (const entry of entries) { const show = filtered.includes(entry);