Skip to content

Add an option to order crates by last updated time #1210

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
carols10cents opened this issue Dec 21, 2017 · 6 comments
Closed

Add an option to order crates by last updated time #1210

carols10cents opened this issue Dec 21, 2017 · 6 comments
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@carols10cents
Copy link
Member

Add to at least the API (and may as well add to the UI as well) the option to sort by last updated.

Crates' last_updated time is changed when a new version is published. This sort should put crates that have had a new version published most recently first.

This should be as straightforward as adding an ORDER BY; this is not a stream of new versions. That is, if this set of events happens:

  • 3 days ago: crate A published version 1.0.0
  • 2 days ago: crate B published version 0.5.0
  • 1 day ago: crate A published version 2.0.0

The list of crates ordered by last updated time should be:

  • 1 day ago: crate A
  • 2 days ago: crate B

As opposed to:

  • 1 day ago: crate A
  • 2 days ago: crate B
  • 3 days ago: crate A
@moore3071
Copy link
Contributor

I'd like to go ahead and tackle this, but I have two clarifying questions first.

  1. Has there been any progress on Provide a database snapshot to facilitate development. #630. If not would it be possible to get a one-time sanitized snapshot for working on this?
  2. Should we discuss breaking down the Krate::search function as mentioned here?

@carols10cents
Copy link
Member Author

There has not been any progress on #630, and unfortunately I don't have time in the near future to make a recent sanitized snapshot.

I think it should be possible to publish just a few crates and versions to your local crates.io to get enough data for testing this out-- instructions are here. Let me know if there are any problems with the instructions!

If you'd like to try refactoring krate::search, please feel free!! I don't want to make that a precondition of this change, though, so it's up to you :)

@moore3071
Copy link
Contributor

I unfortunately can't publish any crates to my local crates.io until #1254 is resolved, and therefore won't be able to properly deal with this until that issue is resolved.

Since I'd be hesistant to work on an issue that somebody else has called dibs on, I'd like to say that anyone can go ahead and take on this issue in the meantime

@moore3071
Copy link
Contributor

Now that my issue with my local crates.io is resolved, I was able to address this issue. I didn't refactor krate::search, but the new functionality is in place along with access to it from the frontend.

bors-voyager bot added a commit that referenced this issue Jul 21, 2018
1264: Recently updated sort r=carols10cents a=moore3071

Allow sorting by which crates were most recently updated as mentioned in #1210. The option is called 'recent-updates' in order to match the naming convention of 'recent-downloads'

Co-authored-by: Brandon Moore <[email protected]>
Co-authored-by: Carol (Nichols || Goulding) <[email protected]>
@jtescher
Copy link
Contributor

@carols10cents can this issue now be closed as well? Seems like the work has been done.

@carols10cents
Copy link
Member Author

Sounds good!

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works and removed C-feature-request labels Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

No branches or pull requests

4 participants