Skip to content

Phase 2 (5/6): touch support for the person page's ideology bucket tooltip - #461

Open
JeffreyBLewis wants to merge 1 commit into
touch-tooltips-committeefrom
touch-tooltips-person
Open

Phase 2 (5/6): touch support for the person page's ideology bucket tooltip#461
JeffreyBLewis wants to merge 1 commit into
touch-tooltips-committeefrom
touch-tooltips-person

Conversation

@JeffreyBLewis

Copy link
Copy Markdown
Collaborator

Summary

Stacks on #460 so this diff only shows the new commit, `b81e39a`.

Simpler than the party/committee ideology charts: this one binds mouseover/mouseout once to a single shared selection (all histogram bars), not per-point in a loop, so it uses the simple combined `addTouchTooltip` (like the map tooltip sites) rather than the split version.

Correction to the commit message: I miscounted while going through these one at a time and the commit says this "completes Phase 2" -- it doesn't. The original issue (#449) lists 5 files with 6 tooltip sites total (`party.js` has 2): `voteCharts.js`, `party.js` x2, `committee.js`, `personIdeology.js`, and `district.js`, which I'd lost track of. That one's still open -- doing it next.

Test plan

Verified with headless Chromium on /person/29147 (found the correct bar to test by reading the bound datum for the member's own ideology bucket):

  • Desktop (mouse): hover shows correct content and hides on mouseout
  • Touch (iPhone 13 emulation): tapping the member's bucket shows the tooltip with correct content; tapping elsewhere dismisses it; no page errors
  • Full existing 41-check suite (unrelated files, sanity check only) still passes
  • Manual check on an actual touch device, if you get a chance

🤖 Generated with Claude Code

https://claude.ai/code/session_013KJMYfgTNsxrmjHZpZKAHT

…, site 5 of 5)

Last of the 5 tooltip sites from #449. Simpler than the party/committee
ideology charts: this one binds mouseover/mouseout once to a single
shared selection (all histogram bars), not per-point in a loop, so it
uses the simple combined addTouchTooltip (bindTouchTap + bindTouchDismiss
together) like the map tooltip sites, not the split version.

Verified with headless Chromium on /person/29147 (found the correct bar
to test by reading the bound datum for window.memberIdealBucket, since
the tooltip only shows content for the member's own bucket):
- Desktop (mouse): hover shows the correct ideology-score content and
  hides on mouseout
- Touch (iPhone 13 emulation): tapping the member's bucket shows the
  tooltip with correct content; tapping elsewhere dismisses it; no page
  errors
- Full existing 41-check suite (unrelated files, sanity check only)
  still passes

This completes Phase 2 (#449) -- all 5 tooltip sites (vote map, party
map + ideology chart, committee ideology chart, person ideology bucket)
now work on touch as well as mouse.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013KJMYfgTNsxrmjHZpZKAHT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant