Skip to content

v0.10.0

Choose a tag to compare

@barisgit barisgit released this 27 Oct 02:15
· 119 commits to main since this release

One collection of records, shown as a grouped tree, a sortable table or a board, is one component: Records. It replaces Tree. Mermaid diagrams stay readable on phones and in print.

What an author does differently

  • Write <Records {...plan} /> with a config object (kit Records): flat data, idField, fields with a kind each, columns, and groupBy for the tree's levels. views, search, facets and sort add the controls; the view, sort, search, filters and open folds go in the URL hash, so <a href="#plan?f.owner=JV"> opens a filtered list. link names a filled View each row opens, with previous/next through the rows shown; detail names a text field each row opens to in place, in the tree, the table and the board alike.
  • A field with sum: true adds subtotals and a total. Records without a value never count as zero: the sum shows what is known plus a question mark, 1,372 h + ? (or ? when no record has a value), since a missing value may be negative, and screen readers hear how many records it leaves out.
  • A block inside a View keeps its state after the view's route: #team?crew?view=table. A view's route ends at its first ?, and what follows belongs to what the view holds; client code reads and writes that part with Views.local(el) and Views.setLocal(el, text), which keep the view's trail. Previous and next walk views by their route, so links that carry state (#v/a?panel?x=1) still get them, and follow each link with its state. View's param takes the record id as it is; link to an id with ?, # or % in it as encodeURIComponent writes it (#s/a%3Fb).
  • pack checks the config and fails with the path of each problem (fields.hours.kind) and what to write instead. It also fails on a link that names no View, and on a block id that is also a View's name, in the page and in each record a filled View draws.
  • Tree is gone. Flatten its nested items into records with the group's name as a field, list those fields in groupBy, and move a row's text and ref into fields named by detail and refField. Hand-written .tree markup still works. Uneven depths and JSX cells have no Records form; write the <details> yourself for those.
  • New label keys for the block's controls and texts (kit labels lists them, all starting with records).

Mermaid

  • Mermaid diagrams stay readable on phones. A flowchart or state diagram too wide for a phone gets a second layout across its direction (left to right becomes top-down), shown below 40rem, so left to right is fine to write. Other diagrams shrink until their smallest text is 10 px, then scroll sideways. Printed, each diagram fits the paper whole, top-down when the left-to-right layout would be too small to read.
  • A diagram's width limits are the custom properties --mermaid-max and --mermaid-min on its svg, so one page rule can change them.
  • A circle node with a short label is about the size of a box node, not a large disc.
  • Flowcharts turn back only the edges of a real cycle. An input written after the node it feeds now sits before that node, instead of being looped around it.
  • check's warning about tiny SVG text names the fix: drop the page rule that squeezes a diagram, or for a hand-built SVG, redraw it about 360 wide or hold it at the min-width it gives inside a .scroll block.

check

  • check waits after each load and --do step until the page has settled instead of a fixed time: fonts loaded, every visible chart drawn, and the timers of up to 1 s the page set have run. A slow island chart is in the shots, and an error a page throws shortly after a click is reported. What is still missing after 10 s is a problem: still waiting after 10 s for charts to be drawn: div#sales.chart.
  • When Chrome fails to start or stops answering, check prints one line naming where it was (the screen, and the --do step if one was running) and exits 1 with no report, for example error: the load event of file:///…/page.html did not come in 10 s (at dark narrow, view #fix/none). It used to wait forever.
  • A check that stops with an error, or is ended by Ctrl-C or SIGTERM, leaves --out as it was: the PNGs of a run move there only once it has finished.
  • --tag takes a name without a path separator; --tag ../x is a usage error, since it would write PNGs outside --out.
  • --timeout <seconds> (default 600) limits the whole run, Chrome's start-up included: error: check passed its 600 s limit at light desktop, view #plan/a, after 324 page(s): raise --timeout for a page with many views or --do steps.
  • Chrome exits with check however check ends, and its profile and temp files are deleted (also on Ctrl-C or SIGTERM, sent once or twice). Before, every run left a profile of up to 150 MB in the temp directory, and with Google Chrome a com.google.Chrome.chrome_chrome_url_fetcher_.* directory, and a check killed by a timeout left a Chrome running that used a CPU core.
  • Chrome no longer downloads components or models while it checks a page.
  • On Linux, a TMPDIR too deep for the socket Chrome keeps there (about 50 characters) stops check with error: Chrome cannot start in a temp directory this deep (…): … set TMPDIR to a shorter one, such as /tmp, instead of Chrome's stack trace.