unjs / website

UnJS website Content and Design!
https://unjs.io
Other
129 stars 25 forks source link

Filtering project is not working well #197

Open edimitchel opened 9 months ago

edimitchel commented 9 months ago

Environment

Firefox

Reproduction

Go to packages, try to filter with 'x' and see that no package is shown. nevertheless that it exists ipx

Describe the bug

Capture d’écran 2023-12-06 à 01 23 19

We should be able to filter correctly the packages list, and probably not seeking only the name, but also in the description or tags related to the package.

Also, we could show a message when no package match the criteria

Additional context

No response

Logs

No response

Barbapapazes commented 9 months ago

Hello,

Thanks for the issue! Under the hood, we use MiniSearch and I'm not sure to know how I could configure it to achieve this.

I will add the message for empty text.

lucaong commented 9 months ago

Hello, MiniSearch author here. Here's a relevant comment: https://github.com/lucaong/minisearch/issues/243#issuecomment-1842522975

Barbapapazes commented 8 months ago

I will take a look at this to see if it can help:

Perhaps, you need to match in the middle of terms only for the package name, but not for other fields? If so, you can apply the custom processTerm from the example just for the package name, and use the default processor for the other fields.