Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go back to example page with browser Back-button #5750

Merged
merged 9 commits into from
Apr 3, 2024
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Apr 2, 2024

What

This uses the History API to manipulate the web history.

When leaving the example page, two entries in the history are added:

  • ?examples (shows the examples)
  • ?url=https://….rrd (the url for the example)

This is then parsed on popstate. We thus support both going forward and back in history.

This is not perfect, but a lot better than before.

Best reviewed commit by commit.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@emilk emilk added 🕸️ web regarding running the viewer in a browser 📺 re_viewer affects re_viewer itself include in changelog labels Apr 2, 2024
crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/web.rs Outdated Show resolved Hide resolved
crates/re_viewer_context/src/store_hub.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit 027e16d into main Apr 3, 2024
34 of 35 checks passed
@emilk emilk deleted the emilk/web-history branch April 3, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 📺 re_viewer affects re_viewer itself 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web viewer navigation (back-button)
2 participants