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

Back button doesn't work for random card viewing #695

Open
jkomoros opened this issue Nov 2, 2024 · 1 comment
Open

Back button doesn't work for random card viewing #695

jkomoros opened this issue Nov 2, 2024 · 1 comment

Comments

@jkomoros
Copy link
Owner

jkomoros commented Nov 2, 2024

View a card in random mode. Randomize a couple of times. Then try to go back, hit the back button. All of the new collections are not in the back buffer (since no URL changed) so you go back to the first collection you viewed on load.

Perhaps add the card you're viewing currently randomly in the URL so it's in the back buffer?

@jkomoros
Copy link
Owner Author

Any collection that uses sort/random should automatically put the card-id in the URL. Other collections are stable, which means that if you navigate to e.g. c/bits-and-bobs/ then the first card will be the same each time, so there's no need to remember the specific card in the URL.

But every time the random seed is updated, if sort/random is in the active collection, the card changes.

Although note that if you had c/everything/limit/1/sort/random/some-old-id and some-old-id is filtered out of the collection due to the old seed, it would also not show up. You'd need something that special cases sort/random to ignore limit/n or something. Hmmm...

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

No branches or pull requests

1 participant