HomeKitty
HomeKitty copied to clipboard
Create search filters
Since in the current database we only keep track of the price of each accessory in USD, we could start by creating a filter by pricing. The user should be able to filter for a price range. It could behave similar to the Airbnb price slider.
In the future, we may be able to add multiple currencies or maybe each accessory could contain the supported countries. Let's keep this in mind so that maybe we can reuse this filter feature even in that case.
For the first version of the filters feature, we could simply have an advanced search that allows to sort by price, released date and availability.
This is still to be done. The first step may be to simply have an "Advanced Search" page (with a button just below the current search text field in the sidebar) where we have some sliders regarding the price and some simple checkboxes to let users filter based on AirPlay 2 support, requirement of a bridge, availability and region of availability. The search results would be displayed in the same page as the current version.
The accessory price should be changed from String to Double for better better search on price
Yes, I agree. Right now in the production DB we also have some accessories which don't have a price yet but we still want to display, so we could transform it like this:
- Price is -1, display N/A.
- Price is a number different than -1, display it with the $ in front, so $29.99.
We could first do this change, deploy to staging and production and start building the feature.
I don't like the idea of "no price" == -1. I actually prefer to have NULL.
If persons want items between 0 and 100 dollars it is more performant to do
select items where item.price < 100
than select items where item.price < 100 && item.price >= 0
Sure, that is also a possibility, we just need to make sure to update the contribution form too then 👍
Sure! Let's start with staging and get some experience there