#idea-rowOne row of a list of ideas: a date, a title, cells and badges, as an <li>. The shape @rookery/search and @rookery/timeline both draw, kept in core so that a project reaching a row through one of those packages still gets core’s CSS with it.
#import "@rookery/core:0.1.0": idea, ideas, idea-row
#idea(
"etal",
title: [Et al.],
tags: (note: none),
created: datetime(year: 2026, month: 8, day: 20),
)[Attribution flattens a crowd into one name.]
#context html.elem("ul", ideas(tagged: "note").map(e => idea-row(
when: e.created.display("[day] [month repr:short]"),
iso: e.created.display("[year]-[month]-[day]"),
title: e.label,
href: e.href,
tags: e.tags,
badges: e.tags.map(t => (text: t, tag: t)),
)).join())The row is fed from #ideas rather than from the idea directly, which is the usual shape: a view selects its ideas, decides what their dates mean, and hands the row cells that are already content.
| Argument | Type | Description |
|---|---|---|
when | content | none | The date cell, already formatted. none draws an em dash. |
iso | str | none | A machine-readable date, which wraps when in a <time> element carrying it. |
soft | bool | Whether this date answers a different question than the list asked — a booked event standing in for a deadline. Dropped silently on a row with no date, which makes no such claim. |
when-class, when-attrs | str | array, dictionary | Extra classes and attributes on the date cell, for a consumer that bands a deadline by how close it is. Core defines none of these names and styles none of them. |
title | content | The row’s title. |
href | str | none | Where the title links. none renders it as a span instead. |
badges | array | The chip strip at the end of the row. A (text: .., tag: ..) dictionary draws the ordinary chip, wearing the same .idea-tag-<tag> class a pill and an outline row do, so a themed tag colors itself; anything else is placed verbatim and the caller owns its markup. An empty strip is omitted rather than drawn empty, since a childless span still takes a grid track. |
cells | array | Extra content cells between the title and the badges — a host institution, a path — for what a reader scans down a column for rather than reads inside the title. |
tags | array | Tag names, which become .idea-tag-<tag> classes and a data-rookery-tags attribute on the <li>. |
extra, attrs | array, dictionary | Extra classes and attributes on the <li>, merged under the classes this function computes so a caller cannot drop the row’s own. This is what lets @rookery/search’s panels hang their data-panel-* attributes off a row without re-emitting its markup. |
Cells arrive formatted, and that is the whole of the design: the row asks no questions about what a date or a badge means, so one row shape serves a log-derived queue, a filter panel and a hand-built table of submissions, none of which agree about what a date is. It carries no JavaScript — interaction stays in @rookery/search.
HTML only, and deliberately: a paged target has no grid to align and no anchor to click, so every view in this family keeps its own branch that builds a plain list(..) there. Calling it on a paged target fails with a message about the mistake rather than about the element.