impress / impress/impress.js

Replace #fragments in history to avoid cluttering the browser session history

Open
#644 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
38.2k
Forks
6.6k
PR merge metrics
No merged PRs in 30d

Description

Assigning each slide/step in a presentation its own hash / URL `#fragment` is nice because it allows the user to bookmark a specific slide if they want to. But it means that longer presentations create many entries in the browser session history. If I click a link to view a presentation, read through to the end, and then want to return to the previous page, I have to click the browser's Back button many times. Even if you right-click or long-press for a list of recent URLs, it may take multiple backward navigations to actually return to the previous web page.

Moreover, ImpressJS comes with its own navigation controls, so there isn't really any benefit to being able to go backward and forward *within* a presentation by using the browser's own backward/forward buttons. I think it would be better if Impress *replaced* the current history entry whenever showing the next or previous step --- probably by using the `window.history.replaceState()` method?

This would preserve the most important benefits of the URL fragments --- letting the user link to a particular slide if they choose, and returning to the last-viewed slide after following a link and then going back to the presentation --- but without cluttering the browser session history.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing ImpressJS's navigation controls and the code that updates slide or step URL fragments. Check how window.history.replaceState() affects bookmarks, direct links, and returning to the last-viewed slide. Done means moving between steps no longer adds browser session-history entries while fragment links continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.