Skip to content

Commit 00e9d04

Browse files
chhzh123claude
andcommitted
Improve bar chart code buttons and fix bar alignment
- Replace hidden-on-hover icon with always-visible '</> Code' chip styled in accent color (indigo) for the 10 models with solvers - Add fixed-width .bar-btn-slot (76px) on every row so all bars end at the same horizontal position regardless of solver availability - Change 'Equal contribution' footnote to 'Core contributor' Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f221a4d commit 00e9d04

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

index.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,20 @@
557557
transition: all 0.15s; font-family: inherit; white-space: nowrap;
558558
}
559559
.code-view-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
560-
/* code icon in bar chart */
560+
/* code slot in bar chart — fixed width so all bars align */
561+
.bar-btn-slot { width: 76px; flex-shrink: 0; }
561562
.bar-code-btn {
562-
flex-shrink: 0; padding: 0.1rem 0.4rem; font-size: 0.7rem;
563-
border-radius: 0.3rem; border: 1px solid var(--border);
564-
background: white; color: var(--text-muted); cursor: pointer;
565-
transition: all 0.15s; font-family: inherit; opacity: 0;
563+
display: inline-flex; align-items: center; gap: 0.25rem;
564+
width: 100%; padding: 0.18rem 0; font-size: 0.72rem; font-weight: 600;
565+
justify-content: center;
566+
border-radius: 0.3rem; border: 1px solid #C7D2FE;
567+
background: var(--accent-light); color: var(--accent); cursor: pointer;
568+
transition: all 0.15s; font-family: inherit;
569+
}
570+
.bar-code-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
571+
.bar-no-code {
572+
display: inline-block; width: 100%; height: 22px;
566573
}
567-
.bar-row:hover .bar-code-btn { opacity: 1; }
568-
.bar-code-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); opacity: 1; }
569574

570575
/* ── FOOTER ── */
571576
footer {
@@ -643,7 +648,7 @@
643648
<a href="https://www.cs.cornell.edu/gomes/" target="_blank">Carla P. Gomes</a>,
644649
<a href="https://www.csl.cornell.edu/~zhiruz/" target="_blank">Zhiru Zhang</a>
645650
</div>
646-
<div class="authors-note"><sup>*</sup> Equal contribution</div>
651+
<div class="authors-note"><sup>*</sup> Core contributor</div>
647652
<div class="institutions">
648653
<img class="inst-logo inst-logo-cornell" src="assets/cornell.svg" alt="Cornell University">
649654
<img class="inst-logo inst-logo-harvard" src="assets/harvard.svg" alt="Harvard University">
@@ -1203,9 +1208,9 @@ <h2>Solve Metrics (T = 0)</h2>
12031208
const pct = Math.max(0, Math.min(100, d.QYI * 100));
12041209
const color = `hsl(${(d.QYI*120).toFixed(0)},65%,42%)`;
12051210
const hasSolver = !!SOLVER_KEY[d.Model];
1206-
const codeBtn = hasSolver
1207-
? `<button class="bar-code-btn" onclick="showCode('${d.Model}','${currentProblem}')" title="View solver code">⌨</button>`
1208-
: "";
1211+
const slotContent = hasSolver
1212+
? `<button class="bar-code-btn" onclick="showCode('${d.Model}','${currentProblem}')">&#60;/&#62; Code</button>`
1213+
: `<span class="bar-no-code"></span>`;
12091214
const div = document.createElement("div");
12101215
div.className = "bar-row";
12111216
div.innerHTML = `
@@ -1214,7 +1219,7 @@ <h2>Solve Metrics (T = 0)</h2>
12141219
<div class="bar-fill" style="width:${pct}%;background:${color}"></div>
12151220
</div>
12161221
<div class="bar-val" style="color:${color}">${fmt(d.QYI)}</div>
1217-
${codeBtn}
1222+
<div class="bar-btn-slot">${slotContent}</div>
12181223
`;
12191224
inner.appendChild(div);
12201225
});

0 commit comments

Comments
 (0)