Skip to content

Fix mismatch in crate versions between pages #2751

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

Closed
wants to merge 1 commit into from

Conversation

camelid
Copy link
Member

@camelid camelid commented Sep 5, 2020

Fixes #2710.

For example with clap, in the search results (/search?q=clap) the
crate version was shown as 3.0.0-beta.1, whereas on the crate's page
(/crates/clap) it was shown as 2.33.3.

The issue was that the search results were showing the maximum version,
not the newest version, which I believe is what the crate page was
showing.

Also added a missing "the" in a hover title.


@rustbot modify labels: A-frontend A-versions C-bug

For example with `clap`, in the search results (/search?q=clap) the
crate version was shown as `3.0.0-beta.1`, whereas on the crate's page
(/crates/clap) it was shown as `2.33.3`.

The issue was that the search results were showing the *maximum* version,
not the newest version, which I believe is what the crate page was
showing.

Also added a missing "the" in a hover title.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sgrif (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@camelid
Copy link
Member Author

camelid commented Sep 5, 2020

I'm new to both Ember and working on crates.io, so I would appreciate it if you could make sure that I'm understanding the crates.io versioning models correctly!

@camelid
Copy link
Member Author

camelid commented Sep 5, 2020

The version template which represents the crate page (/crates/clap) seems to be referencing an attribute on the controller called currentVersion which is an alias for model.version, but I could only find max_version and newest_version in the crate model:

@attr('string') max_version;
@attr('string') newest_version;

@@ -28,7 +28,7 @@
<div local-class="updated-at" >
{{svg-jar "latest-updates" height="32" width="32"}}
<span>
<abbr title="The last time crate was updated">Updated:</abbr>
<abbr title="The last time the crate was updated">Updated:</abbr>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or this maybe to match the other hover titles?

Suggested change
<abbr title="The last time the crate was updated">Updated:</abbr>
<abbr title="Last time crate was updated">Updated:</abbr>

@camelid
Copy link
Member Author

camelid commented Sep 5, 2020

It looks like there's still a version display mismatch with inkwell:

image

image

@camelid
Copy link
Member Author

camelid commented Sep 5, 2020

So this probably shouldn't be newest_version, it should be whatever the crate page is using. Does the crate page display the maximum version that's not alpha/beta/etc.?

@rustbot rustbot added A-frontend 🐹 A-versions C-bug 🐞 Category: unintended, undesired behavior labels Sep 5, 2020
@bors
Copy link
Contributor

bors commented Sep 28, 2020

☔ The latest upstream changes (presumably #2825) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crate version in search results doesn't match version on crate page
5 participants