Docs.rs: "Releases by Stars" should only show one crate per github repository

Created on 20 Aug 2020  路  7Comments  路  Source: rust-lang/docs.rs

Thank you for providing this great site for the Rust ecosystem.
docs.rs has the page where is shows all releases sorted by Github stars. The pages have become so crowded that it is very hard to see anything in them anymore. As an admittedly extreme example, the pages from page 9 to page 210 contain different versions of the rustc-ap-* crates.

I see two problems there:

  1. The page lists all versions of the same crate and assigns them the same number of stars. This makes all the versions appear next to each other in the list. This just crowds the list without contributing much information.
  2. Some crates like the deno and rustc-ap-* ones are part of a collection of crates which are all managed in the same repository. As such they all have the same number of stars and appear next to each other in the list. This can also be on purpose. Grouping into some repository entry, which can list multiple crates could also be a solution.
A-frontend E-medium P-low mentor

Most helpful comment

One way to do it might be to group by repository url (especially since that's what determines the "stars").

All 7 comments

Would it help if we deduplicated the releases and showed at most 1 release per crate? Then instead of 10 copies of deno, you'd get each deno crate once, taking up 1 page instead of 9.

Yes, I think that would already help a lot.

Mentoring instructions: In https://github.com/rust-lang/docs.rs/blob/c3cfbc862320350ac1de3cc32606b5cb7c04ee40/src/web/releases.rs#L88
add AND crates.latest_version_id = releases.id. Please also add a test for the new functionality. There are examples near https://github.com/rust-lang/docs.rs/blob/c3cfbc862320350ac1de3cc32606b5cb7c04ee40/src/web/releases.rs#L1069.

Hmm, #989 addressed the first point but not the second, it would be nice to group crates by workspace. That seems like a lot more work, though.

One way to do it might be to group by repository url (especially since that's what determines the "stars").

Oh wow. Thank you for implementing that so quickly :) I wanted to take a look at implementing it this evening.

I consider this issue solved for now. Grouping crates by repository was just an idea, but for most crates/repositories not that relevant Feel free to keep the issue open though if you like the idea.

If you're looking for other opportunities to contribute let me know! Anything marked E-easy or mentor would be a good first issue :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nemo157 picture Nemo157  路  5Comments

jyn514 picture jyn514  路  5Comments

spacejam picture spacejam  路  3Comments

ghost picture ghost  路  3Comments

pietroalbini picture pietroalbini  路  4Comments