timchen0618's picture
Initial: Open-WikiTable test split viewer (6,602 qids)
2da3a94 verified
Raw
History Blame Contribute Delete
11.6 kB
:root {
--bg: #fdfaf5;
--panel: #ffffff;
--panel-alt: #faf4ea;
--border: #e7ddc9;
--border-strong: #cfbf9a;
--ink: #1f1b14;
--ink-soft: #4a4435;
--ink-mute: #7d745f;
--accent: #b15a16;
--accent-soft: #e8c79b;
--hard: #2f8f4a;
--hard-soft: #d6efdc;
--pos: #1f6fb5;
--pos-soft: #d4e6f5;
--neg: #b53a2e;
--neg-soft: #f3d8d3;
--code-bg: #2b2520;
--code-ink: #f3ebd7;
--shadow: 0 1px 2px rgba(80, 60, 20, 0.07), 0 6px 18px rgba(80, 60, 20, 0.07);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
color: var(--ink);
background: var(--bg);
font-size: 14px;
line-height: 1.5;
}
/* ── Topbar ──────────────────────────────────────────────────────── */
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
background: var(--panel);
border-bottom: 1px solid var(--border);
}
.topbar h1 {
margin: 0;
font-size: 16px;
font-weight: 600;
letter-spacing: 0.1px;
}
.topbar-sub {
margin-left: 8px;
font-size: 12px;
font-weight: 400;
color: var(--ink-mute);
}
.topbar-right { display: flex; gap: 14px; }
.topbar-link {
font-size: 13px;
color: var(--accent);
text-decoration: none;
}
.topbar-link:hover { text-decoration: underline; }
/* ── Layout ──────────────────────────────────────────────────────── */
.layout {
display: flex;
height: calc(100vh - 44px);
}
.sidebar {
width: 340px;
flex-shrink: 0;
border-right: 1px solid var(--border);
background: var(--panel);
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-controls {
padding: 12px 12px 8px;
border-bottom: 1px solid var(--border);
background: var(--panel-alt);
}
#searchBox {
width: 100%;
padding: 6px 9px;
border: 1px solid var(--border-strong);
border-radius: 5px;
background: #fff;
font-size: 13px;
}
#searchBox:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-soft);
}
.filter-row {
display: flex;
gap: 6px;
margin-top: 8px;
}
.filter-pill {
flex: 1;
padding: 4px 8px;
border: 1px solid var(--border-strong);
border-radius: 999px;
background: #fff;
color: var(--ink-soft);
font-size: 12px;
cursor: pointer;
}
.filter-pill:hover { background: var(--accent-soft); }
.filter-pill.active {
background: var(--accent);
border-color: var(--accent);
color: #fff;
font-weight: 600;
}
.nav-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
margin-top: 8px;
}
.nav-row button {
flex-shrink: 0;
padding: 4px 10px;
border: 1px solid var(--border-strong);
border-radius: 5px;
background: #fff;
color: var(--ink-soft);
font-size: 12px;
cursor: pointer;
}
.nav-row button:hover:not(:disabled) { background: var(--accent-soft); }
.nav-row button:disabled { opacity: 0.4; cursor: not-allowed; }
.counter {
font-size: 12px;
font-variant-numeric: tabular-nums;
color: var(--ink-mute);
white-space: nowrap;
}
.qid-list {
list-style: none;
padding: 0;
margin: 0;
overflow-y: auto;
flex: 1;
}
.qid-list li {
padding: 7px 12px;
border-bottom: 1px solid var(--border);
cursor: pointer;
font-size: 12.5px;
}
.qid-list li:hover { background: var(--panel-alt); }
.qid-list li.selected {
background: var(--accent-soft);
border-left: 3px solid var(--accent);
padding-left: 9px;
}
.qid-list .qid-id {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
color: var(--ink-mute);
display: block;
}
.qid-list .qid-question {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
color: var(--ink);
}
.qid-list .qid-tag {
display: inline-block;
padding: 0px 5px;
margin-right: 4px;
border-radius: 3px;
font-size: 10px;
font-weight: 600;
color: #fff;
vertical-align: middle;
}
.qid-tag.WikiSQL { background: #4078b8; }
.qid-tag.WikiTQ { background: #8b6cb0; }
/* ── Main pane ───────────────────────────────────────────────────── */
.main-pane {
flex: 1;
overflow-y: auto;
padding: 22px 28px;
max-width: 1500px;
}
.placeholder {
padding: 60px 20px;
text-align: center;
color: var(--ink-mute);
font-size: 15px;
}
/* sticky header */
.record-header {
position: sticky;
top: -22px; /* cancel main-pane top padding so it pins flush */
background: var(--bg);
padding: 8px 0 10px;
border-bottom: 1px solid var(--border);
margin-bottom: 16px;
z-index: 4;
}
.record-pills {
display: flex;
gap: 6px;
flex-wrap: wrap;
margin-bottom: 6px;
}
.pill {
display: inline-flex;
align-items: center;
padding: 2px 8px;
font-size: 11.5px;
border-radius: 999px;
background: var(--panel-alt);
color: var(--ink-soft);
border: 1px solid var(--border);
font-variant-numeric: tabular-nums;
}
.pill.dataset { font-weight: 600; }
.pill.dataset.WikiSQL { background: #e1ecf7; color: #1f4f87; border-color: #b8d2ec; }
.pill.dataset.WikiTQ { background: #ebe1f5; color: #563a83; border-color: #cbb8e3; }
.pill.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-btn {
border: 1px solid var(--border);
background: #fff;
cursor: pointer;
padding: 2px 8px;
font-size: 11.5px;
border-radius: 999px;
color: var(--ink-mute);
}
.copy-btn:hover { background: var(--accent-soft); color: var(--ink); }
.copy-btn.copied { background: var(--hard-soft); color: var(--hard); border-color: var(--hard); }
.question-text {
font-size: 17px;
font-weight: 500;
margin: 4px 0 10px;
color: var(--ink);
}
/* gold-answer pills: single horizontal row, scroll if many */
.answer-row {
display: flex;
flex-wrap: nowrap;
gap: 6px;
overflow-x: auto;
padding-bottom: 4px;
}
.answer-pill {
flex: 0 0 auto;
padding: 3px 10px;
background: #fff7e6;
border: 1px solid #e8c97b;
color: #8a5d09;
border-radius: 5px;
font-size: 12.5px;
font-weight: 500;
white-space: nowrap;
}
.answer-label {
flex: 0 0 auto;
padding: 3px 0 3px 0;
font-size: 11.5px;
color: var(--ink-mute);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-right: 4px;
font-weight: 600;
}
/* ── SQL block ───────────────────────────────────────────────────── */
.section { margin: 22px 0; }
.section-title {
margin: 0 0 8px;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.8px;
text-transform: uppercase;
color: var(--ink-mute);
}
.sql-block {
background: var(--code-bg);
color: var(--code-ink);
padding: 12px 14px;
border-radius: 6px;
font-family: ui-monospace, SFMono-Regular, Menlo, "Courier New", monospace;
font-size: 13px;
line-height: 1.55;
white-space: pre-wrap;
word-wrap: break-word;
overflow-x: auto;
box-shadow: var(--shadow);
}
.sql-kw { color: #f0a878; font-weight: 600; }
.sql-str { color: #b5d97a; }
.sql-num { color: #91c8e4; }
.sql-fn { color: #e0b3ff; }
/* ── Tables panel ────────────────────────────────────────────────── */
.tables-tabs {
display: flex;
gap: 6px;
margin-bottom: 12px;
border-bottom: 2px solid var(--border);
padding-bottom: 0;
}
.tables-tab {
padding: 7px 14px;
border: 1px solid var(--border);
border-bottom: none;
background: var(--panel-alt);
color: var(--ink-soft);
font-size: 13px;
cursor: pointer;
border-radius: 6px 6px 0 0;
font-weight: 500;
position: relative;
top: 2px;
}
.tables-tab .count {
display: inline-block;
margin-left: 6px;
padding: 1px 7px;
border-radius: 999px;
font-size: 11px;
font-weight: 600;
background: #fff;
color: var(--ink-mute);
border: 1px solid var(--border);
}
.tables-tab:hover:not(:disabled):not(.active) { background: #fff; }
.tables-tab:disabled { opacity: 0.35; cursor: not-allowed; }
.tables-tab.active {
background: #fff;
color: var(--ink);
border-bottom: 2px solid #fff;
}
.tables-tab[data-bucket="hard_positive"] .count { background: var(--hard-soft); color: var(--hard); border-color: var(--hard); }
.tables-tab[data-bucket="positive"] .count { background: var(--pos-soft); color: var(--pos); border-color: var(--pos); }
.tables-tab[data-bucket="negative"] .count { background: var(--neg-soft); color: var(--neg); border-color: var(--neg); }
.tables-tab.active[data-bucket="hard_positive"] { border-top: 3px solid var(--hard); }
.tables-tab.active[data-bucket="positive"] { border-top: 3px solid var(--pos); }
.tables-tab.active[data-bucket="negative"] { border-top: 3px solid var(--neg); }
.chunk-card {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
margin-bottom: 16px;
overflow: hidden;
box-shadow: var(--shadow);
}
.chunk-card.hard_positive { border-left: 4px solid var(--hard); }
.chunk-card.positive { border-left: 4px solid var(--pos); }
.chunk-card.negative { border-left: 4px solid var(--neg); }
.chunk-head {
padding: 10px 14px;
background: var(--panel-alt);
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
}
.chunk-bread {
font-size: 13px;
color: var(--ink);
line-height: 1.4;
}
.chunk-bread .crumb-sep {
color: var(--ink-mute);
margin: 0 6px;
}
.chunk-bread .crumb-page { font-weight: 600; }
.chunk-bread .crumb-section { color: var(--ink-soft); }
.chunk-bread .crumb-caption {
display: block;
font-size: 11.5px;
color: var(--ink-mute);
font-style: italic;
margin-top: 2px;
}
.chunk-meta {
flex-shrink: 0;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11px;
color: var(--ink-mute);
text-align: right;
}
.chunk-meta .chunk-id-label { display: block; }
.chunk-table-wrap {
overflow-x: auto;
max-height: 480px;
overflow-y: auto;
}
.chunk-table {
width: 100%;
border-collapse: collapse;
font-size: 12.5px;
}
.chunk-table thead {
position: sticky;
top: 0;
background: #fff;
z-index: 1;
}
.chunk-table th {
text-align: left;
padding: 7px 10px;
border-bottom: 2px solid var(--border-strong);
background: var(--panel-alt);
font-weight: 600;
color: var(--ink);
white-space: nowrap;
font-size: 11.5px;
text-transform: uppercase;
letter-spacing: 0.4px;
}
.chunk-table td {
padding: 6px 10px;
border-bottom: 1px solid var(--border);
vertical-align: top;
color: var(--ink-soft);
}
.chunk-table tbody tr:nth-child(even) { background: var(--panel-alt); }
.chunk-table tbody tr:hover { background: var(--accent-soft); }
.empty-bucket {
padding: 40px 20px;
text-align: center;
color: var(--ink-mute);
background: var(--panel);
border: 1px dashed var(--border-strong);
border-radius: 8px;
font-size: 13px;
}
/* small-screen squish (rare on HF; mainly for sanity) */
@media (max-width: 900px) {
.layout { flex-direction: column; height: auto; }
.sidebar { width: 100%; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border); }
.main-pane { padding: 16px; }
}