Skip to content

Implement a recent search provider for the sidebar search. #932

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 1 commit into from
Feb 16, 2023

Conversation

HalfVoxel
Copy link
Contributor

Since the providers have previously been ordered sequentially, you often
have to either use the mouse or press 'down' many times to get to the item that you want,
even if you open the exact same app every time.

This commit records the history of which things you actually open and suggests those when relevant.
It will only suggest a single item at a time and uses various pieces of information such as what the user is searching for, what applications are open, the current time of day, and a few more.

If it cannot decide between several items in the history, then nothing will be shown. Most likely a suggestion will show up if the user types a few more characters.
image

Since the providers have previously been ordered sequentially, you often
have to either use the mouse or press 'down' many times to get to the item that you want,
even if you open the exact same app every time.

This commit records the history of which things you actually open and suggests those when relevant.
It will only suggest a single item at a time and uses various pieces of information such as what the user is searching for, what applications are open, the current time of day, and a few more.

If it cannot decide between several items in the history, then nothing will be shown. Most likely a suggestion will show up if the user types a few more characters.
@HalfVoxel
Copy link
Contributor Author

@PapyElGringo did you check this out?

Copy link
Collaborator

@PapyElGringo PapyElGringo left a comment

Choose a reason for hiding this comment

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

I only have a small code review request.
I'm a bit concerned about the complexity added for this feature and the changes in result predictability.
But since it's also could be a killer feature for some I'll allow the merge but in the eventuality we get mixed feedback we should be prepared to add an option toggle in the settings to disable the feature.

history: HistoryItem[] = [];

get title(): string {
return 'Recent';
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we want internationalization we can use https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/43.3/po/en_GB.po#L4054 but it's in uppercase...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm. Would be nice. But sadly wouldn't work with the casing.

@HalfVoxel HalfVoxel merged commit 65d1f5d into main Feb 16, 2023
@HalfVoxel HalfVoxel deleted the aron/recent_search branch February 16, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants