makeover-touch 0.41.0

The adaptation layer of the make-family design system: which affordances exist at a given input class and window size class. Names what appears and disappears, never how much space it takes.
Documentation

makeover-touch

The adaptation layer of the make-family design system.

makeover answers what colour. makeover-geometry answers how much space, and owns the two axes an adaptation is stated against: Density (pointer or touch) and SizeClass (compact, medium, expanded). makeover-layout answers what the thing is. This crate answers one question and no other:

Does this affordance exist here?

Like makeover-layout, it emits nothing. It is a description, rendered to CSS by makeover-webview and to whatever the other renderers can express.

Why it is a crate and not a density preset

What an adaptive stylesheet changes falls into buckets: density, type, columns, reflow, show/hide, reposition and appearance. The first four have owners (a makeover-geometry preset, the type scale, makeover_layout::Column and makeover_layout::Arrangement). The last three are what no spacing scale can retire. display: none on a keyboard hint says the affordance does not exist on touch, and a scale that tried to express that would be putting a product claim on a measurement axis.

What is here

Affordance, eight members, each reading exactly one axis:

member reads rule
Hover density pointer only
Hint density pointer only
Gesture density touch only
Haptic density touch only
Ancillary size expanded only
Detail size medium and up
Anchored size compact only
Overflow size compact only

Affordance::available(density, size) is the whole crate in one call. A renderer asks per affordance and never branches on a width.

The rules the tests hold

Density gates only what the contact patch touches. Hovering, the keyboard chrome documenting shortcuts a touch surface cannot send, and the gestures and haptics only a fingertip has. Not how much screen there is: a phone is small and touch, a tablet is big and touch.

Each member reads one axis, and declares which. Affordance::axis is the declaration, and the tests measure available to hold it true.

Both densities gain something. Touch is not a lesser pointer: Gesture carries the actions a fingertip cannot hover to reveal.

Collapsing is allowed, inverting is not. Hover and Hint have identical rules and are still two members, because the call site names what is gated rather than the rule.

Compact compensates rather than only losing. Anchored and Overflow are available at the narrow end and not the wide one. An adaptation that only removes things describes a degraded layout, not a different one.

What is not here, on purpose

Boundaries. makeover-geometry quotes Material 3's window size classes at 600 and 840. This crate adds no third axis, no fourth class and no breakpoint of its own.

A navigation shell fork. Two navigation shells behind one breakpoint are two shells rather than one shell adapting, and choosing to build two is a product decision the app owns.

Which columns a narrow window keeps. A column is ranked rather than gated, so the cutoff per size class lives with the ranking, in makeover-layout.

Which class applies. The app decides, from a measured width and from what it already knows about the input. This crate takes both as arguments and never sniffs.

What a renderer does when an affordance is unavailable. Hiding it, substituting it or showing it anyway is renderer policy, the same class of decision makeover-layout deleted Fill::fallback for.

Status

Published on crates.io. Design lives in the wiki note makeover-touch; the backlog is in GoingsOn under the project of the same name.

Licence

MIT.