Skip to content

Add option to hide games from the library #1228

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

Merged
merged 5 commits into from
Apr 24, 2022
Merged

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Apr 23, 2022

This PR adds a the ability to mark games from the library as hidden so they don't show up by default. This can be toggled on/off with the new checkbox.

Games can be hid/unhid using the right click context menu.

You can see it working in this video with the game A Short Hike (second to last, bottom right)

hide-games.mp4

(The total games counter changes by more than 1 because I have other hidden games outside the viewport)

This I tried and was not happy with (but accept any feedback):

  • using an icon for the Show hidden toggle instead of text, it didn't look clear at least to me
  • adding an icon in the game card to toggle the hide/unhide, it added noise for an action that's probably done only once or twice ever for a game

Haven't tested with Unreal Market (I don't use it, I don't know if this is expected to work there too? I understand it works but I don't know if we should ignore this feature there).

Closes #948


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Apr 23, 2022
(configStore.get('games.recent') as Array<RecentGame>) || []
const recentGamesList = recentGames.map((a) => a.appName) as string[]

return library.filter((game) => recentGamesList.includes(game.app_name))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While coding this feature initially I used a similar method like this one so I included this refactor. The refactor is a small improvement (we don't need to initialize the store and query it for every callback function call) but I can remove it from this PR if it adds noise, since it's not really needed for this feature at the end.

@flavioislima
Copy link
Member

flavioislima commented Apr 24, 2022

Personally, I don't like the idea of having more text on the header.
I wonder if we could have another form control as we have for the platform filter and add the Visibility Icon there and change it to VisibilityOFF when the games are hidden.

something like this:
image

Using:
https://mui.com/material-ui/material-icons/?query=visibility&selected=Visibility
and
https://mui.com/material-ui/material-icons/?query=visibility&selected=VisibilityOff

what do you think?

with that approach, we can add a Star or Heart to show/hide favorites as well.

@arielj
Copy link
Collaborator Author

arielj commented Apr 24, 2022

Personally, I don't like the idea of having more text on the header. I wonder if we could have another form control as we have for the platform filter and add the Visibility Icon there and change it to VisibilityOFF when the games are hidden.

something like this: image

Using: https://mui.com/material-ui/material-icons/?query=visibility&selected=Visibility and https://mui.com/material-ui/material-icons/?query=visibility&selected=VisibilityOff

what do you think?

with that approach, we can add a Star or Heart to show/hide favorites as well.

I can change that to try, what I'm worried about is that an eye icon doesn't make it obvious that it will show/hide hidden games. I imagine a user clicking the icon to see what happens, if they didn't hide any game nothing will happen.

I guess the tooltip would give a hint if the user leaves the mouse hovering the icon long enough, but tooltips don't show up when using the controller to navigate heroic.

Maybe I'm overthinking it xD

@flavioislima
Copy link
Member

Yes. Let's collect some feedback on the beta. 😀

@arielj
Copy link
Collaborator Author

arielj commented Apr 24, 2022

I moved this right next to the Total Games label, I imagine that would give more context that the icon is related to how many games you can see

image

I also fixed a bug, the selection of the filter was not persisted.

@@ -93,6 +93,10 @@
border-bottom-right-radius: 0;
}

.FormControl--segmented > button > svg {
display: block;
}
Copy link
Collaborator Author

@arielj arielj Apr 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the svg icons where not properly centered (svg images are inline by default and it was adding a few empty pixels under it)

Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! :D

@flavioislima flavioislima merged commit 961d007 into main Apr 24, 2022
@flavioislima flavioislima deleted the feature/ignore-games branch April 24, 2022 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to hide games
2 participants