Phase 2 (5/6): touch support for the person page's ideology bucket tooltip - #461
Open
JeffreyBLewis wants to merge 1 commit into
Open
Phase 2 (5/6): touch support for the person page's ideology bucket tooltip#461JeffreyBLewis wants to merge 1 commit into
JeffreyBLewis wants to merge 1 commit into
Conversation
…, 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
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
🤖 Generated with Claude Code
https://claude.ai/code/session_013KJMYfgTNsxrmjHZpZKAHT