timoh / craftbeer

the Craft Beer finding app for Finland, written on Rails
1 stars 1 forks source link

Entering the all drinks view for the first time doesn't show any drinks #11

Closed timoh closed 8 years ago

timoh commented 8 years ago

Steps to reproduce:

1) Press "Let me type in my address" 2) Type in "Isokaari, Helsinki" 3) Press "Show all drinks.." (blue button)

Observe:

Filter is at 10 km, but no drinks are shown in list.

To verify that the distance is not the problem:

1) Toggle "Show non-stocked drinks"

Observe: Now there are stocked drinks

Note: Afterwards, toggling "Show / hide non-stocked drinks" doesn't change the situation any more.

techstalgist commented 8 years ago

The default distance is 2km. No stores are within 2km of Isokaari, Helsinki. Thus no drinks are shown because by default non-stocked drinks are not shown. Non-stocked in this context also refers to the situation where no stores match the filters.

The bug is that changing max distance to 10km should update the visibility of drinks but now it doesn't.

techstalgist commented 8 years ago

The issue is fixed in commit https://github.com/timoh/craftbeer/commit/43f746542e9485f41f2c837fa66e1d7899122b10.

However, if a drink should be shown when no stores match the distance filter, that would require additional fixes.