Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

The next & previous links just link to a random site on the ring #17

Open
zaguragit opened this issue Nov 5, 2022 · 2 comments
Open

Comments

@zaguragit
Copy link

Is this expected behaviour? I tested it with some random sites aswell as mine, I clicked next, and then previous, and almost never went back to the original site.

Also, maybe the ring should have a separate "see a random page" button?

@martymcguire
Copy link
Owner

Thanks, @zaguragit ! It's true that this is not a true "ring". You can see in the code here that /next and /previous just pick a random site in the ring.

I'm open to making it work more like a ring but I also want to keep it simple and efficient. I'm open to ideas for implementing that!

A "see a random page" button could make sense. If you want to pursue that further, please open a separate issue for discussion. (For now folks can feel free to open the directory and choose a site at random. 😄 )

@zaguragit
Copy link
Author

When it comes to the implementation, when clicking on the previous/next buttons, the server is already aware of the index of the current website, so it would just look up the neighbouring indexes, right?
Or it could pre-compute all of the urls every time a new website gets added, which happens far less often than link clicks, so it might be more efficient

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants