azavea / cac-tripplanner-android

GoPhillyGo Android app
https://gophillygo.org
Apache License 2.0
3 stars 3 forks source link

Feature/kak/grid to list#15 #80

Closed flibbertigibbet closed 6 years ago

flibbertigibbet commented 6 years ago

Overview

Implements the grid of buttons on the home view. Loads a random representative image for each category into the category's grid square, or hides the category's grid square if nothing matches its filter. Opens place view with filter in place.

Also fixes filters being lost on screen rotation and implements scrolling of the home view carousel with the grid content.

Demo

screenshot_1528756276

Notes

Does not attempt to ensure the images picked are unique; in practice currently, duplicates seem to be fairly uncommon.

Implements filtering by database query, as the original filtering implementation relied on string searches outside the database.

Closes #15 Fixes #78 Fixes #29

flibbertigibbet commented 6 years ago

Although filters are now preserved on screen rotation, they are not preserved on back navigation. That might call for a separate issue.

maurizi commented 6 years ago

Now that we have the ability to start a filterable activity with a filter already set, it would be good to carry the filter over when moving from events<->destinations or list<->map.

I imagine it would be pretty small to tack that onto this PR, but opening another issue to tackle it later would be fine too.

flibbertigibbet commented 6 years ago

I don't think it will be that straightforward to manage back navigation if it's not working already with existing lifecycle events; it may require shared preferences storage. Created #81. See link to discussion on the issue.

maurizi commented 6 years ago

I don't think it will be that straightforward to manage back navigation if it's not working already with existing lifecycle events;

Actually, back navigation is working fine! I meant when tapping the "map" icon it would be nice to carry the current filter into the map activity when we call startActivity by setting the current filter on the intent.

flibbertigibbet commented 6 years ago

Okay, back navigation preserves the filter, but up navigation does not. I think that should be fine. Created #81

flibbertigibbet commented 6 years ago

Updated; this should be ready for another look.

maurizi commented 6 years ago

Looks good! We should probably wait to merge this until #79 is merged.

flibbertigibbet commented 6 years ago

I think applying #79 on top of this instead of the other way around will be easier, as it will need fix-ups for this either way, so I'd prefer to merge this first, then make a PR to fix up the merge conflicts on #79 afterwards.