Closed savetheclocktower closed 1 year ago
Ideal outcome here, I think, would be to hide both pagination widgets and show a “No Results” blank slate view.
Thanks a ton for reporting this, I'll try taking a look into it, to see if this is an issue with the backend or frontend.
Since absolutely the frontend should ensure that doesn't happen and things like NaN
are the frontend's fault, I also want to make sure the backend isn't returning bad data causing this
So checking on this, seems the backend is submitting some bad data here when the search leaves zero results.
Specifically:
Link: "undefined"
Query-Total: "undefined"
Query-Limit: "undefined"
So this issue will likely need changes in both locations to resolve this one
So I just wanted to mention, thought further review, this error is not of the fault of the frontend.
We can see for example during the package viewing, if there are no results the pagination still has valid values. So this issue is only applicable on this one endpoint.
I've still got a UI quibble about showing the pagination at all in that scenario. It's not like Showing 1 to 0 of 0 entries
makes much more sense than Showing 1 to 0 of NaN entries
.
I fully realize how insignificant this issue is.
@savetheclocktower No that's still a valid point.
So you think showing a static message, such as No packages found
or This request doesn't match any packages
makes more sense? Or of course we can go with the static No Results
return
Yeah, I'd just hide the pagination altogether and show a static message.
@savetheclocktower What do you think of this?
Works for me.
Thanks in advance for your bug report!
Where is the URL that this occurs?
https://web.pulsar-edit.dev/packages/search?q=afjdkslfjdsk
What's your issue?
When there are no results to display, the pagination widget reports
Showing 1 to 0 of NaN entries
.Which OS/Browser/Version does this happen on?
All.
Steps to Reproduce/Additional Details:
Mash your keyboard in the search field and hit Enter.