Skip to main content

max / makeover-touch

4.6 KB · 112 lines History Blame Raw
1 # makeover-touch
2
3 The adaptation layer of the make-family design system.
4
5 `makeover` answers *what colour*. `makeover-geometry` answers *how much space*,
6 and owns the two axes an adaptation is stated against: `Density` (pointer or
7 touch) and `SizeClass` (compact, medium, expanded). `makeover-layout` answers
8 *what the thing is*. This crate answers one question and no other:
9
10 > Does this affordance exist here?
11
12 Like `makeover-layout`, it emits nothing. It is a description, rendered to CSS by
13 `makeover-webview` and to whatever the other renderers can express.
14
15 ## Why it is a crate and not a density preset
16
17 Measured across the MNW server's `@media` blocks (137) and goingson's
18 `ui-mode-*` blocks (192), bucketed by what the declarations inside actually
19 change:
20
21 | bucket | MNW | GO | retired by |
22 |---|---|---|---|
23 | density | 32% | 27% | a `makeover-geometry` preset |
24 | type | 23% | 15% | the type scale |
25 | columns | 20% | 12% | `makeover_layout::Column` |
26 | reflow | 16% | 17% | `makeover_layout::Arrangement` |
27 | **show/hide** | **12%** | **12%** | **this crate** |
28 | **reposition** | **6%** | **20%** | **this crate** |
29 | **appearance** | **1%** | **17%** | **this crate** |
30
31 The bottom three are the roughly 43% no spacing scale can retire. `display:
32 none` on a keyboard hint says the affordance does not exist on touch. No amount
33 of gap retuning expresses that, and a scale that tried would be putting a
34 product claim on a measurement axis, which is what the July 2026 Touch
35 demolition was for.
36
37 ## What is here
38
39 `Affordance`, six members, drawn from what the two measured apps already gate by
40 hand:
41
42 | member | reads | rule |
43 |---|---|---|
44 | `Hover` | density | pointer only |
45 | `Hint` | density | pointer only |
46 | `Ancillary` | size | expanded only |
47 | `Detail` | size | medium and up |
48 | `Anchored` | size | compact only |
49 | `Overflow` | size | compact only |
50
51 `Affordance::available(density, size)` is the whole crate in one call. A
52 renderer asks per affordance and never branches on a width.
53
54 `column_cutoff(size)` closes the one seam neither neighbour could: layout defines
55 the priority ladder and `Column::kept_at`, geometry defines the boundaries, and
56 nothing said which cutoff a compact window uses. Both webview apps answered it
57 with `nth-child` on an ordinal, so inserting a column silently hid the wrong one.
58
59 ## The rules the tests hold
60
61 **Density gates only what the contact patch touches.** Hovering, and the
62 keyboard chrome documenting shortcuts a touch surface cannot send. Not how much
63 screen there is: a phone is small *and* touch, a tablet is big *and* touch.
64 Putting a screen-budget claim on the input device is the specific failure that
65 produced this crate.
66
67 **Touch never gains an affordance pointer lacks.** Touch is derived from pointer
68 by subtracting what a fingertip cannot do, so it loses members and never gains
69 one.
70
71 **Collapsing is allowed, inverting is not.** Borrowed from `makeover-geometry`,
72 where two gap relationships both resolve to zero cells on a terminal and stay
73 two members. `Hover` and `Hint` have identical rules today and are still two
74 members, because the call site names what is gated rather than the rule.
75
76 **Compact compensates rather than only losing.** `Anchored` and `Overflow` are
77 available at the narrow end and not the wide one. An adaptation that only
78 removes things describes a degraded layout, not a different one.
79
80 ## What is not here, on purpose
81
82 **Boundaries.** `makeover-geometry` quotes Material 3's window size classes at
83 600 and 840. This crate adds no third axis, no fourth class and no breakpoint of
84 its own.
85
86 **A navigation shell fork.** goingson currently carries two, concentrated in
87 `.app-header`, `.tab`, `.tab-navigation`, `.pill-nav`, `.saved-views-sidebar`
88 and `.modal-container`. That is not one shell adapting, it is two shells, and
89 choosing to build two is a product decision. goingson's own restructure is how
90 it stops being true.
91
92 **Which class applies.** The app decides, from a measured width and from what it
93 already knows about the input. This crate takes both as arguments and never
94 sniffs.
95
96 **What a renderer does when an affordance is unavailable.** Hiding it,
97 substituting it or showing it anyway is renderer policy, the same class of
98 decision `makeover-layout` deleted `Fill::fallback` for.
99
100 ## Status
101
102 Seeded at 0.1.0, unpublished, no renderer has been through it. The vocabulary is
103 six members and the intent is to stop there: `makeover-layout`'s own warning is
104 that guessing at eight is how a description becomes a framework.
105
106 Design lives in the wiki note `makeover-touch`; the backlog is in GoingsOn under
107 the project of the same name.
108
109 ## Licence
110
111 MIT.
112