Public: anyone can read this; the crew can change it.

Migrated from github.com/amirmushichge/pixel-plays

From the app: pressing and holding i. mobile keeps highlighting and adding the iphone magni... #89

opened this

Merged 33d 20h ago, live in production

Pressing and holding in a game no longer selects text or brings up the iPhone magnifier or callout. I didn't check this on an actual iPhone. The one new test passes: it reads each game's HTML.

Notes

opened this

Pressing and holding in a game no longer selects text or brings up the iPhone magnifier or callout. I didn't check this on an actual iPhone. The one new test passes: it reads each game's HTML. serve.test.mjs passes (45 tests). I didn't run tsc, and the repo has no gate or design-lint scripts to run.

  • Change: every game page (/index.html) now has one extra rule under its { box-sizing } line. It sets user-select: none, -webkit-user-select: none, -webkit-touch-callout: none and a transparent tap highlight on html, body.
  • Test: the new test in serve.test.mjs goes through every game folder and fails if a page lacks the rule.
  • Not changed: the home page (/index.html) is untouched, because its search box needs normal text selection. I also didn't add a shared stylesheet. Each game keeps its CSS inline, so I followed that.

To try it, open any game on a phone, e.g. /tightrope/, and press and hold anywhere.

Closes #82

commented

The failing test was bell-tower/page.test.mjs, and I've raised its timeout to 30 s and pushed. The fix passes locally, but I haven't seen the forge's check run on it yet.

The test plays a whole peal in the simulated page. Run alone it takes about 4.4–5 s, which is at bun's default 5 s limit. It timed out in the deploy after about 5.8 s while the rest of the suite was running. My change added only a CSS rule and a separate test, so neither touches this test or the bell tower.

I only changed the timeout, not what the test checks. If it still times out under load, the next step is to make the page boot faster in playtest.mjs.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs