Keep the subpage when going to latest version#454
Conversation
|
Also I haven't found a test case for an item that was deleted/moved between versions, if anyone knows of one please let me know! |
|
Fixed the bug with a different platform. I've tested the following manually:
If anyone has suggestions for how to set up unit tests, I'd be happy to hear them! I'm not sure how to ensure that certain crates exist in the database :/ |
|
This does not address the following issues:
|
|
This is ready for review. |
|
This is fantastic, thanks so much @jyn514 |
Addresses rust-lang#200 If the page does not exist on the latest version, searches for a page with that title.
Previously, if 1. Going to a new version that 2. Deleted the existing module/item and 3. The user is looking at a platform other than the default, then the link was wrong. This is now fixed.
992f870 to
e862706
Compare
QuietMisdreavus
left a comment
There was a problem hiding this comment.
Thanks so much! This is really great functionality for the site, and no doubt it's one of the more requested features we've had. I just have a couple of nits about comments, but otherwise this looks great!
|
Added comments as requested :) Thanks for taking a look at this! |
QuietMisdreavus
left a comment
There was a problem hiding this comment.
Thanks so much! Let's get this merged.
|
Thanks for doing this! |
Addresses #200
If the page does not exist on the latest version, searches for a page with that title.
~~TODO: If
then the link will be wrong (it will not include the name of the crate).~~
The solution is to check ifreq_path[3]is the crate name or the platform. Once this is done, #200 (comment) will be trivial to fix.This is fixed, see below.