benrhughes / todotxt.net

An implementation of todo.txt for Windows using the .NET framework
http://benrhughes.github.io/todotxt.net/
Other
500 stars 123 forks source link

Ability to add up to 9 preset filters #240

Closed benrhughes closed 9 years ago

benrhughes commented 9 years ago

Would be nice to be able to dynamically add up to 9 preset filters.

Under the covers it should be trivial, the main work is in the UI.

mjdescy commented 9 years ago

I have thought a lot about how to expose all the filters in the UI. There are two options I see for housing presets 1-9: a ScrollViewer or a TabControl. I think a TabControl would look cleaner, but would be less keyboard friendly. (If I added keyboard shortcuts to move through the tabs, it would be great for power users, but most users wouldn't learn about those shortcuts, I think.) Therefore, my plan is now to add a ScollViewer.

I will wire up the 4-9 apply filter commands in the same way the others are (RoutedUICommands). Command bindings will be tackled sometime later with a full MVVM refactor.

benrhughes commented 9 years ago

I'd prefer if we could dynamically add/remove filters, so that people with 1 filter don't have 8 empty filter boxes. I think the easiest way to do that is using an ItemsControl with it's ItemsSource bound to a list of filters (and a data template set to render a filter).

We'd need to refactor the filtering code so that it uses a list rather than 3 explicitly defined filters.

That's a bit more work so I'm happy if you skip it and we can do the dynamic adding/removing in a second pass.

Cheers,

Ben

On Sun, Jan 11, 2015 at 2:45 AM, Michael Descy notifications@github.com wrote:

I have thought a lot about how to expose all the filters in the UI. There are two options I see for housing presets 1-9: a ScrollViewer or a TabControl. I think a TabControl would look cleaner, but would be less keyboard friendly. (If I added keyboard shortcuts to move through the tabs, it would be great for power users, but most users wouldn't learn about those shortcuts, I think.) Therefore, my plan is now to add a ScollViewer.

I will wire up the 4-9 apply filter commands in the same way the others are (RoutedUICommands). Command bindings will be tackled sometime later with a full MVVM refactor.

— Reply to this email directly or view it on GitHub https://github.com/benrhughes/todotxt.net/issues/240#issuecomment-69460057 .

mjdescy commented 9 years ago

I'd prefer to add the dynamic list of filters in a second pass. I don't plan on showing more filters at once than are shown now, so the UI changes won't result in an unwieldy form. Also, I would need some guidance creating dynamic controls and item templates and related commands (keyboard shortcuts) as you described. =

mjdescy commented 9 years ago

I spend a long time considering the UI changes in commit e8452e3, but I am not 100% happy with the result just yet. When tabbing through the filter presets, the labels can get off-screen. Anyone have any ideas to make this look better?