Skip to content

Feat: Hash routing for math demo deep links#2

Merged
arossti merged 1 commit intomainfrom
public-demo-hash-routing
Mar 6, 2026
Merged

Feat: Hash routing for math demo deep links#2
arossti merged 1 commit intomainfrom
public-demo-hash-routing

Conversation

@arossti
Copy link
Owner

@arossti arossti commented Mar 6, 2026

Summary

  • Add URL hash routing so math demos can be opened directly via deep links
  • Supports 7 demos: #quadrance, #cross, #weierstrass, #gravity, #color, #rotors, #prime
  • Auto-opens the corresponding demo modal on page load
  • Listens for hashchange events for subsequent navigation

How it works

The hash fragment maps to existing demo link element IDs. On page load (and hashchange),
the handler simulates a click on the corresponding link, which triggers the existing
lazy-init + modal-open logic.

Use cases

  • External links: https://arossti.github.io/ARTexplorer/#quadrance
  • Native macOS app Help menu → opens browser at specific demo
  • Shareable demo links for educational contexts

Test plan

  • Visit https://arossti.github.io/ARTexplorer/#quadrance — Quadrance demo opens
  • Visit #cross, #weierstrass, #gravity — corresponding modals open
  • Visit #color, #rotors, #prime — non-modal demos activate
  • Visit without hash — no demo auto-opens (normal behavior)
  • Change hash in URL bar — demo switches

🤖 Generated with Claude Code

Add URL hash routing (#quadrance, #cross, #weierstrass, #gravity,
#color, #rotors, #prime) that auto-opens the corresponding demo
modal on page load. Enables external links and the native macOS
app to link directly to specific demos.

🤖 Co-Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Andy🤦‍♂️ & Claude🤖 <andy@openbuilding.ca>
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

🤖 Claude Code Review

API Error: x-api-key header is required


ℹ️ About this review

This automated review checks for:

  • Debug statements (console.log)
  • Commented-out code
  • Code duplication
  • Unused variables

Human review required - these are suggestions only.
Diff size: 1633 bytes

@arossti arossti self-assigned this Mar 6, 2026
@arossti arossti merged commit f0acf59 into main Mar 6, 2026
3 checks 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