Spaces:
Running
Running
Commit Β·
99cd5bf
1
Parent(s): 9a5ca50
Replace dropdown with category-based benchmark filter UI
Browse files- Replace dropdown menu with inline category pills (Option B layout)
- Benchmarks grouped by category: Math, Knowledge, Coding, Agent, Language, Vision, Embedding
- Click pills to toggle on/off with background color change
- Visual feedback: blue active state, gray inactive (60% opacity)
- Select All/Clear All action buttons on the right
- Mobile-friendly: categories wrap, pills flex within category
- Default: 10/12 benchmarks selected (Vision & Embedding hidden)
- Removed ~60 lines of dropdown code, added ~150 lines for new UI
- index.html +127 -109
index.html
CHANGED
|
@@ -77,18 +77,19 @@ h1{font-size:clamp(20px,3vw,36px);font-weight:800;line-height:1.1;letter-spacing
|
|
| 77 |
.fb:hover{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);}
|
| 78 |
.fb.on{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:transparent;color:#fff;box-shadow:0 3px 12px rgba(99,102,241,.25);}
|
| 79 |
|
| 80 |
-
/*
|
| 81 |
-
.
|
| 82 |
-
.
|
| 83 |
-
.
|
| 84 |
-
.
|
| 85 |
-
.
|
| 86 |
-
.
|
| 87 |
-
.
|
| 88 |
-
.
|
| 89 |
-
.
|
| 90 |
-
.
|
| 91 |
-
.
|
|
|
|
| 92 |
|
| 93 |
/* TABLE */
|
| 94 |
.tw{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto;box-shadow:var(--shadow);margin-bottom:20px;}
|
|
@@ -179,6 +180,11 @@ body.dark tbody tr:hover td.c-model{background:var(--surface-alt)!important;}
|
|
| 179 |
h1{font-size:20px!important;}
|
| 180 |
.toolbar{flex-direction:column;gap:6px;}
|
| 181 |
.search-wrap{max-width:100%;min-width:100%;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
table{font-size:9px;}
|
| 183 |
th,td{padding:6px 3px;}
|
| 184 |
th.c-model,td.c-model{min-width:130px!important;}
|
|
@@ -221,65 +227,71 @@ body.dark tbody tr:hover td.c-model{background:var(--surface-alt)!important;}
|
|
| 221 |
<input type="text" id="searchBox" placeholder="Search models..." oninput="filterModels()">
|
| 222 |
</div>
|
| 223 |
<span class="flbl">Show Benchmarks:</span>
|
| 224 |
-
<div class="
|
| 225 |
-
<
|
| 226 |
-
<span
|
| 227 |
-
<span
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
<button class="
|
| 232 |
-
<button class="dropdown-action" onclick="deselectAllBenchmarks()">Deselect All</button>
|
| 233 |
</div>
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
<
|
| 239 |
-
<
|
| 240 |
-
<
|
| 241 |
-
<
|
| 242 |
-
|
| 243 |
-
<
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
<
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
<
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
<
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
<
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
<div style="flex: 1"></div>
|
|
@@ -2676,50 +2688,60 @@ const BENCHMARK_CATEGORIES = {
|
|
| 2676 |
'evasionBench': 'language'
|
| 2677 |
};
|
| 2678 |
|
| 2679 |
-
//
|
| 2680 |
-
|
| 2681 |
-
const dropdown = document.getElementById('benchmarkDropdown');
|
| 2682 |
-
dropdown.style.display = dropdown.style.display === 'none' ? 'block' : 'none';
|
| 2683 |
-
}
|
| 2684 |
|
| 2685 |
-
|
| 2686 |
-
document.
|
| 2687 |
-
|
| 2688 |
-
|
| 2689 |
-
|
| 2690 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2691 |
}
|
| 2692 |
-
|
| 2693 |
-
|
| 2694 |
-
|
| 2695 |
-
const checkboxes = document.querySelectorAll('#benchmarkDropdown input[type="checkbox"]:checked');
|
| 2696 |
-
return Array.from(checkboxes).map(cb => cb.value);
|
| 2697 |
}
|
| 2698 |
|
| 2699 |
-
function
|
| 2700 |
-
|
| 2701 |
-
|
| 2702 |
|
| 2703 |
-
// Update
|
| 2704 |
-
document.
|
| 2705 |
-
|
| 2706 |
-
|
| 2707 |
-
`${count} selected`;
|
| 2708 |
|
| 2709 |
-
//
|
| 2710 |
filterByBenchmarks(selectedBenchmarks);
|
| 2711 |
}
|
| 2712 |
|
| 2713 |
-
function
|
| 2714 |
-
|
| 2715 |
-
|
| 2716 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2717 |
}
|
| 2718 |
|
| 2719 |
-
function
|
| 2720 |
-
|
| 2721 |
-
|
| 2722 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2723 |
}
|
| 2724 |
|
| 2725 |
function filterByBenchmarks(selectedBenchmarks) {
|
|
@@ -2774,18 +2796,14 @@ function filterByBenchmarks(selectedBenchmarks) {
|
|
| 2774 |
}
|
| 2775 |
|
| 2776 |
function init() {
|
| 2777 |
-
//
|
| 2778 |
-
|
| 2779 |
-
populateTableWithDefaultHidden();
|
| 2780 |
|
| 2781 |
// Load dark mode preference
|
| 2782 |
if (localStorage.getItem('dark') === 'true') {
|
| 2783 |
document.body.classList.add('dark');
|
| 2784 |
document.getElementById('darkBtn').textContent = 'βοΈ Light';
|
| 2785 |
}
|
| 2786 |
-
|
| 2787 |
-
// Initialize dropdown text
|
| 2788 |
-
updateBenchmarkFilter();
|
| 2789 |
}
|
| 2790 |
|
| 2791 |
function populateTableWithDefaultHidden() {
|
|
|
|
| 77 |
.fb:hover{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);}
|
| 78 |
.fb.on{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:transparent;color:#fff;box-shadow:0 3px 12px rgba(99,102,241,.25);}
|
| 79 |
|
| 80 |
+
/* BENCHMARK FILTER */
|
| 81 |
+
.benchmark-filter-wrapper{display:flex;flex-wrap:wrap;gap:12px;align-items:center;flex:1;}
|
| 82 |
+
.benchmark-category{display:flex;align-items:center;gap:6px;}
|
| 83 |
+
.category-icon{font-size:14px;line-height:1;}
|
| 84 |
+
.category-label{font-size:9px;font-family:var(--font-mono);color:var(--text-muted);text-transform:uppercase;letter-spacing:0.5px;font-weight:600;white-space:nowrap;}
|
| 85 |
+
.benchmark-pills{display:flex;gap:4px;flex-wrap:wrap;}
|
| 86 |
+
.benchmark-pill{background:var(--surface-alt);border:1px solid var(--border);color:var(--text-sec);padding:4px 10px;border-radius:16px;font-size:9px;font-weight:600;cursor:pointer;transition:all 0.2s cubic-bezier(0.4,0,0.2,1);font-family:var(--font);white-space:nowrap;box-shadow:var(--shadow-sm);opacity:0.6;}
|
| 87 |
+
.benchmark-pill:hover{border-color:var(--border-hover);transform:translateY(-1px);box-shadow:0 2px 8px rgba(15,23,42,.08);}
|
| 88 |
+
.benchmark-pill.active{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);opacity:1;box-shadow:0 2px 8px rgba(99,102,241,.12);}
|
| 89 |
+
.benchmark-pill.active:hover{background:rgba(99,102,241,.12);border-color:var(--ac);}
|
| 90 |
+
.filter-actions{display:flex;gap:6px;margin-left:auto;}
|
| 91 |
+
.filter-action-btn{background:var(--surface-alt);border:1px solid var(--border);color:var(--text-sec);padding:4px 10px;border-radius:16px;font-size:9px;font-weight:600;cursor:pointer;transition:var(--tr);font-family:var(--font);white-space:nowrap;box-shadow:var(--shadow-sm);}
|
| 92 |
+
.filter-action-btn:hover{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);}
|
| 93 |
|
| 94 |
/* TABLE */
|
| 95 |
.tw{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto;box-shadow:var(--shadow);margin-bottom:20px;}
|
|
|
|
| 180 |
h1{font-size:20px!important;}
|
| 181 |
.toolbar{flex-direction:column;gap:6px;}
|
| 182 |
.search-wrap{max-width:100%;min-width:100%;}
|
| 183 |
+
.benchmark-filter-wrapper{gap:8px;width:100%;}
|
| 184 |
+
.benchmark-category{flex-wrap:wrap;width:100%;}
|
| 185 |
+
.category-label{min-width:60px;}
|
| 186 |
+
.benchmark-pills{flex:1;}
|
| 187 |
+
.filter-actions{width:100%;justify-content:center;margin-left:0;margin-top:4px;}
|
| 188 |
table{font-size:9px;}
|
| 189 |
th,td{padding:6px 3px;}
|
| 190 |
th.c-model,td.c-model{min-width:130px!important;}
|
|
|
|
| 227 |
<input type="text" id="searchBox" placeholder="Search models..." oninput="filterModels()">
|
| 228 |
</div>
|
| 229 |
<span class="flbl">Show Benchmarks:</span>
|
| 230 |
+
<div class="benchmark-filter-wrapper">
|
| 231 |
+
<div class="benchmark-category">
|
| 232 |
+
<span class="category-icon">π</span>
|
| 233 |
+
<span class="category-label">Math</span>
|
| 234 |
+
<div class="benchmark-pills">
|
| 235 |
+
<button class="benchmark-pill active" data-benchmark="gsm8k" onclick="toggleBenchmark('gsm8k')">GSM8K</button>
|
| 236 |
+
<button class="benchmark-pill active" data-benchmark="aime2026" onclick="toggleBenchmark('aime2026')">AIME 2026</button>
|
| 237 |
+
<button class="benchmark-pill active" data-benchmark="hmmt2026" onclick="toggleBenchmark('hmmt2026')">HMMT</button>
|
|
|
|
| 238 |
</div>
|
| 239 |
+
</div>
|
| 240 |
+
|
| 241 |
+
<div class="benchmark-category">
|
| 242 |
+
<span class="category-icon">π§ </span>
|
| 243 |
+
<span class="category-label">Knowledge</span>
|
| 244 |
+
<div class="benchmark-pills">
|
| 245 |
+
<button class="benchmark-pill active" data-benchmark="mmluPro" onclick="toggleBenchmark('mmluPro')">MMLU-Pro</button>
|
| 246 |
+
<button class="benchmark-pill active" data-benchmark="gpqa" onclick="toggleBenchmark('gpqa')">GPQAβ</button>
|
| 247 |
+
<button class="benchmark-pill active" data-benchmark="hle" onclick="toggleBenchmark('hle')">HLE</button>
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
|
| 251 |
+
<div class="benchmark-category">
|
| 252 |
+
<span class="category-icon">π»</span>
|
| 253 |
+
<span class="category-label">Coding</span>
|
| 254 |
+
<div class="benchmark-pills">
|
| 255 |
+
<button class="benchmark-pill active" data-benchmark="sweVerified" onclick="toggleBenchmark('sweVerified')">SWE-V</button>
|
| 256 |
+
<button class="benchmark-pill active" data-benchmark="swePro" onclick="toggleBenchmark('swePro')">SWE-Pro</button>
|
| 257 |
+
</div>
|
| 258 |
+
</div>
|
| 259 |
+
|
| 260 |
+
<div class="benchmark-category">
|
| 261 |
+
<span class="category-icon">π€</span>
|
| 262 |
+
<span class="category-label">Agent</span>
|
| 263 |
+
<div class="benchmark-pills">
|
| 264 |
+
<button class="benchmark-pill active" data-benchmark="terminalBench" onclick="toggleBenchmark('terminalBench')">TB 2.0</button>
|
| 265 |
+
</div>
|
| 266 |
+
</div>
|
| 267 |
+
|
| 268 |
+
<div class="benchmark-category">
|
| 269 |
+
<span class="category-icon">π¬</span>
|
| 270 |
+
<span class="category-label">Language</span>
|
| 271 |
+
<div class="benchmark-pills">
|
| 272 |
+
<button class="benchmark-pill active" data-benchmark="evasionBench" onclick="toggleBenchmark('evasionBench')">EvasionB</button>
|
| 273 |
+
</div>
|
| 274 |
+
</div>
|
| 275 |
+
|
| 276 |
+
<div class="benchmark-category">
|
| 277 |
+
<span class="category-icon">ποΈ</span>
|
| 278 |
+
<span class="category-label">Vision</span>
|
| 279 |
+
<div class="benchmark-pills">
|
| 280 |
+
<button class="benchmark-pill" data-benchmark="olmOcr" onclick="toggleBenchmark('olmOcr')">olmOCR</button>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
|
| 284 |
+
<div class="benchmark-category">
|
| 285 |
+
<span class="category-icon">π</span>
|
| 286 |
+
<span class="category-label">Embedding</span>
|
| 287 |
+
<div class="benchmark-pills">
|
| 288 |
+
<button class="benchmark-pill" data-benchmark="arguana" onclick="toggleBenchmark('arguana')">ArguAna</button>
|
| 289 |
+
</div>
|
| 290 |
+
</div>
|
| 291 |
+
|
| 292 |
+
<div class="filter-actions">
|
| 293 |
+
<button class="filter-action-btn" onclick="selectAllBenchmarks()">Select All</button>
|
| 294 |
+
<button class="filter-action-btn" onclick="deselectAllBenchmarks()">Clear All</button>
|
| 295 |
</div>
|
| 296 |
</div>
|
| 297 |
<div style="flex: 1"></div>
|
|
|
|
| 2688 |
'evasionBench': 'language'
|
| 2689 |
};
|
| 2690 |
|
| 2691 |
+
// Benchmark filter functions
|
| 2692 |
+
let selectedBenchmarks = ['gsm8k', 'mmluPro', 'gpqa', 'hle', 'sweVerified', 'swePro', 'aime2026', 'terminalBench', 'evasionBench', 'hmmt2026'];
|
|
|
|
|
|
|
|
|
|
| 2693 |
|
| 2694 |
+
function toggleBenchmark(benchmarkKey) {
|
| 2695 |
+
const pill = document.querySelector(`.benchmark-pill[data-benchmark="${benchmarkKey}"]`);
|
| 2696 |
+
|
| 2697 |
+
if (selectedBenchmarks.includes(benchmarkKey)) {
|
| 2698 |
+
// Deselect
|
| 2699 |
+
selectedBenchmarks = selectedBenchmarks.filter(b => b !== benchmarkKey);
|
| 2700 |
+
pill.classList.remove('active');
|
| 2701 |
+
} else {
|
| 2702 |
+
// Select
|
| 2703 |
+
selectedBenchmarks.push(benchmarkKey);
|
| 2704 |
+
pill.classList.add('active');
|
| 2705 |
}
|
| 2706 |
+
|
| 2707 |
+
// Update table
|
| 2708 |
+
filterByBenchmarks(selectedBenchmarks);
|
|
|
|
|
|
|
| 2709 |
}
|
| 2710 |
|
| 2711 |
+
function selectAllBenchmarks() {
|
| 2712 |
+
// Get all benchmarks from BENCHMARK_CATEGORIES
|
| 2713 |
+
selectedBenchmarks = Object.keys(BENCHMARK_CATEGORIES);
|
| 2714 |
|
| 2715 |
+
// Update all pills to active
|
| 2716 |
+
document.querySelectorAll('.benchmark-pill').forEach(pill => {
|
| 2717 |
+
pill.classList.add('active');
|
| 2718 |
+
});
|
|
|
|
| 2719 |
|
| 2720 |
+
// Update table
|
| 2721 |
filterByBenchmarks(selectedBenchmarks);
|
| 2722 |
}
|
| 2723 |
|
| 2724 |
+
function deselectAllBenchmarks() {
|
| 2725 |
+
selectedBenchmarks = [];
|
| 2726 |
+
|
| 2727 |
+
// Update all pills to inactive
|
| 2728 |
+
document.querySelectorAll('.benchmark-pill').forEach(pill => {
|
| 2729 |
+
pill.classList.remove('active');
|
| 2730 |
+
});
|
| 2731 |
+
|
| 2732 |
+
// Update table
|
| 2733 |
+
filterByBenchmarks(selectedBenchmarks);
|
| 2734 |
}
|
| 2735 |
|
| 2736 |
+
function initBenchmarkFilter() {
|
| 2737 |
+
// Set initial active states based on selectedBenchmarks array
|
| 2738 |
+
selectedBenchmarks.forEach(benchKey => {
|
| 2739 |
+
const pill = document.querySelector(`.benchmark-pill[data-benchmark="${benchKey}"]`);
|
| 2740 |
+
if (pill) pill.classList.add('active');
|
| 2741 |
+
});
|
| 2742 |
+
|
| 2743 |
+
// Initial table population
|
| 2744 |
+
filterByBenchmarks(selectedBenchmarks);
|
| 2745 |
}
|
| 2746 |
|
| 2747 |
function filterByBenchmarks(selectedBenchmarks) {
|
|
|
|
| 2796 |
}
|
| 2797 |
|
| 2798 |
function init() {
|
| 2799 |
+
// Initialize benchmark filter (defaults to 10 benchmarks selected, excluding vision and embedding)
|
| 2800 |
+
initBenchmarkFilter();
|
|
|
|
| 2801 |
|
| 2802 |
// Load dark mode preference
|
| 2803 |
if (localStorage.getItem('dark') === 'true') {
|
| 2804 |
document.body.classList.add('dark');
|
| 2805 |
document.getElementById('darkBtn').textContent = 'βοΈ Light';
|
| 2806 |
}
|
|
|
|
|
|
|
|
|
|
| 2807 |
}
|
| 2808 |
|
| 2809 |
function populateTableWithDefaultHidden() {
|