point97 / marine-planner

0 stars 0 forks source link

Polish the UI on the Filtering Tab #6

Open sfletche opened 10 years ago

qpfiffer commented 10 years ago

Any clarification on what needs to be changed for this one?

sfletche commented 10 years ago

I'd say start with the following: Add 'Filter by Date' above the start and end date inputs Adjust spacing between various filtering inputs Have Update Filter button become active/inactive after changing an input / updating filter Might have Start Date default to sometime in the past (when the user clicks in that input it opens a calendar from whenever the first data was recorded (2011?) - I also wonder if there is a better way to deal with the large date range other than having the user click through 30 months or so to get to the desired month...) Filter by Debris input box should be same width as the layer buttons above Also would be nice to add the Filtering icon (icon-filter) to those layer buttons that are filtering-enabled (such as Beach Cleanup and Derelict Gear) (in both the Data tab and the Filtering tab)

qpfiffer commented 10 years ago

Do we have this in the DB somewhere, or do I need to go get it from the events URL?

Should I stick the 'filterable' boolean in the DB somewhere or just hardcode it for now? Is it already in the DB?

sfletche commented 10 years ago

Start Date can be hard coded based on whatever currently exists in the db (I don't expect that value to change).

what about the 'filtering' boolean - excellent question. I've been discovering those layers by the theme that they are in (Marine Debris), but I realize that's a short-sighted solution. i believe the 'summarize_to_grid' field (in the Layer model) was created for this purpose. I disregarded it intending to rename it at some point (south migrations doesn't do renaming so well if I remember correctly so it would actually involve deleting the original field and creating a new field (e.g. 'filterable'), but wanted to make sure it wasn't being used elsewhere first. I'd say for now, go ahead and create the new field on the model and generate a migration script.

sfletche commented 10 years ago

Also noticed we'll need to deal with the growing filter box (as more filters are added, the box increases in size, pushing some of the elements below it off the left panel)

qpfiffer commented 10 years ago

I think that this is mostly done, barring the clickable optgroup things in the filter typeahead. Apparently select2 doesn't easily allow you to select optgroups. I suppose I could make the 'Plastic Category' appear under the 'Plastic Category' optgroup but that feels a little hacky.