-
Notifications
You must be signed in to change notification settings - Fork 215
All Products block with filters: avoid showing loading placeholders if there are no results #1138
Conversation
…f there are no results
|
In situations where there are no search results I would suggest:
"No products found matching your criteria"
The act of moving the filters around shows where there are products, and shows when there aren't products. It's a natural act, and one of the few scenarios where I'd be ok seeing no results, as long as there was a clear message that said so. cc @pmcpinto and @garymurray |
|
Thanks for the feedback @jwold. I updated this PR so the Sort select is hidden and a message appears when there are no products matching the current filters. I updated a screenshot on the PR description so you can see how it looks in case you have any design suggestion. |
|
Thanks @Aljullu! That looks great. |
|
I'm not fond of the text "No products found matching your criteria." for this tbh. This text applies if no products are found which could be caused by having no published/purchasable products at any time, or if we roll out this system to other grid blocks the admin may setup blocks with criteria that match no products. It's not necessarily 'your criteria' unless you are using filters. Also not sure why we would use 'criteria' wording here instead of the more obvious "filters" or "search"? I think there needs to be 2 messages, one of which being more generic. No filters active, but no products found:
(or similar) Filters active:
I think the later could use a reset link but I guess it's not mandatory, unless the user isn't using active filters block.. so there may be a use case for a simple reset button. I am also a fan of blank state images/graphics, but maybe that's not suitable here :) |
|
Good feedback @mikejolley! Makes sense to have two different messages. I'm fine with using the wording you suggested, or we could tweak it a bit: If we want to use an illustration I can clean these up (including them as SVGs just in case you want to just go live with them now) cc @garymurray as well for feedback on the illustrations. |
|
First minor thing - I think the text under top two illustrations is incorrect - it currently now says: With regards to the illustrations:
With regards to customisation:
|
|
These are cool @jwold thanks. Let me try implementing them in a PR, then we can iterate on design as needed. |
|
I have this working but out of time, Ill commit this up in the morning. |
|
Reported this on #1178 but I see it was here as well, having no products seems to cause the filter by price slider to have NaN, previously, it just didn’t load |
This was expected as it's unreleased :) |
|
Gonna close in favour of #1178 |



Fixes #1137.
Screenshots
Before:

After:

How to test the changes in this Pull Request:
Questions
Even though I marked this PR as
needs review, in some way I feel it's still in progress because it would make sense to answer these two questions first: