Skip to content

Fit the birthday-problem curve on phones - #103

Open
A7med7x7 wants to merge 2 commits into
mainfrom
autopilot/fit-birthday-curve
Open

A7med7x7 wants to merge 2 commits into
mainfrom
autopilot/fit-birthday-curve

Conversation

@A7med7x7

Copy link
Copy Markdown
Member

From the 390 px audit in #78: "The birthday problem" curve in Discrete Mathematics birthday-problem had a 420 px minimum width, 120 px too wide for a phone.

Fix

  • The SVG scales to the screen width below sm; the 420 px minimum still applies from sm up.
  • The axis labels (1, .5, 0, the 50% crossing and the right end) get an 18-unit font on phones, so they stay at least 13 px tall after scaling.
  • The group-size label and slider wrap, and the slider is capped at the panel width.

Checked

  • Playwright at 390 px (light and dark) and 1280 px: 0 px overflow. The smallest label is 13 px on a phone and 15 px on desktop. Screenshots checked, and the readout still shows 23 people → 50.7%.
  • npm run lint: 0 errors. npm run test: 3,691 passed. npm run build: OK.

Branched from main, independent of the exam PRs.


Generated by Claude Code

The probability curve in birthday-problem had a 420 px minimum width,
120 px wider than a 390 px phone. It now scales to the screen below
sm, its axis labels use larger font sizes there (18 user units, at
least 13 px on screen) so they stay readable, and the group-size row
wraps with the slider capped at the panel width. Desktop is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp

This branch has not been deployed

No deployments
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.

2 participants