openvibers/openvibe.report Commits

AI page: each table's heading once, and no card inside a card (#134)

OP OpenVibers committed 6 days ago · 9039b87287 · 2 files, +6 −2

The section title and the table's visible caption said the same thing twice ("Task kinds 1" over "Task kinds and
their leaders"); the caption is now the table's accessible label. A table inside a kit section loses its own frame.

Changes

ddiff --git a/public/css/app.css b/public/css/app.css
iindex bf659dd..19a8d1e 100644
---- a/public/css/app.css
++++ b/public/css/app.css
@@@ -382,3 +382,7 @@ html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--tex
.rp-ai-method h2 { margin: 28px 0 8px; font-size: 1.15rem; }
.rp-ai-method p { max-width: 820px; margin: 0 0 12px; line-height: 1.65; color: var(--text-secondary, #96a7c2); }
.rp-ai-method code { overflow-wrap: anywhere; }
++
++/* A table inside a kit section (the AI page's leaders and benchmarks): the section is the card, so the table's own
++ frame goes (it drew a card inside a card, one border inside another). */
++.ovk-section > .ovk-table-wrap { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
ddiff --git a/server/views/index.js b/server/views/index.js
iindex a9c7724..f5c9d75 100644
---- a/server/views/index.js
++++ b/server/views/index.js
@@@ -774,7 +774,7 @@ function aiIndex({ overview, kinds, boards = [], rankings = [] }) {
const rated = items.filter((x) => played(x.rows)).sort((a, b) => gamesOf(b.rows) - gamesOf(a.rows));
const waiting = items.filter((x) => !played(x.rows));
const leaders = rated.length ? kit.table({
-- caption: 'Task kinds and their leaders', columns: [
++ label: 'Task kinds and their leaders', columns: [
{ key: 'job', label: 'Job', primary: true, html: true }, { key: 'leader', label: 'Leader', html: true },
{ key: 'quality', label: 'Quality', num: true, html: true }, { key: 'games', label: 'Games', num: true, fmt: 'int' },
{ key: 'cost', label: 'Cost/run', num: true, html: true },
@@@ -809,7 +809,7 @@ function aiIndex({ overview, kinds, boards = [], rankings = [] }) {
const activeBench = benches.filter((b) => Number(b.runs) > 0);
const idleBench = benches.filter((b) => !(Number(b.runs) > 0));
const benchTable = activeBench.length ? kit.table({
-- caption: 'Benchmarks with published runs', columns: [
++ label: 'Benchmarks with published runs', columns: [
{ key: 'benchmark', label: 'Benchmark', primary: true, html: true }, { key: 'kind', label: 'Task kind' },
{ key: 'leader', label: 'Leader', html: true }, { key: 'runs', label: 'Runs', num: true, fmt: 'int' }, { key: 'last', label: 'Last run', html: true },
], rows: benches.map((b, i) => (Number(b.runs) > 0 ? benchRow(b, i) : null)).filter(Boolean),