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

Search results bug #246

Open
jennydaman opened this issue Oct 20, 2021 · 5 comments · Fixed by #252
Open

Search results bug #246

jennydaman opened this issue Oct 20, 2021 · 5 comments · Fixed by #252
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jennydaman
Copy link
Collaborator

Searching for a plugin which does not exist shows "-1 plugins found"

https://next.chrisstore.co/plugins?q=doesnotexist

screenshot

@jennydaman jennydaman added bug Something isn't working good first issue Good for newcomers labels Oct 20, 2021
@patrikhv
Copy link

Hi, can you assign this issue to me? I would like to fix this bug.
Can I get any additional information and tips?

@zrthxn
Copy link
Member

zrthxn commented Oct 20, 2021

@patrikhv
The Plugins list page finds the query param q from the URL to use as search query.

const params = new URLSearchParams(window.location.search)
const query = params.get('q');

It then sends the formatted query object to the store API
If the there are no matches, the API responds with a response that has a shape like so

{
  // ... other keys
  "totalCount": -1
}

This is fine for the API but we don't want to show that "-1" directly. Instead there should be a check that changes the rendered output to something like "No Results" or "0 results"

@zrthxn zrthxn linked a pull request Nov 2, 2021 that will close this issue
@patrikhv patrikhv removed their assignment Nov 29, 2021
@mairin
Copy link
Contributor

mairin commented Jan 24, 2022

Is this one fixed? Can I close it?

@somya51p
Copy link
Contributor

@jennydaman Is this issue still open to work on?? if so please assign it to me.

@somya51p
Copy link
Contributor

@mairin @jennydaman just found a minor bug in the pagination part while searching plugins
Screenshot from 2022-03-30 19-37-29

Kindly assign me this issue so that I can fix it and create a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants