webcomponents / webcomponents.org

Home of the web components community
https://www.webcomponents.org
Apache License 2.0
363 stars 84 forks source link

[catalog-server] Add a ranking metric #1361

Open justinfagnani opened 1 year ago

justinfagnani commented 1 year ago

We need a default way to rank elements in queries or just browsing the catalog.

There are a number of metrics we could pull from:

Some of these would require writing back to the catalog database, some would require a log-in. So we may want to avoid those.

npm divides these metrics into popularity, quality, and maintenance, which might be a useful way to think about these. It's probably not that useful to allow custom mixing of those metrics like npm allows, but we could internally group metrics into those categories before mixing to rationalize the weights we give different metrics.

Most of these metrics are also per package, not per element, so we run the risk of over-weighting rarely-used/low-quality elements in otherwise high-quality/popularity packages. The only way to address that is with per-element measures like star ratings in the catalog or manifest completeness per element.