rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
2.93k stars 597 forks source link

Add keyword navigation that displays related keywords and lets you add more keywords to narrow to the intersection #489

Open carols10cents opened 7 years ago

carols10cents commented 7 years ago

As suggested by @pornel on PR #488:

Maybe categories could be built from tags the way StackOverflow does it?

Every tag search page has "Related tags" in sidebar that narrows down the search:

https://stackoverflow.com/questions/tagged/rust https://stackoverflow.com/questions/tagged/rust+ffi https://stackoverflow.com/questions/tagged/rust+ffi+python https://stackoverflow.com/questions/tagged/rust+ffi+python+numpy

That seems to automatically create a good hierarchy.

I think this would be a great navigation affordance to add to keywords, regardless of categories!

jan-hudec commented 7 years ago

This works great for StackOverflow, but they have the tag wikis and their editing is reputation-gated—and I think crates would need some similar mechanism. I think this could use:

  1. Number of downloads of crates you are uploader of could work as reputation.
  2. Tag descriptions could be suggested by anybody, but published only by users with certain reputation.
  3. Crates could be retagged by anybody with enough reputation, independent of uploading of new versions.
  4. There should be a mass retagging interface, requiring even more reputation, for larger restructuring of the tag cloud.

I think categories could develop into this. We can start with category set defined in #488, add the editing support and then switch from the categories defined in Cargo.toml to those set on the server.

carols10cents commented 7 years ago

@jan-hudec Sorry, I meant for this issue just to be about adding a feature so that you could click on a keyword, then click on another keyword, and then you would see the crates that had both those keywords. That is, this issue is only about how you're able to navigate using existing keywords, not how keywords get assigned to crates. If you'd like to propose that someone other than crate authors could decide what keywords a crate should have, could you open a new issue?