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

Add advanced search options #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add advanced search options #77

wants to merge 1 commit into from

Conversation

confused-Techie
Copy link
Member

This PR adds the ability to take advantage of the additional query parameters that already exist on the backend when searching for packages. Letting users take full advantage of these features when on the web, not just within the editor.

Adds the ability to:

Sort Search Results by:

  • Relevance
  • Downloads
  • Created At
  • Updates At
  • Stars

List the results in the direction:

  • Descending
  • Ascending

The results just like the search text itself will remember what was selected prior to navigating to a page, and does properly effect the search results. They match the theme that's in use and are relatively responsive. (Although it may be worth looking at disabling these on smaller screens or having these options as an expandable view rather than always visible)

image

Closes #48

@Daeraxa
Copy link
Member

Daeraxa commented Feb 17, 2023

Could we maybe just use dropdowns for this? It would then be a really easy UI to extend with new categories if we needed to and don't really have to worry about screen estate (for example we can already use the result bar thing).

e.g. (quick and dirty html edit)
image

@savetheclocktower
Copy link
Contributor

I also wonder if we can omit the ascending/descending decision. I have a hard time imagining anyone would want to search for the oldest, least-starred, least-downloaded, least-relevant, or least-recently-updated packages.

@meadowsys
Copy link
Member

If its not too difficult to implement (well, it already is implemented), then I think its worth keeping. Maybe someone wants to just do some package exploring (least relevant, use a keyword to start and just explore I guess?), or find some underappreciated packages (least starred, least downloaded), or want to find some package that they find interesting to revive (oldest)? It certainly doesn't hurt to keep it, I think

@savetheclocktower
Copy link
Contributor

In those scenarios they could also sort for (e.g.) most stars, then jump to the end of the results. But I don't think it's a big problem; just throwing an idea out there.

@Daeraxa
Copy link
Member

Daeraxa commented Feb 18, 2023

Yeah the fact that it already has the double arrows on the page results kind of renders the search order unnecessary.

I don't know if the package metadata has anything at the moment but we might want to consider a "filter" option as well that could filter themes, Pulsar specific packages etc.

Another idea I was thinking is the possibility of doing github style queries in the search. For example:

is:theme author:bob sort:relevance searchterm

Definitely not anything essential though.

@DeeDeeG
Copy link
Member

DeeDeeG commented Feb 18, 2023

I'm just here to say this seems really neat, from the screenshot alone!

@confused-Techie
Copy link
Member Author

So @Daeraxa we could search only by themes by providing theme/search?q=... so that is possible, to provide theme only results. It would just be under a different URL.

But @DeeDeeG thanks!

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.

Drop Down for Advanced Package Searching
5 participants