dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
790 stars 146 forks source link

Analysis issue, Dart 3 incompatible package is Second Result - Should we push it down in search rank results? #7865

Closed sethladd closed 3 weeks ago

sethladd commented 4 months ago

URL: https://pub.dev/packages?q=authentication

I searched for "authentication", and I saw:

Screenshot 2024-07-11 at 11 49 23 AM

Observation:

Insight:

Suggestion:

Hypothesis:

isoos commented 4 months ago

This is an exact package name match, and it is automatically promoted to the top (after the SDK results if there is any).

I'm not sure if would help ranking these down, as previously it was an explicit request from users that we should expose such packages at the top.

FMorschel commented 3 months ago

One idea I had was to simply place one new checkbox at the left that would be something like "Show only packages with no analysis issues" (probably a simpler name but that would be the intent).

And something else I was thinking. Is there any way for the website to save "user preferences"? That check (and maybe Dart 3 compatible) could be set there so that every time someone (logged in or by the browser-specific setting) searches for anything those filters are set.

This is an exact package name match

In cases like this, we could create a warning or at least place a more compact version for the package tile. The compact version could also be used for SDK results that are promoted today.

isoos commented 3 months ago

With the recent adjustments for the results from the SDK libraries, the result page is cleaner: we have the exact name match as the top result, which is to be expected, and the rest coming along after that. The package, while not Dart 3 compatible, seems to have some use, so completely hiding may not be an ideal option for all users looking for it.

FMorschel commented 3 months ago

Sorry, I don't think I was clear enough.


First, let these two options for "No analysis error" and "Dart 3 compatible" by themselves on the left. Above the collapsing groups or in a new collapsing group just for them, and for that group to be opened. Such as the platforms one is today.

That would ensure the user can see what is being "hidden".


Secondly, regarding the exact name result, I prefer the suggestion of simply creating a more compact version of the tile to show even when these specific checks don't allow it.

Also, I believe that there could be something else (even today) to indicate that the result with the exact name match is at the top simply because of that. Something like a different background colour or something similar.

I agree that hiding it would not be ideal, and with the right checks marked today, it does that anyway. Of course, currently, it adds the test to the search, but if the user has checked anything previously, changed the text, and they are still looking for the exact name match, they have no indication that such a package exists.

See this with no checks: image

See this with "Dart 3 compatible" checked: image


Lastly, I also suggest that there could be some form of saving (mainly/only these) checkbox states between sessions. Since we want to move forward with our ecosystem, if someone has no old projects and/or has recently joined the community, it makes no sense for us to keep showing them something they can't use. If they still want to see something outdated or with analysis issues, they can simply uncheck the options at any given time.

sethladd commented 3 months ago

I see the challenge here.

In the former, I can see why we want to optimize for "exact match wins and is first result, no matter any other ranking signals".

In the later, I can see an argument for using opinionated ranking signals to inform rank order, such as "is Dart 3 compatible?" and "no analysis errors?" and "is a Favorite package" and "has high score" etc etc

+1 to the idea that we find ways to see the options under "Advanced" as those look really really useful. Consider:

Regardless, I'm glad that dart:html no longer is the top result for "authentication", thanks for fixing that!

sigurdm commented 3 months ago

I suggest showing direct name matches "out of band" (ie. not in the regular list of results):

Something like this mockup: image

FMorschel commented 1 month ago

The last comment by @sigurdm is similar to how things are showing up for me today (it doesn't show that it is incompatible, version and time, but it is similar). Thanks a lot!

sigurdm commented 3 weeks ago

Yeah - I think the recent changes have fixed this.

@isoos do you think we can close this?

isoos commented 3 weeks ago

Yeah, this has been fixed.