Let a setting settle its argument, and a select mark its own options
A slot that takes a structure has settings of its own, and until now there was
nowhere to say them. `option Choice::new(id, name) { chosen when row.selected; }`
is a setting with a body: the argument is built into a binding, the body's
settings accrete onto it under their own guards, and the binding is what the
container is handed. Written as a body rather than as a trailing word so the
existing guard machinery reads it, and so a second setting on the same argument
needs no new production.
What it buys first is the theme picker. A select carried one value and the
renderer decided which option was selected by comparing it against each, which
a residual cannot hold: one compiled body per loop, and "exactly one row
differs" is not a property of the body when the difference is a comparison the
body does not make. Said per option it is a branch inside the row, and MNW's
`/dashboard/tabs/ssh-keys` derives.
A field says `chosen` or it says `value`, never both. Two ways to say one thing
is how they drift and no renderer can tell them apart, so it is a compile error
here, with a UI test on the message.
Also lands the groundwork the described pager needs and cannot yet use
(quasicoherent cbb63155, blocked on a look decision): a numeric stand-in, since
a `usize` slot has no sentinel and a pager is three of them; slot direction for
which arguments count rather than read; loops inside a setting's body; and a
refusal for a pager written out of the order it draws in.
quasicoherent c32bb877.
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
- Claude-Session
- https://claude.ai/code/session_01P8ostB2UmZJGj5WjSHRSot
24 files changed,
+848 insertions,
-86 deletions
| 1 |
1 |
|
[package]
|
| 2 |
2 |
|
name = "quasi-axum"
|
| 3 |
|
- |
version = "0.104.1"
|
|
3 |
+ |
version = "0.105.0"
|
| 4 |
4 |
|
description = "The axum host adapter for quasi-router: an HTTP request in, a rendered description out"
|
| 5 |
5 |
|
edition.workspace = true
|
| 6 |
6 |
|
rust-version.workspace = true
|
| 13 |
13 |
|
workspace = true
|
| 14 |
14 |
|
|
| 15 |
15 |
|
[dependencies]
|
| 16 |
|
- |
quasi-router = { path = "../quasi-router", version = "0.104" }
|
| 17 |
|
- |
quasi-http = { path = "../quasi-http", version = "0.104" }
|
|
16 |
+ |
quasi-router = { path = "../quasi-router", version = "0.105" }
|
|
17 |
+ |
quasi-http = { path = "../quasi-http", version = "0.105" }
|
| 18 |
18 |
|
axum = "0.8.8"
|
| 19 |
19 |
|
http = "1.3.1"
|
| 20 |
20 |
|
tokio = { version = "1.50.0", features = ["rt"] }
|
| 21 |
21 |
|
|
| 22 |
22 |
|
[dev-dependencies]
|
| 23 |
|
- |
quasi-webview = { path = "../quasi-webview", version = "0.104" }
|
|
23 |
+ |
quasi-webview = { path = "../quasi-webview", version = "0.105" }
|
| 24 |
24 |
|
tokio = { version = "1.50.0", features = ["macros", "rt-multi-thread"] }
|
| 25 |
25 |
|
tower = { version = "0.5.3", features = ["util"] }
|
| 26 |
26 |
|
http-body-util = "0.1.3"
|
| 1 |
1 |
|
[package]
|
| 2 |
2 |
|
name = "quasi-basics"
|
| 3 |
|
- |
version = "0.104.1"
|
|
3 |
+ |
version = "0.105.0"
|
| 4 |
4 |
|
description = "The first-party widget set: named assemblies of primitives, shared across our apps"
|
| 5 |
5 |
|
edition.workspace = true
|
| 6 |
6 |
|
rust-version.workspace = true
|
| 13 |
13 |
|
workspace = true
|
| 14 |
14 |
|
|
| 15 |
15 |
|
[dependencies]
|
| 16 |
|
- |
quasi-router = { path = "../quasi-router", version = "0.104" }
|
|
16 |
+ |
quasi-router = { path = "../quasi-router", version = "0.105" }
|
| 17 |
17 |
|
quasi-declare = { path = "../quasi-declare", version = "0.1" }
|
| 18 |
18 |
|
makeover-layout = "0.44"
|
| 19 |
19 |
|
|
| 21 |
21 |
|
# A widget's guarantees are claims about what a renderer draws, so they are
|
| 22 |
22 |
|
# tested against a real one rather than by walking the tree the assembly just
|
| 23 |
23 |
|
# built. The webview is the renderer that recognises names today.
|
| 24 |
|
- |
quasi-webview = { path = "../quasi-webview", version = "0.104" }
|
| 25 |
|
- |
quasi-http = { path = "../quasi-http", version = "0.104" }
|
|
24 |
+ |
quasi-webview = { path = "../quasi-webview", version = "0.105" }
|
|
25 |
+ |
quasi-http = { path = "../quasi-http", version = "0.105" }
|
| 1 |
1 |
|
[package]
|
| 2 |
2 |
|
name = "quasi-bench"
|
| 3 |
|
- |
version = "0.104.1"
|
|
3 |
+ |
version = "0.105.0"
|
| 4 |
4 |
|
description = "What a described screen costs to render, in time and in allocations"
|
| 5 |
5 |
|
edition.workspace = true
|
| 6 |
6 |
|
rust-version.workspace = true
|
| 26 |
26 |
|
askama = ["dep:askama"]
|
| 27 |
27 |
|
|
| 28 |
28 |
|
[dependencies]
|
| 29 |
|
- |
quasi-router = { path = "../quasi-router", version = "0.104" }
|
| 30 |
|
- |
quasi-webview = { path = "../quasi-webview", version = "0.104" }
|
| 31 |
|
- |
quasi-tui = { path = "../quasi-tui", version = "0.104" }
|
| 32 |
|
- |
quasi-immediate = { path = "../quasi-immediate", version = "0.104" }
|
|
29 |
+ |
quasi-router = { path = "../quasi-router", version = "0.105" }
|
|
30 |
+ |
quasi-webview = { path = "../quasi-webview", version = "0.105" }
|
|
31 |
+ |
quasi-tui = { path = "../quasi-tui", version = "0.105" }
|
|
32 |
+ |
quasi-immediate = { path = "../quasi-immediate", version = "0.105" }
|
| 33 |
33 |
|
# `Serves` is the trait carrying `screen` and `fragment`, which is what the
|
| 34 |
34 |
|
# webview is measured through. Taken directly rather than through quasi-webview
|
| 35 |
35 |
|
# because a bench calling a trait method should name the trait it calls.
|
| 36 |
|
- |
quasi-http = { path = "../quasi-http", version = "0.104" }
|
|
36 |
+ |
quasi-http = { path = "../quasi-http", version = "0.105" }
|
| 37 |
37 |
|
# The macro under measurement. The bench holds the declared copy of the same
|
| 38 |
38 |
|
# screen `staging.rs` writes by hand, so the staged column measures what the
|
| 39 |
39 |
|
# server actually serves rather than a shape written for a benchmark.
|
| 1 |
1 |
|
[package]
|
| 2 |
2 |
|
name = "quasi-declare"
|
| 3 |
|
- |
version = "0.1.13"
|
|
3 |
+ |
version = "0.1.14"
|
| 4 |
4 |
|
description = "The declare! form: a screen description compiled to Rust at build time."
|
| 5 |
5 |
|
edition.workspace = true
|
| 6 |
6 |
|
rust-version.workspace = true
|
| 31 |
31 |
|
trybuild = "1"
|
| 32 |
32 |
|
# The generated code names the vocabulary, so a case that is meant to COMPILE
|
| 33 |
33 |
|
# needs it. A proc-macro crate cannot depend on it outside dev.
|
| 34 |
|
- |
quasi-router = { path = "../quasi-router", version = "0.104" }
|
|
34 |
+ |
quasi-router = { path = "../quasi-router", version = "0.105" }
|