Skip to content

v0.4.0 — a gesture breaks following only when the panel had room

Latest

Choose a tag to compare

@yonaka15 yonaka15 released this 02 Sep 06:52

follow() now stops following the transcript only when the panel could actually have scrolled that way (room: true). A wheel or swipe over a panel already at its end scrolls the page, so it was never aimed at the transcript.

Why, measured. room shipped in 0.2.0 with a note in the source saying that if room: false turned out to be common, the listener was too eager rather than the reader. Two days of a live site (66 breaks, 60 readers) said it was 35 % of every break — 31 % of mobile swipes — a finger on its way down the page passing over the transcript. Only 20 % of readers who lost following ever turned it back on, so each spurious break lasted the rest of the visit.

New: onGesture(reason, extra) fires for every wheel/touchmove over the panel, ignored ones included, with extra.broke saying whether it stopped following. Ignoring an input has to stay observable — a listener that silently does nothing looks the same whether it is right or wrong.

Nothing in connect() changed; the wire is untouched.

npm i embedwire@0.4.0