8356
Wx
www-xonecas-io / files
www-xonecas-io / tickets / 1035-let-s-add-a-tooltip-that.md
1.9 KB
1--- 2id: 1035 3title: "Let's add a tooltip that:" 4type: feature 5status: done 6priority: p2 7created: 2026-11-08T05:11:47Z 8updated: 2026-11-08T16:01:21Z 9source: devnote 10moves: 2026-11-08T05:11:51Z inbox doing drag; 2026-11-08T05:18:13Z doing review agent; 2026-11-08T16:01:21Z review done drag 11area: site 12--- 13 14- Starts at "Don't click!". 15- Then for every click it changes to some other sentence telling the user to stop. think glad os (from portal) tone. Lighthearted. Generate like 50 sentences for the pool 16 17## Context 18 19Filed from `http://192.168.122.10:8080/`, on `img.rounded-[2px]`. 20 21> An image 22 23## Notes 24 25- 2026-11-08 05:18Z (agent): Done: the logo face in the header has a tooltip that starts at 'Don't click!'. On the home page, each click swaps it for a random line from a pool of 50, in a dry, lighthearted GLaDOS-ish tone, never the same line twice in a row. Examples: 'I've logged that. For science.', 'This face has feelings. Mostly annoyance.', 'You've unlocked: nothing. Keep going and unlock more nothing.' The lines are my own, not Portal quotes. The 10-clicks-in-10-seconds game link still works as before. On other pages a click still goes home, where the tooltip starts at 'Don't click!' again. 26 27 How it works: a small ink bubble (#quip) under the face, shown on hover or keyboard focus. I used CSS instead of a title attribute because a native title tooltip doesn't refresh while it's showing. Long lines wrap at 18rem, so at 390px it stays on screen (288px wide, no horizontal scroll). Pool and click handling: static/egg.js. Markup: the header in components.html. 28 29 Checked in agent-browser: Tab to the face shows 'Don't click!', and two Enters changed it twice with the URL staying /. go test passes. Not checked: real mouse hover. Tailwind puts hover rules under @media (hover:hover), and the headless browser reports no hover, so I checked the focus path, which uses the same markup. Also, on touch screens there's no hover, so the bubble only shows after a tap.