Skip to main content

max / makeover-layout

Field::as_instant, so a local wall-clock time can be submitted as a moment A DateTime field asks for a time the way a person says one, which names a different moment in each zone. A route storing an instant needs the moment, so somebody converts; this says the description wants that, and leaves how to the renderer, which is the only party that knows what its host's clock and zone are. The alternatives all try to answer it higher up and cost more for it: a hidden IANA-zone field needs a host capability three hosts answer differently plus a kind that does not exist plus a wire-contract change, and a timezone on the user's profile is a product decision wearing a bug's clothes. The reasoning is in the member's docs so the next reader does not propose them again. Additive, and no wire contract moves when a site adopts it: the route was already receiving an instant.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-28 14:55 UTC
Signed with PGP, not checked
Commit: 585b391dc5564d91713beac2aa48b6330c0645e8
Parent: 114ff2a
2 files changed, +43 insertions, -1 deletion
M Cargo.toml +1 -1
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "makeover-layout"
3 - version = "0.36.0"
3 + version = "0.37.0"
4 4 edition = "2024"
5 5 # One copy of this vocabulary per dependency graph, enforced by cargo rather
6 6 # than by remembering. Two versions of a description layer in one build means
M src/lib.rs +42
@@ -4378,6 +4378,47 @@
4378 4378 pub unit: Option<&'a str>,
4379 4379 /// Whether the field lives behind a "more options" disclosure.
4380 4380 pub extended: bool,
4381 + /// Whether this local wall-clock value is submitted as an absolute instant.
4382 + ///
4383 + /// [`FieldKind::DateTime`] asks for a time the way a person says one --
4384 + /// "the 14th at half past two" -- and that names a different moment in
4385 + /// Denver than it does in Berlin. A route that stores an instant needs the
4386 + /// moment, so somebody has to convert. This member says the description
4387 + /// wants that conversion; it does not say how.
4388 + ///
4389 + /// # The conversion belongs to the renderer
4390 + ///
4391 + /// Because the renderer is the only party that knows what "your computer's
4392 + /// time zone" means for its host. A browser has one and the user is sitting
4393 + /// in it; a TUI reads the host clock; an egui app reads the same clock a
4394 + /// different way. Nothing above the renderer can answer it, and the
4395 + /// alternatives all try: a hidden IANA-zone field needs a host capability
4396 + /// for reading the zone that three hosts answer differently, plus a kind
4397 + /// that does not exist, plus a wire-contract change; a timezone on the
4398 + /// user's profile is a product decision wearing a bug's clothes. Say it
4399 + /// here, and the next reader does not propose them again.
4400 + ///
4401 + /// # What a renderer does
4402 + ///
4403 + /// Draws the same control it always did -- the flag changes what is
4404 + /// *submitted*, not what is shown -- and converts the local value to an
4405 + /// absolute instant on the way out. A renderer that cannot convert submits
4406 + /// the local value unchanged, which is what every renderer did before this
4407 + /// existed.
4408 + ///
4409 + /// No wire contract moves when a site adopts it: the route was already
4410 + /// receiving an instant. What changes is who computed it.
4411 + ///
4412 + /// # Which kinds read it
4413 + ///
4414 + /// [`FieldKind::DateTime`]'s. `Date` and `Time` are each half a moment and
4415 + /// cannot name one on their own, so the flag is sayable and ignored there,
4416 + /// the way [`options`](Self::options) is on a kind that offers none.
4417 + ///
4418 + /// Added 0.37.0, retiring the MNW server's `data-config="publish-at-iso"`
4419 + /// -- the last site of a private per-app vocabulary that this crate exists
4420 + /// to replace.
4421 + pub as_instant: bool,
4381 4422 }
4382 4423
4383 4424 impl<'a> Field<'a> {
@@ -4404,6 +4445,7 @@
4404 4445 curve: Curve::Linear { step: None },
4405 4446 unit: None,
4406 4447 extended: false,
4448 + as_instant: false,
4407 4449 }
4408 4450 }
4409 4451