Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented May 23, 2021

Fixes #1020

  • Use selected text or search entry text when available with global search action

The keyboard shortcut searches text based on which widget is focused. If the document is focused and text is selected then that is the proposed search term. If the search entry is focused and has text then that is the search term.

At the moment the dialog still appears in order that the user may override the choice or change settings.

@jeremypw jeremypw mentioned this pull request May 31, 2021
@jeremypw jeremypw marked this pull request as ready for review July 14, 2021 07:07
# Conflicts fixed in:
#	data/io.elementary.code.appdata.xml.in
#	src/FolderManager/FileView.vala
#	src/Widgets/SearchBar.vala
@tintou
Copy link
Member

tintou commented Jul 13, 2022

@danrabbit Can you give some input on which icon to use instead of gnome-globe or if we need something new?

Jeremy Wootten and others added 2 commits July 13, 2022 15:07
@jeremypw
Copy link
Collaborator Author

Most "global search" icon examples on the web are some combination of a globe and magnifying glass (unsurprisingly).

# Conflicts fixed:
#	data/io.elementary.code.appdata.xml.in
@jeremypw jeremypw requested a review from danirabbit August 31, 2022 11:50
@danirabbit
Copy link
Member

Hm yeah this interface is definitely starting to feel a bit awkward. I wonder if we should move search options into a menu and use checkboxes instead of trying to iconify all of the options inline.

I think it feels awkward to open the search dialog when we already have settings here for case sensitivity and regex. So perhaps if we make global search a checkbox option here we could have the keyboard shortcuts just open this one interface with the global search option either checked or unchecked

@jeremypw
Copy link
Collaborator Author

jeremypw commented Sep 1, 2022

Yeah, I guess you are right - the searchbar could also do global search so the dialog would be redundant. I think originally the dialog had more options but it was slimmed down. I'll split this PR and keep the code to apply the search to the selected text and lose the extra button pending an interface redesign.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Sep 1, 2022

@danrabbit This PR is now restricted to allowing search on selected text - which is quite useful and quicker than typing search terms in the dialog every time. At the moment you can select any amount of text which fails with there are more than one line - not sure how to deal with that - search on a term up to the first new line?

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

Yeah this works quite well! I think we can probably ignore multiline for now, the dialog makes it clear enough what is about to be searched 👍

@danirabbit danirabbit merged commit 8e14534 into master Sep 26, 2022
@danirabbit danirabbit deleted the global-search-selected branch September 26, 2022 20:32
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.

GlobalSearch: The dialog should be preloaded with the selected text (similar to searchbar)

5 participants