lutris / lutris

Lutris desktop client
https://lutris.net
GNU General Public License v3.0
7.74k stars 682 forks source link

[Feature Request] "Uncategorized" category #5339

Open hirak99 opened 6 months ago

hirak99 commented 6 months ago

Now that we are able to assign categories to games, it will be really nice if we have an "Uncategorized" automatic category. This will help us to know exactly which games we miss when we only look at games in the categories, which right now is not very easy to do.

(The idea can be extended in the future, to have automatic categories definable by the user based on some query.)

strycore commented 6 months ago

The idea can be extended in the future, to have automatic categories definable by the user based on some query.

I would rather go for that feature first.

dobval commented 5 months ago

Hey, I find this idea pretty useful too. I think I managed to implement something along the lines of it. After every successful installation, the game gets added into "Uncategorized". Let me know if there are any bugs

hirak99 commented 5 months ago

Thanks! I tested it, it works when installing games - have a couple of observations -

  1. It does not work when a game is added in any other way. Say for example if an already installed game is re-added. Thus it wouldn't work on locally installed games.
  2. This also means that previously added games (that are already in the library) will not get the label Uncategorized. This can make this commit a bit confusing for existing users.
  3. It wouldn't recategorize if a game is manually put in a category. In other words, the "Uncategorized" category has to be manually removed. This can be confusing too.

I think this commit makes a lot of sense if the category name is changed to "Installed" instead of "Uncategorized"?


For Uncategorized on the other hand, I think it should be a smart category. By that, I mean the category always keeps track of all games that are currently not in any other categories. This is also how Steam's Uncategorized works - so it will make Steam users feel right at home.

hirak99 commented 5 months ago

I think it's actually fairly easy to add an UNCATEGORIZED smart-category, that stays up to date automatically.

All the code can be encapsulated in categories.py.

I made this a change to demonstrate, and invite you to try it here (my forked version).

You should see a smart category named "UNCATEGORIZED", which should correctly reflect the status of all your existing games. It should also stay up to date as you recategorize your games.

[The code allows future modification to allow easy addition of custom rules, such as "added 10 days ago" or "play time < 5 hours" etc. - which ideally should be exposed to be user defined at some point (which will require some UX wizardry).]

danieljohnson2 commented 5 months ago

I think if you are going to have a hard-coded "Uncategorized" category it should not present with the user-defined categories; it should be up in the top section with "Recent". And have a cool icon.

If you can make these things user-defined, that might be a bit different. But then you would want real category IDs instead of fake ones.

I think @strycore would prefer the user-defined approach, but I do not see how to define these things without users keying in SQL (which we should avoid).

hirak99 commented 5 months ago

Good points on UX. Some of my thoughts -

  1. I agree that there should be some new UX element such as an icon that marks smart-categories such as "Uncategorized". I like the material design bolt icon, for example. With that demarcation, I think "Uncategorized" can be part of Categories. I actually lean towards it, because "Uncategorized" is speaking about the categories so this is a good place for it to belong. May be it can be shown whenever any category exists, so that users who do not care about categories do not see it.
  2. Though Uncategorized can be pre-defined, I also believe it will be cool to give the users ability to define new smart-categories. I think this is a power feature, so SQL should do just fine; we can offer some QoL features such as error checking, and a few examples for convenience. The main requirement should be that it does not crash and instead tells the user if and why the SQL is invalid. As this is a power feature, power users will either write their own SQL or get some from online.
  3. There is a way that SQL can be entirely avoided with clever UX design. For instance we could offer users to connect fields like "Hours Played", "Date Installed", "Size in MB", "Number of Categories" to compare with numbers. However, while this will be cool, it is not easy to build and needs some dedicated coding - so IMHO this is not necessary.
strycore commented 5 months ago

Don't create a category in the database that is called "Uncategorized", gosh. I'm not sure the patch does that since I can't review it because it's just a big reformat with ruff or something. But from what I'm getting in the discussion, you guys are actually considering a category called Uncategorized instead of having a query of games without a category.

You can stop working on that approach because it will be rejected without further discussion.

strycore commented 5 months ago

And by the way, if the PR for that simple and basic feature changes 126 files in the project, I will close it without reading it.

strycore commented 5 months ago

The system of smart category is exactly what we're aiming for. Even without a lot of UI work, we can easily have custom filters handled by the search bar, kinda like what Github is doing. It would still be better to have an UI similar to what Steam has.

The current sidebar UI needs to change anyway. For people with large libraries on lots of runners like I do, the sidebar is very crowded and is barely usable.

Also, do keep in mind that the user categories are currently being synced to lutris.net for users who enable that feature. But if we're not creating a "Uncategorized" entry in the database then this shouldn't matter.

danieljohnson2 commented 5 months ago

I forgot about that. That "Uncategorized" entry was really a "Newly Installed" category, but it makes even less sense to sync that up to Lutris.net.

@hirak99's proposal is dynamic, but the particular search it does is hard-coded.

I think I understand what you are after now; fancier searching in the search bar, then maybe saved searches in the sidebar?

I'll put this aside for post-0.5.17 work. We really want to ship soon.

strycore commented 5 months ago

yes, that should be kept for after the release. What I'm mostly after is a better system for filtering, one that could potentially make the sidebar obsolete (at least partially).

Screenshot_20240402_013546

In my screenshot, you can only see a few runners then you have to scroll down a bunch and you have an even bigger list of platforms. The challenge is coming up with an UI that is both more concise than the current sidebar while still being discoverable (I should be able to see what platforms I use, for example)

Maybe we can have a system of checkboxes like Steam, in a dropdown menu next to the search bar. And at the same time we could give the option to show games grouped by some given criteria.

For time based filters (year, last played, installed at) or even anything sequential, like alphabetical order, we can do this kind of grouping:

image (note how Dolphin has a sidebar that isn't 12 kilometers long)

For non sequential filters (platforms, runners, etc), we could have an overview of a given criteria.

Let's say we add a dropdown before the search field with a selection of Categories, Sources, Runners, Platforms. Selecting Platforms would replace the game list with a list for platforms similar to what's in the sidebar. We would need some cool graphics to replace the game cover art but that's manageable. Then in the main view, I click on Sega Dreamcast and it show all Dreamcast games. The dropdown updates to "Platform ▶ Sega Dreamcast"

strycore commented 5 months ago

The sections on the sidebar should be collapsible and clickable except maybe for the topmost Library section. Single clicking should take the user to that "folder view" of each respective section. Double clicking the section in the sidebar or single clicking a little arrow on the left hand side of the section should collapse / uncollapse the section