diff --git a/scripts/cronjobs/buildchooser.py b/scripts/cronjobs/buildchooser.py index 837ac49b..bfd3c1d5 100644 --- a/scripts/cronjobs/buildchooser.py +++ b/scripts/cronjobs/buildchooser.py @@ -187,7 +187,9 @@ def owner(pid, p): text = ' '.join(str(p.get(k) or '') for k in ('name', 'shortdesc', 'description')) langs = sorted({LANGUAGES.get(l.lower(), 'Other') for l in as_list(p.get('programming-language'))}) - committers = len(groups.get(pmc, [])) or None + # podlings have their own group; 'incubator' is the whole Incubator + group = pid[len('incubator-'):] if pmc == 'incubator' else pmc + committers = len(groups.get(group, [])) or None est = (committees.get(pmc) or {}).get('established', '') rel = last_release(pmc) or last_release(pid) # newest release of anything the committee ships records.append({ @@ -212,13 +214,14 @@ def owner(pid, p): if any(r['id'] == pid or r['id'] == 'incubator-' + pid for r in records): continue text = (p.get('name') or '') + ' ' + (p.get('description') or '') + committers = len(groups.get(pid, [])) or None records.append({ 'id': pid, 'name': p.get('name', pid), 'desc': ' '.join((p.get('description') or '').split())[:300], 'homepage': p.get('homepage'), 'pmc': 'incubator', 'podling': True, 'language': [], 'area': classify([], text, AREAS), 'kind': classify([], text, KINDS), - 'maturity': ['incubating'], 'size': [], 'activity': [], - 'lastRelease': None, 'committers': None, + 'maturity': ['incubating'], 'size': [size_bucket(committers)] if committers else [], + 'activity': [], 'lastRelease': None, 'committers': committers, }) def opts(field, labels): diff --git a/site/chooser.html b/site/chooser.html index cff357b7..44521465 100644 --- a/site/chooser.html +++ b/site/chooser.html @@ -31,6 +31,10 @@ .result h3 { margin: 0 0 4px; } .result .why { font-size: 85%; color: #666; margin-top: 6px; } .result .links a { margin-right: 12px; font-size: 90%; } + .result.new { animation: fadein .4s; } + @keyframes fadein { from { opacity: 0; transform: translateY(-4px); } } + #matches-h { margin-top: 28px; margin-bottom: 4px; } + #shown { color: #666; font-size: 90%; margin-top: 0; } .score { float: right; font-size: 85%; color: #c6262e; } .mock { background: #fff6d5; border: 1px solid #e6c84f; padding: 8px 12px; border-radius: 4px; font-size: 90%; } @@ -50,6 +54,13 @@
No matches - try going back and loosening an answer.
+Your choices: ${parts.join(' ')}
` : ''; } -function showResults() { - document.getElementById('prog').style.width = '100%'; - const asked = Object.entries(answers).filter(([k, v]) => v.length && isFilter(k)).length; - const ranked = DATA.projects.map(p => ({p, ...score(p)})) - .filter(r => r.s > 0 || !asked) - .sort((a, b) => b.s - a.s || (b.p.committers || 0) - (a.p.committers || 0)) - .slice(0, SHOW); - const html = ranked.map(({p, s, why}) => `No matches - try going back and loosening an answer.
'} - ${gettingStarted()} - `; + cards.set(p.id, el); + return el; +} + +// Update the match list in place: drop cards that fell out of the top +// SHOW, move the rest into rank order, and fade in newcomers. +function showMatches(ans, what) { + const asked = Object.entries(ans).filter(([k, v]) => v.length && isFilter(k)).length; + const all = DATA.projects.map(p => ({p, s: score(p, ans)})) + .filter(r => r.s > 0 || !asked) + .sort((a, b) => b.s - a.s || (b.p.committers || 0) - (a.p.committers || 0)); + const ranked = all.slice(0, SHOW); + const list = document.getElementById('list'); + const keep = new Set(ranked.map(r => r.p.id)); + [...list.children].forEach(el => { if (!keep.has(el.dataset.id)) el.remove(); }); + ranked.forEach(({p, s}, i) => { + const el = card(p); + el.querySelector('.score').textContent = asked ? `matches ${s} of ${asked}` : ''; + if (!el.isConnected) { el.classList.remove('new'); void el.offsetWidth; el.classList.add('new'); } + if (list.children[i] !== el) list.insertBefore(el, list.children[i] || null); + }); + document.getElementById('matches-h').textContent = all.length > SHOW + ? `Top ${SHOW} ${what}` : what[0].toUpperCase() + what.slice(1); + // Always say that this is only the top of the list, not every match. + document.getElementById('shown').textContent = all.length <= SHOW + ? `Showing all ${all.length} matching communities.` + : `Showing only the top ${SHOW} of ${all.length} ${asked + ? 'communities that match at least one of your answers, ranked by how many they match, then by community size' + : 'communities, largest first'}.${ + document.getElementById('next') ? ' Answer more questions to narrow it down.' : ''}`; + document.getElementById('shown').hidden = !all.length; + document.getElementById('empty').hidden = ranked.length > 0; + document.getElementById('matches').hidden = false; +} + +function showResults() { + document.getElementById('prog').style.width = '100%'; + $s().innerHTML = `` + answerSummary(); + showMatches(answers, 'projects you might like'); + document.getElementById('advice').innerHTML = gettingStarted(); document.getElementById('restart').onclick = () => { answers = {}; history = []; render(); }; const b = document.getElementById('back'); if (b) b.onclick = back; } diff --git a/site/json/foundation/chooser.json b/site/json/foundation/chooser.json index 7e339c8c..4dc0af33 100644 --- a/site/json/foundation/chooser.json +++ b/site/json/foundation/chooser.json @@ -1,5 +1,5 @@ { - "generated": "2026-10-30 18:01 UTC", + "generated": "2026-10-30 20:37 UTC", "questions": [ { "id": "area", @@ -215,17 +215,17 @@ { "value": "small", "label": "Small - where every contribution is noticed", - "count": 66 + "count": 85 }, { "value": "medium", "label": "Medium", - "count": 109 + "count": 114 }, { "value": "large", "label": "Large - lots of people to learn from", - "count": 63 + "count": 39 } ] }, @@ -492,13 +492,13 @@ "incubating" ], "size": [ - "large" + "medium" ], "activity": [ "active" ], "lastRelease": "2025-08-28", - "committers": 4284 + "committers": 27 }, { "id": "answer", @@ -690,13 +690,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-10-25", - "committers": 4284 + "committers": 9 }, { "id": "atlas", @@ -853,13 +853,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "active" ], "lastRelease": "2025-12-30", - "committers": 4284 + "committers": 11 }, { "id": "bigtop", @@ -1010,13 +1010,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-08-25", - "committers": 4284 + "committers": 10 }, { "id": "bval", @@ -1089,13 +1089,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": null, - "committers": 4284 + "committers": 9 }, { "id": "camel", @@ -1169,13 +1169,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-10-13", - "committers": 4284 + "committers": 13 }, { "id": "cassandra", @@ -1327,13 +1327,13 @@ "incubating" ], "size": [ - "large" + "medium" ], "activity": [ "active" ], "lastRelease": "2026-04-13", - "committers": 4284 + "committers": 34 }, { "id": "cloudstack", @@ -2055,13 +2055,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-10-07", - "committers": 4284 + "committers": 13 }, { "id": "fineract", @@ -2281,13 +2281,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-06-10", - "committers": 4284 + "committers": 13 }, { "id": "geode", @@ -2438,13 +2438,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "active" ], "lastRelease": "2025-08-19", - "committers": 4284 + "committers": 14 }, { "id": "gravitino", @@ -2591,13 +2591,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-07-14", - "committers": 4284 + "committers": 10 }, { "id": "hbase", @@ -3289,13 +3289,13 @@ "incubating" ], "size": [ - "large" + "medium" ], "activity": [ "active" ], "lastRelease": "2026-03-29", - "committers": 4284 + "committers": 66 }, { "id": "knox", @@ -3653,13 +3653,13 @@ "incubating" ], "size": [ - "large" + "medium" ], "activity": [ "very" ], "lastRelease": "2026-10-30", - "committers": 4284 + "committers": 29 }, { "id": "manifoldcf", @@ -3901,13 +3901,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": null, - "committers": 4284 + "committers": 6 }, { "id": "nutch", @@ -4146,13 +4146,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": null, - "committers": 4284 + "committers": 14 }, { "id": "openwebbeans", @@ -4246,13 +4246,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": null, - "committers": 4284 + "committers": 17 }, { "id": "incubator-otava", @@ -4267,13 +4267,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-05-08", - "committers": 4284 + "committers": 8 }, { "id": "incubator-ozhera", @@ -4288,13 +4288,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-06-05", - "committers": 4284 + "committers": 14 }, { "id": "ozone", @@ -4416,13 +4416,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": "2023-12-11", - "committers": 4284 + "committers": 19 }, { "id": "pekko", @@ -4692,13 +4692,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": null, - "committers": 4284 + "committers": 10 }, { "id": "pulsar", @@ -5102,13 +5102,13 @@ "incubating" ], "size": [ - "large" + "medium" ], "activity": [ "active" ], "lastRelease": "2026-01-28", - "committers": 4284 + "committers": 49 }, { "id": "seatunnel", @@ -5843,13 +5843,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-08-11", - "committers": 4284 + "committers": 16 }, { "id": "tez", @@ -6038,13 +6038,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "quiet" ], "lastRelease": "2022-02-16", - "committers": 4284 + "committers": 12 }, { "id": "trafficserver-traffic-server", @@ -6502,13 +6502,13 @@ "incubating" ], "size": [ - "large" + "small" ], "activity": [ "very" ], "lastRelease": "2026-08-24", - "committers": 4284 + "committers": 12 }, { "id": "yetus",