Open sigmundpetersen opened 3 weeks ago
hii @sigmundpetersen I'd love to work on this issue as a way to ease back into open source after a break. Could you please assign it to me?
Sure, thanks @saunmanoj888 👍
hii @sigmundpetersen
I have started working on above issue. I have one small query.
When there are a list of product available and user searches for a product which is not available, we show the message No product found
, in such scenario we still want to keep the search and filters right?
The current behaviour is as follow
If we want to achieve above I was thinking of below solution
When user visits product page for the first time, no product is present, search_term is empty, cateogory_id is also nil, we will hide the search and filters section
When products are present, user searches for some product which is not available, search_term is present, cateogory might be selected, @products
object will be empty since searched product is not there, we will still show the search and filters section
the condition that i can use in html.haml
file is
- if products.any? || search_term.present? || cateogory_id.present?
// show search and filters section
please let me know your thought on above
Let's hear from our @openfoodfoundation/core-devs , @RachL , @filipefurtad0 :)
When there are a list of product available and user searches for a product which is not available, we show the message No product found, in such scenario we still want to keep the search and filters right?
Thanks, @saunmanoj888 for bringing this case. Let's keep it in this scenario; it would make sense. Thanks.
the condition that i can use in html.haml file is
- if products.any? || search_term.present? || cateogory_id.present? // show search and filters section
I think it would be fine. Thanks.
When a new person signs up and goes to the admin for the first time, they likely won't have any product.
We want them to really focus on creating new ones or importing them. at the moment in the list we still show the section with search and filters, which is not relevant to people. Let's hide it when there are no products.