Repository navigation
Closed
One table toolkit: a column list, a controls row with search, sticky columns and aligned numbers#198
Feature
Copy link
Labels
P2Planned: limited in scope, has a way around it, or a missing featurePlanned: limited in scope, has a way around it, or a missing featureenhancementNew feature or requestNew feature or request
Description
Priority
medium. The change is in the web layer: shared templates and static files, and three table pages. Two route helpers give the tables their columns and their search text. The backend does not change.
Components
- app/nullius (backend)
- app/web (routes)
- templates and static files
- docs and the site
- catalogue (benchmarks, agents, capabilities)
- the standard (ports, kits, relay, runs)
- CI, workflows and skills
Today
Three pages show a table: Launches, Workspaces and All runs. Each page writes its own headers, cells and toolbar. _tables.html and tables.js share only some of this code.
- No table has a search box.
- A page lists a column in up to four places: the header, the cells, the Columns menu and Sort by. A column can be in one place and not in another.
- Each page writes the left offset of a sticky column by hand. On All runs, the Run column does not start where the checkbox column ends.
- A cell flagged
numis not right-aligned, because.grid tdhas the higher priority. Numbers do not line up. - In Filter, Sort by and Columns, a click on the text of an option closes the menu. Only a click on the box itself works.
- On Workspaces, the launches count is a link or plain text, and the Roots count is a button. The two counts do not look the same.
- On All runs, each sortable header shows ↕ and the Agent, Model and Dataset headers each hold a filter caret. The Columns, Compact and Compare controls sit in a row of their own, and a hint says "Tick two or more runs to compare".
Wanted
- One list of column definitions per table. The headers, the cells, the Columns menu and Sort by all read it, so no column is missing from one of them.
- A controls row above the table. The search box is at the left and uses the remaining width. The buttons are at the right, in this order: the page's own view toggles, Columns, Filter, Sort by, the page's own actions.
- Each table opts into each feature on its own: search, Columns, Filter, Sort by, the pager, a checkbox column.
- N sticky left columns. Each one starts where the sticky columns before it end. The table scrolls horizontally under them.
- Left columns without a visible name (a checkbox, a status) and right columns without a visible name (the actions). Each has a name for screen readers.
- Only the sorted column shows an arrow.
- A pager with previous and next, and "Show N".
- Each column fits its widest cell on one line, or expands to take the rest of the width. Past that, the table scrolls.
- Each column aligns its header and cells left, center or right. Numbers are on the right.
- On Workspaces, the Launches count is a button like the Roots count. A workspace without launches shows a greyed 0.
Acceptance
-
_tables.htmlhas onetablemacro. It builds the headers, the cells, the controls row, the Columns menu, Sort by and the pager from one list of columns. - Launches and Workspaces use the
tablemacro. All runs takes its headers, its controls row and its checkbox column from the same column list. - A cell goes under its column's header, with its column's
data-coland alignment, because the macro writes the cells in the order of the columns. - Each feature is a parameter of the macro or of the column:
search,columns,choices,only,views,actions,sticky,blank,check,align,width. - The search box is at the left of the controls row. At the right, in this order: the
viewsslot, Columns, Filter, Sort by, theactionsslot. A slot holds any number of buttons, spaced as the others, and writes nothing when empty. At 390 px the buttons wrap together, flush right. - Search matches each word of the query, in any order and in any case. It narrows the rows before the pager does, and a new query shows the first page. Escape clears it. No match shows the empty note.
- After a search, a filter, a sort or a page change, a screen reader hears what shows once, after the changes stop, in the table's own word ("1–25 of 32 launches"). It hears nothing on load.
-
tables.jscomputes the offset of each sticky column from the widths of the sticky columns before it. It computes them again when a column changes width or hides, or when rows arrive. - A column with
alignright (the default for anumcolumn) has its header and its cells on the right. - On Launches, Workspaces and All runs, only the sorted header shows an arrow, and no header holds a filter caret. The pager has previous, next and Show 10, 25, 100 or All.
- All runs has one controls row: the search (run, agent, model, benchmark, dataset), Compact, Columns, Filter (Agent, Model, Dataset), Sort by (every sortable column) and Compare. The outcome chips, a header click, the compare picks, the live refresh and the saved choices keep working.
- While fewer than two runs are ticked, Compare is greyed: it can take the focus, it does nothing, and its tooltip and description say "Tick two or more runs to compare".
- A click on the text of an option in Filter, Sort by or Columns toggles that option and keeps the menu open.
- On Workspaces, Launches is a count button with an icon, like Roots. A workspace without launches shows a greyed button with 0. It can take the focus, it does nothing, and its tooltip gives the reason.
- The Launches search finds a launch by the agents of its jobs, including jobs not yet written.
-
AGENTS.mdnamesapp/templates/_tables.htmlandapp/static/tables.js.
Dependencies and related
- feat(runs): list every launch on a Launches page #184 and feat(web): manage workspaces on one page, their roots in a dialog #186 (merged) added the Launches and Workspaces tables.
- A later change can put cards on the same column list.
Metadata
Metadata
Assignees
Labels
P2Planned: limited in scope, has a way around it, or a missing featurePlanned: limited in scope, has a way around it, or a missing featureenhancementNew feature or requestNew feature or request
Activity
feat(web): build each table from one column list, with search, sticky…