Skip to content
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

improve Package search sorting #860

Merged
merged 8 commits into from
May 14, 2024

Conversation

jderochervlk
Copy link
Contributor

@jderochervlk jderochervlk commented May 13, 2024

  • increase number of included packages from 250 to 750 (currently 512)
  • filter out packages with a low maintenance score (< 0.3) and add in a filter to show "outdated" packages
  • add query params to npm registry api call to adjust weights to favor maintenance and quality
  • sort by weight in the UI
  • filter out packages with "reason" in the title to keep the focus on ReScript specific packages

image

Before After
image image
image image

Copy link

vercel bot commented May 13, 2024

@jderochervlk is attempting to deploy a commit to the ReScript Association Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@fhammerschmidt fhammerschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice work

src/Packages.res Outdated
->Js.Array2.concat(parsePkgs(data2))
->Js.Array2.concat(parsePkgs(data3))
->Js.Array2.filter(pkg => {
if [/* Allow list of names */]->Js.Array2.includes(pkg.name) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do a

let allowList = []

somehwere at the beginning of the file already then you don't need the comment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

src/Packages.res Outdated Show resolved Hide resolved
src/Packages.res Outdated

Belt.Array.concat(filteredNpm, filteredUrls)
Belt.Array.concat(filteredNpm, filteredUrls)->Belt.Array.concat(filteredOutdated)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is also Belt.Array.concatMany([])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@fhammerschmidt fhammerschmidt merged commit 67ecba3 into rescript-lang:master May 14, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants