Skip to main content

max / makeover-layout

Name email, url and tel, and make FieldKind non_exhaustive Found by wiring the forms emitter into goingson, which has five fields the description could not say: two profile URLs, a contact email address, a phone number, and the compose form's recipient. Collapsing them into Text is not a cosmetic loss. A webview renderer emits type="email", type="url" and type="tel", and on a touch device each one changes the keyboard that appears and turns on the platform's own validation. goingson ships to iOS, so text for a phone number costs a numeric pad and text for an email costs a keyboard with an @ on it. FieldKind also becomes non_exhaustive, by the argument Fill and Depth took in 0.4.0. This is the second growth in two releases, which is the evidence that the set keeps growing and renderers should not have to move in lockstep with it. Doing it in the same release as the variants is the cheap moment. Version left at 0.4.0. This is breaking twice over and wants 0.5.0, but the goingson wiring is still finding gaps and everything releases once when it stops.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-30 12:54 UTC
Signed with PGP, not checked
Commit: a42e763a067cc5113d635e0c38f70acccb7a652f
Parent: 5a46428
1 file changed, +23 insertions, -0 deletions
M src/lib.rs +23
@@ -676,7 +676,11 @@
676 676 /// describes fields but not constraints acquires a constraint layer per app,
677 677 /// which is exactly how the current divergence started. Naming it absent is a
678 678 /// decision; leaving it unmentioned would not be.
679 + /// `#[non_exhaustive]` for the reason [`Fill`] is: renderers match on this and
680 + /// the set keeps growing, so growth must not be a lockstep event. Email, Url
681 + /// and Tel arriving in 0.5.0 is the second growth in two releases.
679 682 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
683 + #[non_exhaustive]
680 684 pub enum FieldKind {
681 685 /// A single line of text.
682 686 Text,
@@ -685,6 +689,25 @@
685 689 Secret,
686 690 /// A number.
687 691 Number,
692 + /// An email address.
693 + ///
694 + /// Distinct from [`Text`](Self::Text) because the distinction is not
695 + /// decoration: a webview renderer emits `type="email"`, which on a touch
696 + /// device changes the keyboard that appears and turns on the platform's own
697 + /// validation. goingson ships to iOS, so collapsing this into text costs a
698 + /// keyboard with no `@` on it.
699 + ///
700 + /// Added 0.5.0, from goingson's contact form.
701 + Email,
702 + /// A URL. Same reasoning as [`Email`](Self::Email).
703 + ///
704 + /// Added 0.5.0, from goingson's contact-social and contact-feed forms.
705 + Url,
706 + /// A telephone number. Same reasoning as [`Email`](Self::Email), and the
707 + /// clearest case of it: the keyboard is a numeric pad rather than letters.
708 + ///
709 + /// Added 0.5.0, from goingson's contact-phone form.
710 + Tel,
688 711 /// Several lines of text.
689 712 Textarea,
690 713 /// One of a fixed set.