The goal would be to have a single dropdown that could manage state based on the version for both releases and library detail pages to convey correct information based on the selected version. Goal is to investigate and implement those changes. more tickets may be built off this parent.
library detail page: we can make it so they won't be able to go to a version that doesn't have the library, blocking the redirect based on disabled attr on the select option
libraries pages: they shouldn't be able to get to that state, not through any link we provide them at least. If they put it into the URL then that's on them.
Assume that a user may think they are very clever, and simply modify a URL to go someplace, or that the state could get wonky and the cookie (or wherever the selected version is stored) could get out of sync and take you to an incorrect page, so we should have a potential response like "this library does not exist in this version"
We should probably just add a global dropdown_versions context variable via a context processor, like we do for current_version (which should maybe be renamed to selected_version)
We should probably cache the contents of that variable, with something like a 10-30-minute TTL; only one "unlucky" user per that time period would hit the db to get the list.
Library detail page will need to further filter the list to only versions compatible with the library in question
The goal would be to have a single dropdown that could manage state based on the version for both releases and library detail pages to convey correct information based on the selected version. Goal is to investigate and implement those changes. more tickets may be built off this parent.
library detail page: we can make it so they won't be able to go to a version that doesn't have the library, blocking the redirect based on disabled attr on the select option
libraries pages: they shouldn't be able to get to that state, not through any link we provide them at least. If they put it into the URL then that's on them.
Assume that a user may think they are very clever, and simply modify a URL to go someplace, or that the state could get wonky and the cookie (or wherever the selected version is stored) could get out of sync and take you to an incorrect page, so we should have a potential response like "this library does not exist in this version"