Skip to content

Modernize demo site and make it mobile-friendly#111

Merged
AdamTyler merged 1 commit into
masterfrom
docs/readme-badges
Jun 17, 2026
Merged

Modernize demo site and make it mobile-friendly#111
AdamTyler merged 1 commit into
masterfrom
docs/readme-badges

Conversation

@AdamTyler

Copy link
Copy Markdown
Owner

Summary

Rewrites the GitHub Pages demo with a self-contained, responsive, mobile-first design and fixes the broken dev/docs builds.

Demo modernization

  • Drop CDN dependencies — removes Bootstrap 4-alpha, jQuery, and Tether in favor of modern CSS (custom properties, grid, clamp() fluid type). Keeps the GitHub Star button.
  • Light/dark theme toggle — persists to localStorage, respects prefers-color-scheme, and applies before paint to avoid a theme flash. Drives the whole page via CSS variables, including the static header/footer.
  • Accessible mobile collapse — replaces the jQuery/Bootstrap collapse (and the window.innerWidth useEffect hack) with a React-controlled config panel (aria-expanded/aria-controls) that collapses on small screens.
  • Mobile ergonomics — responsive control grid, 44–48px touch targets, full-width Roll All on mobile, re-themed dice stage and spinner, prefers-reduced-motion support.

Build fix

The npm start and npm run docs builds were broken: ts-loader defaulted to tsconfig.json, whose rootDir: ./lib (used for the npm package build) excludes index.tsx/src, triggering TS6059. Adds tsconfig.docs.json (rootDir: ".", includes lib/src/index.tsx) and points both webpack configs at it.

Verification

  • npm run typecheck
  • npm test → 38/38 ✅
  • npm run docs → compiled successfully; docs/ rebuilt ✅

🤖 Generated with Claude Code

Rewrite the GitHub Pages demo with a self-contained, responsive design:

- Drop Bootstrap 4-alpha, jQuery, and Tether CDN dependencies in favor of
  modern CSS (custom properties, grid, clamp-based fluid type). Keep the
  GitHub Star button.
- Add a light/dark theme toggle that persists to localStorage, respects
  prefers-color-scheme, and applies before paint to avoid a theme flash.
- Replace the jQuery/Bootstrap collapse with an accessible, React-controlled
  config panel that collapses on mobile; remove the window.innerWidth hack.
- Responsive control grid with larger touch targets, full-width Roll All on
  mobile, and a re-themed dice stage and spinner.

Fix the broken dev/docs builds: ts-loader defaulted to tsconfig.json, whose
rootDir (lib) excludes index.tsx/src and triggered TS6059. Add tsconfig.docs.json
(rootDir ".", includes lib/src/index.tsx) and point both webpack configs at it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AdamTyler AdamTyler merged commit 9ad3372 into master Jun 17, 2026
1 check passed
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