shell: add 'off' to the force-touch cycle (auto/force/off) - #167
Conversation
The ▦ toggle was a boolean: force (pinned on) or auto (capability detection — and portrait's media query still reveals the UI). There was no way to suppress the touch UI when a reveal path fires anyway: phone with a BT keyboard, narrow/portrait desktop windows. Third state 'off' sets body.no-touch, which out-specifies both reveal paths for .touch and releases the portrait 55dvh cap so the terminal reclaims the viewport. The switcher and settings pane stay visible under mode-dev only — same recoverability contract that already kept ▦ reachable on desktop — so a dev can always cycle back out; players never see the toggle and can't strand themselves. Stored value moves from '1'/'0' to the mode name; a legacy '1' maps to 'force' on load. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Note Add
|
|
Review context for this and the other five ready PRs, with suggested order and merge-order notes: #182 |
|
Perhaps the better UI would be a dropdown selection for the mode, rather than toggle cycling. Having tooltips for what each do would be helpful, too. On chrome, I'm unable to enter the console still. It's ` right? |
@nnunley Thanks for taking a look and agree there's better UI. I'll capture this dimension with or along with the other UI spikes. And yeah, that's the right key. Add |
|
FYI, there are a few notes left over here: #182 in case it helps with testing. |
This PR is about the shell's touch UI toggle. (here referenced as "force-touch" since it originally forced the UI on in layouts where it would normally be invisible).
The ▦ dev toggle in the shell initially was a boolean:
force(touch UI pinned on) orauto(pointer-capability detection). I discovered in testing in desktop browers, it is helpful to have an explicitoffoption. The currentautoisn't necessarilyoff— portrait's media query and a coarse pointer both reveal the touch UI regardless, so there was no way to suppress it when a reveal path fires but the UI isn't wanted: a phone with a Bluetooth keyboard, or a narrow/portrait desktop window.This PR adds a natural third state to the cycle:
auto→force→off.How:
offsetsbody.no-touch, which beats both reveal paths for.touchon plain specificity (no!important) and releases the portrait55dvhterminal cap, so the grid refits to the full viewport.Recoverability: the switcher and settings pane stay visible under
mode-devonly, the same contract that already kept ▦ reachable on a plain desktop. A dev can always cycle back out; players never see the toggle, so they can't strand themselves in a touch-less state on a phone.The persisted value moves from
'1'/'0'to the mode name; a stored legacy'1'maps toforceon load, so nobody's existing override resets. (mostly a non-issue for anyone except me right now, but minions love to defensively add backward compat for everything. c'est la vie)Validated manually and with Playwright in a portrait viewport, tapping through the full cycle and back to
auto: inoffthe touch grid hides, the terminal grows from 495px to 847px and refits, and themode-devswitcher remains as the way back.🤖 Co-authored with Claude Code