atom / settings-view

šŸ”§ Edit Atom settings
MIT License
272 stars 276 forks source link

Restore package search ordering by popularity #1128

Closed ghost closed 5 years ago

ghost commented 5 years ago

Description of the Change

This PR reverts https://github.com/atom/settings-view/pull/1042/commits/38b9408d6d569a40879d8c60c426dcea398ad979. It adds reasonable sorting of package search results, instead of relying on the sort order from the cloud search API.

A couple of other items to note:

After this PR, the search ordering on atom.io's package search will differ that of settings-view (and then, apm). Ideally we would make this change on atom.io, but that backend isn't open source, so we're stuck with this.

Given this is a reversion of a previous PR, I feel I should motivate the need. It can be seen in many comments since the original sorting was removed:

Please consider adding this feature. When I try to search for a package to add sometimes the top three results will each have only 2-4 stars and somewhere far down the page a much more developed and stable package with 200,000 stars will almost be overlooked.

It leads people to install packages that might not be production ready when much better options are out there. ā€” @charrismatic link

I think to have the option to sort the packages by stars or downloads is a good idea ā€” @MarcusE1W link

It would be very helpful to be able to sort by downloads.

On the SublimeText packagecontrol.io, I find that the most used extensions are often ones that have been tested and are more complete. Today I searched for react native and there are over a dozen pages to dig through. ā€” @pale2hall link

One important difference between atom.io and settings-view is that the latter doesn't have pagination, so the sort ordering is especially important in settings-view.

Alternate Designs

Benefits

Atom users are more likely to find plugins which have downloads, indicating that they solve a need, are well described, and that previous searchers found them promising.

Possible Drawbacks

Any plugins that don't have downloads will be disfavored.

Applicable Issues

None.

/cc @50Wliu

lee-dohm commented 5 years ago

Thanks very much for the suggestion and the work you put into this.

We believe that this would be a step backward and the real solution is to fix the search behind the API. Because of that, we've decided to not accept this change.

ghost commented 5 years ago

My concern is this is a case of "We'll eventually get around to the perfect solution", but in practice it will never happen. ("Perfect is the enemy of good".)

If there aren't short term plans to improve the search API, would you be open to accepting this PR and reverting it once the backend is improved?

ghost commented 5 years ago

Having thought about this a bit more, per @MarcusE1W maybe we should add an option for sorting. What do you think?