Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - game filtering #47

Closed
nullpainter opened this issue Sep 18, 2018 · 14 comments
Closed

Enhancement - game filtering #47

nullpainter opened this issue Sep 18, 2018 · 14 comments
Milestone

Comments

@nullpainter
Copy link
Contributor

After game list construction, we have enough data from listxml to add the following filters, if users wish to select games in a more controlled fashion:

  • Manufacturer
  • Year range

Another useful thing to filter by wold be category. This would be via catver.ini, but this isn't bundled with MAME. So we could have a button which downloads it (perhaps from here?)

Thoughts?

@mika76
Copy link
Owner

mika76 commented Sep 18, 2018

I never knew about catver.ini - that's really cool - yeah I love this idea! 💯 ❤️

@mika76
Copy link
Owner

mika76 commented Sep 18, 2018

So what are you thinking - filter the list with some dropdowns at the top or a button which pops open a filter dialog?

@mika76 mika76 added this to the v2.1 milestone Sep 18, 2018
@nullpainter
Copy link
Contributor Author

I need to have a play. It is nicer if the filter was applied dynamically and was in the same window, but there's very little real-estate (particularly if there are two drop-downs, two input fields, potentially some help text if catver.ini isn't present, and a download button).

@nullpainter
Copy link
Contributor Author

nullpainter commented Sep 22, 2018

Here's an example of my PoC thus far. Key points:

  • Select all / deselect all are via the header checkbox
  • If the user deselects individual games, this updates to partial state
  • The checkbox for filters updates based on the filter state

I should change the select all / deselect all to be based on the filtered set; currently its over the whole collection.

mameselection

Thoughts? Do you think the checkboxes in the headers are clear enough? The 'standard' approach is to add ugly little funnel icons, with additional indicators to display whether filters are applied per column.

@andyvans, for your inevitable feedback.

@mika76
Copy link
Owner

mika76 commented Sep 22, 2018

Wow I ❤️ it! I think the checkboxes are fine - although if it's easy you could compare to that filter icon you were talking about. One other thing - I suggest a clear filters button somewhere (maybe on the right side in line with Rebuild List...

@nullpainter
Copy link
Contributor Author

nullpainter commented Sep 23, 2018

Updated version:

  • New decade filter
  • Clear filters button added
  • Changing selection for list affects filtered items only

Even though I was initially reluctant to use a filter icon, there are now an awful lot of checkboxes, meaning subtly different things... I will add filter icons later today or tomorrow.

mameselection2

PS. There isn't anything weird going on with my row colouring; just an artifact of the GIF conversion process.

@nullpainter
Copy link
Contributor Author

nullpainter commented Sep 23, 2018

Out of the box styles with this library are... not great. Very easy to customise though. The filter icon itself is alright(ish). I think the dot is meant to indicate that the filter has been applied.

Turns out the sample code was wrapped in a ToggleButton. Just needed to style that guy.

image

What do you think? It's a little less intimidating Checkbox City...

Also, I tried to use a standard Windows style for the alternative rows. Does it look a bit heavy to you, or am I just being far too picky?

@mika76
Copy link
Owner

mika76 commented Sep 23, 2018

Heh you're as pedantic about UIs as I am 😆 this never ends well hehe

The icons look great but I wonder - could you highlight them (maybe use SystemColors.HighlightColor) when a filter is used? I think they might be more visible - otherwise they are awesome.

I think that the even/odd row coloring is very mac specific and not very Windows personally...

@mika76
Copy link
Owner

mika76 commented Sep 23, 2018

By the way how are you handling the category xml? Mamesaver downloading itself?

@nullpainter
Copy link
Contributor Author

nullpainter commented Sep 23, 2018

Heh you're as pedantic about UIs as I am 😆 this never ends well hehe

No, it's great! It's fantastic to work with someone with opinions - provided they're not diametrically opposed to mine 😉

The icons look great but I wonder - could you highlight them (maybe use SystemColors.HighlightColor) when a filter is used? I think they might be more visible - otherwise they are awesome.

I was wondering that. I'll see if I can coerce the existing styling.

I think that the even/odd row coloring is very mac specific and not very Windows personally...

Easy fix for that!

By the way how are you handling the category xml? Mamesaver downloading itself?

I'm not, yet. The WPF app is currently standalone with dummy data, while I focus on the UI. I was intending for it to be downloaded automatically on first rebuild and perhaps after a 'Refresh category on next rebuild' checkbox on the Advanced tab?

catver.ini is around 330Kb and https://github.com/mamesupport/catver.ini gzips responses, so this automatic approach should be fine.

FWIW, here's the current state, showing an active filter for Manufacturer:

image

@nullpainter nullpainter mentioned this issue Sep 23, 2018
@mika76
Copy link
Owner

mika76 commented Sep 24, 2018

Looks awesome! Is there any way to make the rest of the grid white - looks a bit strange currently - like something's not drawing 😆

Maybe we should take a copy of the category file and include an initial one on install and then allow it to be updated? Otherwise the other way might be to give all the games a generic category until it's downloaded or to hide the category column?

Loving the direction...

@nullpainter
Copy link
Contributor Author

nullpainter commented Sep 24, 2018

Is there any way to make the rest of the grid white - looks a bit strange currently - like something's not drawing

Oops, I stopped noticing that! Yes, it's awful and keep meaning to fix.

Maybe we should take a copy of the category file and include an initial one on install and then allow it to be updated?

Not a bad idea. The screensaver isn't too huge. I would like to make the whole process transparent unless users care - an 'update categories' button on the Advanced tab (or goodness, a section in README.md noting the path on disk - how often do these things change?)

This is just a dummy project currently, so I think enough is bedded in now to properly integrate it and migrate the configuration WinForms code?

@mika76
Copy link
Owner

mika76 commented Sep 24, 2018

sounds good to me

@nullpainter
Copy link
Contributor Author

nullpainter commented Oct 24, 2018

Resolved by PR #49

@mika76 mika76 closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants