Skip to content

0.9.0 - the CookBook card pages its recipe table

Choose a tag to compare

@corderro-artz corderro-artz released this 08 Sep 15:37
· 631 commits to main since this release

The CookBook card no longer scrolls. At the smallest window the app opens, its detail card gets 654×388 — measured, not estimated — and the card needed about 518. It overflowed by ~130px and survived only because the page scrolled, which put the mint bar and the Cook button below the fold on a book of any size.

It pages, and the page size is measured

The recipe list is the one thing on the card without a bound size, so that is what pages. The view renders a row, asks how tall it came out, and divides the space beneath the band by it — a constant would be right at one window size and wrong at every other. Two things make that safe, and the test harness found both:

  • The rows host is a ScrollViewer with its bars disabled, because a panel reports its content's desired height — so the rows grew the row that was measured to decide how many rows fit, and Avalonia threw Infinite layout loop detected.
  • Every row is one height. The last row used to drop 5px of its band along with its rule, which made the measured answer depend on the answer.

It cannot actually scroll, and the tests assert that (Extent <= Viewport) rather than trusting it.

A row is one line

As two lines it held a five-letter name in an 843px column at full screen — an 800px void between the name and the numbers. The share track takes that column instead, being the one element in a row whose meaning improves with length, and the row halved. Everything right of the track is a stated pixel width, stated identically in the header and the rows, because Avalonia has no SharedSizeGroup.

The badges are a grid of slots

Laid out as a run, a five-layer recipe put its first badge where a six-layer one put its second and nothing lined up down the table. Six slots, one badge each at one stated width, and a stack too deep spends the last slot on a +N — so every +N lines up with every other and with the final badge of the rows that need none.

The headline figure never rounds

Its cell was widened until 9,223,372,036,854,775,807 — the largest a long can hold — fits at the smallest window: 255px of ink against 266px of room. So the compact form and the exact-value tooltip both came off that surface; a figure you have to hover to read is one you cannot compare at a glance. The compact form survives only in the 118px per-recipe column.

The supply rail

TARGET SUPPLY 1,200 ─── 0.05% answers the one question those figures exist for: does the intended supply fit in the space? It replaces a chip on the identity card and a cookbar sentence — the same number was being stated in three places. The fill is honest, so it is usually a sliver, with a minimum width so it never reads as a broken control. A target larger than the space fills the bar and turns it amber before Cook is pressed.

Also

IBM Plex Mono's natural line box is far taller than its em — 26px at a 10px font — so every mono run in a row now states one, and they state the same one: Avalonia has no baseline alignment, and three centered boxes of three heights sat 1.6px apart.

Downloads

Archive Needs
single-file-net10 .NET 10 runtime installed — smallest
framework-dependent .NET 10 runtime installed
single-file nothing — one self-contained .exe
portable nothing — a folder you can copy