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

Add search for settings #14414

Merged
merged 7 commits into from
Oct 19, 2021
Merged

Conversation

unknownbrackets
Copy link
Collaborator

Decided on a dedicated tab to "start" search, but keeping the found settings in context. Was pretty straight forward, and useful for people to know where the setting was next time. Only available on devices where we have keyboard support (does not include iOS or SDL currently.)

Looks like this:
image

I realize it might be nice to have less settings, but realistically we will have enough to merit a search feature. This doesn't currently search the unselected settings (example: Vulkan when OpenGL is selected), which would be nice but doesn't seem strictly necessary for this to be useful.

Next want to add search for the games list, but I'm not sure where to put the trigger... there's also developer tools, maybe.

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.12.0 milestone Apr 26, 2021
@unknownbrackets unknownbrackets added the User Interface PPSSPP's own user interface / UX label Apr 26, 2021
@hrydgard
Copy link
Owner

This is really cool!

I'm gonna play with this later and see if I like the positioning. Thinking of an alternative, maybe a little magnifying glass button, hovering in the upper right of the screen.

@anr2me
Copy link
Collaborator

anr2me commented Apr 26, 2021

This would be useful to find things we rarely used and forgotten where it was.

OOT: It would also be nice if we can restore settings per category :)
Everytime i wanted to restore settings to default, i always feel hesitate because i'll loose my input/control settings and recent games history.

@unknownbrackets
Copy link
Collaborator Author

I wasn't sure about pushing settings down, or making it so you had to search just one tab at a time. Making it a dedicated tab seemed to make it more natural for it to search all other tabs. That said, it wouldn't really be a problem for it to search the current tab only - would just need a way to show no results within each tab, which is kinda like the filter applied thing.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Apr 28, 2021

The functionality is really nice, but it's kinda confusing and unlike most settings searchers I've seen, the way you still have to go into each tab, instead of the searched-after settings from all tabs appearing below the search field. It is kinda similar to VS's settings search though. Chrome's settings search is more what I would expect as a naive user, I think.

I'll think some more about it but I might end up changing the UI a bit before merging it..

@unknownbrackets
Copy link
Collaborator Author

unknownbrackets commented May 8, 2021

Personally, I don't think the UI is going to be "familiar" to things like Chrome's settings unless the typing is inline - i.e. on Android. As long as it's a modal pop up to enter text, it's going to feel awkward each time. Plus it would mean redoing the way settings are managed both in the game settings screen and possibly even ini. So that sounds like a larger refactor that will probably not happen for a long time - a perfect enemy for this good.

Because of that I was just trying to provide a way for people to find where the setting is. If they want to change it again, they may remember. This is usually not the purpose of search, and is probably the reason why VS (or macOS, as I recall) settings search differs from Chrome settings search.

If rewriting all of PPSSPP's settings management and even reconsidering how game-specific settings are handled (as it'd likely turn into that) is a dependency to having search in settings, I'll just close this and not worry about it again. People can continue not being able to find settings in that case.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented May 9, 2021

Let's keep this open, I don't have the energy right now to think about what the smallest change would be to make me like the UI more, but maybe I will, or I'll just change my mind and merge it.

Ideally, yes, a bigger refactoring of PPSSPP's setting system would probably be the way to go, where we dynamically generate the UI controls from metadata, etc.

@iota97
Copy link
Contributor

iota97 commented Aug 15, 2021

I gave this some try, on Linux Qt it hang when the input popup open, log from console:

ThreadManager::Init(compute threads: 4, all: 8)
QObject::connect: No such slot MainWindow::frameSkippinGroup_triggered(QAction *)
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::startTimer: Timers can only be used with threads started with QThread
Killed

Anyway I wanted to make it show all the result in the search tab (I think is way more natural this way), here the result:

Screenshot_2021-08-15_02-13-46

Source can be found here https://github.com/iota97/ppsspp/tree/search.

@unknownbrackets
Copy link
Collaborator Author

I don't like the practice of "stealing" views from other view groups, and was trying to keep this relatively clean. I'm not really interested in chasing an implementation that recreates all the views and reparents them in a way that will probably cause lots of future bugs, but I can close this.

-[Unknown]

@hrydgard
Copy link
Owner

Ok, happy to get this in now. I still have a few ideas about changing the UI up a bit, but as discussed, iteration is the way to get there, not blocking everything for a design issue.

@hrydgard hrydgard merged commit 72e8c60 into hrydgard:master Oct 19, 2021
@hrydgard hrydgard modified the milestones: Future-Prio, v1.13.0 Oct 19, 2021
@unknownbrackets unknownbrackets deleted the search-settings branch October 19, 2021 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User Interface PPSSPP's own user interface / UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants