Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S sanganak
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab Instance
  • sanganak
  • Issues
  • #6
Closed
Open
Issue created May 30, 2025 by Srinath Menon@sreemenonOwner

Make browser history work

Description

Currently, our HTMX-based calculator application doesn't properly integrate with browser history functionality. When users perform calculations, the browser's back and forward buttons don't work as expected, and the URL doesn't update to reflect the current state of the application.

Problem

  • When users click the browser's back button after performing calculations, they don't return to their previous calculation state
  • Calculations aren't bookmarkable via URLs
  • Users can't share specific calculation states via links
  • Browser refresh causes loss of calculation history

Desired Outcome

  • Implement HTMX's history extension to maintain proper browser history
  • Each calculation should update the URL with a unique, shareable state
  • Browser back/forward buttons should navigate through calculation history
  • Page refreshes should restore the current calculation state

Implementation Details

  • Integrate HTMX's hx-push-url attribute to update browser URL with each calculation
  • Use hx-history extension to manage browser history
  • Ensure Django backend can handle direct URL access to specific calculation states
  • May require storing calculation state in the URL or implementing a state restoration mechanism
  • Consider using SolveHistory model to maintain calculation history

Acceptance Criteria

  • Browser back button navigates to previous calculation state
  • Browser forward button navigates to next calculation state
  • URLs are updated with each calculation and are shareable
  • Page refresh maintains current calculation state
  • All existing calculator functionality continues to work properly
Assignee
Assign to
Time tracking