Repository navigation
Commit 5e2b739
committed
docs(site): a click locks a cartridge in SELECT YOUR ENVIRONMENT, so the pointer can cross the shelf to NOW PLAYING or the sidebar (round 43, DR-143)
The maintainer: "The "SELECT YOUR ENVIRONMENT" (everywhere, not just in docfx) needs to change on hover like it does
now but if user select an envrionment (and can deselect by clicking again) then stop showing other environments on
hover. this way i can select in middle of screen and bring my mouse out to the side menu or the NOW PLAYING without it
accidentally touching." The gallery is one include and one script on both pages that carry it, the landing page and
the Environments page, so both change. Asked how a locked cartridge should look, with three working prototypes
(the gallery's own styles and pixel font): "The cursor settles".
- docs/website-src/templates/gymnet/public/main.js, installArcade: a hover previews a cartridge, as before, unless one
is locked; a click locks it (showing it first, which ends attract mode as any reader choice does); while locked,
the pointer crossing the other cartridges changes nothing; a click on the locked cartridge, or Esc while focus is in
the gallery, releases it; a click on another moves the lock; the arrow keys, Home and End carry it along. Esc is
taken only when there is a lock to release. On a touch screen a tap fires mouseenter before its click, so a tap on an
unlocked shelf previews, then locks; a tap on the locked cartridge releases it.
- main.css: `.gn-cart.gn-locked[aria-selected="true"]`: the frame stops blinking and stays gold (#f8b800), and the
arrow turns gold. A hover preview keeps the blinking frame and the white arrow, so the two read apart at a glance.
- docs/website-src/includes/arcade.md: the links line under READ THE MANUAL ends with the hint, " · click a cartridge
to keep it", which reads " · click it again or Esc to let go" while one is locked.
Checked in throw-away headless Chrome with real pointer and key events, on both pages (scratch arcade/lock-test.mjs),
20 of 20: before any choice nothing is locked and the hint says how to lock; a hover previews, blinking; a click locks
(no animation, gold frame, gold arrow, the let-go hint); hovering five other cartridges leaves it on the screen; a click
on another moves the lock; ArrowRight carries it; Esc releases it and the cursor blinks again; a hover previews again;
a click on the locked cartridge releases it; a hover previews once more. The same test on the live site, which has no
lock, fails 12 of 20, the hover-while-locked check among them. The headless sweep at both views (the gallery's 24
cartridges each still open their page), the guides' and landing page's checks 11 of 11, and the sidebar's 10 of 10
all pass; docfx 20 warnings (the baseline), 0 errors.
On the way, a false alarm worth knowing: the site scrolls smoothly (scroll-behavior: smooth), so a test that scrolls a
cartridge into view and moves the pointer at once can catch it mid-scroll and end over another cartridge; the test
scrolls instantly. The page itself never scrolls on hover.1 parent 7e9ddb7 commit 5e2b739
3 files changed
Lines changed: 79 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
256 | 268 | | |
257 | 269 | | |
258 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
| |||
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| 274 | + | |
| 275 | + | |
271 | 276 | | |
272 | 277 | | |
273 | 278 | | |
| |||
304 | 309 | | |
305 | 310 | | |
306 | 311 | | |
307 | | - | |
308 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
309 | 320 | | |
310 | 321 | | |
311 | 322 | | |
312 | 323 | | |
313 | 324 | | |
314 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
315 | 363 | | |
316 | 364 | | |
317 | 365 | | |
| |||
467 | 515 | | |
468 | 516 | | |
469 | 517 | | |
470 | | - | |
| 518 | + | |
471 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
472 | 528 | | |
473 | 529 | | |
474 | 530 | | |
| |||
496 | 552 | | |
497 | 553 | | |
498 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
499 | 559 | | |
500 | 560 | | |
501 | 561 | | |
| |||
0 commit comments